Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
hpvm-release
Commits
aca66ed5
"git@gitlab.engr.illinois.edu:cs525-sp18-g07/spark.git" did not exist on "d12330bd2cd354919c414ee7ef367bc28c0eb7c9"
Commit
aca66ed5
authored
10 years ago
by
Prakalp Srivastava
Browse files
Options
Downloads
Patches
Plain Diff
adding changes to visc-rt as well
parent
b8f409b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/projects/visc-rt/visc-rt.cpp
+3
-4
3 additions, 4 deletions
llvm/projects/visc-rt/visc-rt.cpp
with
3 additions
and
4 deletions
llvm/projects/visc-rt/visc-rt.cpp
+
3
−
4
View file @
aca66ed5
...
...
@@ -2,6 +2,7 @@
#include
<cstdlib>
#include
<cstdio>
#include
<string>
#include
<assert.h>
#include
<CL/cl.h>
//#include "visc-rt.h"
...
...
@@ -95,6 +96,8 @@ void llvm_visc_ptx_argument_scalar(void* graphID, void* input, int arg_index, si
extern
"C"
void
*
llvm_visc_ptx_argument_ptr
(
void
*
graphID
,
void
*
input
,
int
arg_index
,
size_t
size
,
bool
isInput
,
bool
isOutput
)
{
printf
(
"Set Pointer Input. Argument Index = %d, Ptr = %p, Size = %lu
\n
"
,
arg_index
,
input
,
size
);
// Size should be non-zero
assert
(
size
!=
0
);
printf
(
"
\t
Input: %d, Output: %d
\n
"
,
isInput
,
isOutput
);
DFNodeContext_PTX
*
Context
=
(
DFNodeContext_PTX
*
)
graphID
;
cl_int
errcode
;
...
...
@@ -104,10 +107,6 @@ void* llvm_visc_ptx_argument_ptr(void* graphID, void* input, int arg_index, size
else
if
(
isOutput
)
clFlags
=
CL_MEM_READ_WRITE
;
else
clFlags
=
CL_MEM_READ_WRITE
|
CL_MEM_COPY_HOST_PTR
;
if
(
input
==
NULL
)
{
printf
(
"Found NULL input value!!"
);
input
=
NULL
;
}
cl_mem
d_input
=
clCreateBuffer
(
Context
->
clGPUContext
,
clFlags
,
size
,
input
,
&
errcode
);
checkErr
(
errcode
,
CL_SUCCESS
,
"Failure to allocate memory on device"
);
errcode
|=
clSetKernelArg
(
Context
->
clKernel
,
arg_index
,
sizeof
(
cl_mem
),
(
void
*
)
&
d_input
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment