summaryrefslogtreecommitdiff
path: root/debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp
diff options
context:
space:
mode:
authorJonathan <[email protected]>2018-07-04 16:41:20 -0700
committerJonathan <[email protected]>2018-07-04 16:41:20 -0700
commit7c4f9d7bff7b1725f3da6ddc8abf3f77a1cbe6f5 (patch)
treefdb10fc6459a13cc8aa9634fc9134f6ef1569d23 /debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp
parent1fddb06b153a3e5fbc255e89bb6861cce1319039 (diff)
dumps ptx kernels and scripts to launch all kernels
Diffstat (limited to 'debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp')
-rw-r--r--debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp b/debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp
index df0ff8d..1f094ba 100644
--- a/debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp
+++ b/debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp
@@ -81,18 +81,16 @@ void ptxJIT(int argc, char **argv, CUmodule *phModule, CUfunction *phKernel, CUl
if (sizeof(void *)==4)
{
// Load the PTX from the string myPtx32
- printf("Loading myPtx32[] program\n");
- // PTX May also be loaded from file, as per below.
- myErr = cuLinkAddData(*lState, CU_JIT_INPUT_PTX, (void *)myPtx32, strlen(myPtx32)+1, 0, 0, 0, 0);
+ printf("Loading myPtx32[] program...\n");
+ printf("WARNING: 32-bit execution is untested");
}
else
{
// Load the PTX from the string myPtx (64-bit)
printf("Loading myPtx[] program\n");
- //myErr = cuLinkAddData(*lState, CU_JIT_INPUT_PTX, (void *)myPtx64, strlen(myPtx64)+1, 0, 0, 0, 0);
- // PTX May also be loaded from file, as per below.
- myErr = cuLinkAddFile(*lState, CU_JIT_INPUT_PTX, "myPtx64.ptx",0,0,0);
}
+ std::string ptx_file (std::string("../data/ptx.config") + wys_launch_num);
+ myErr = cuLinkAddFile(*lState, CU_JIT_INPUT_PTX, ptx_file.c_str(),0,0,0);
if (myErr != CUDA_SUCCESS)
{