diff options
| author | Jonathan <[email protected]> | 2018-07-03 11:08:13 -0700 |
|---|---|---|
| committer | Jonathan <[email protected]> | 2018-07-03 11:08:13 -0700 |
| commit | 330cca35c59490bd8b96bfaa6688b5ea5163a735 (patch) | |
| tree | 0f492a2a40f92d0e112846a8729195a5873d5380 /debug_tools/WatchYourStep/ptxjitplus | |
| parent | b1ce8d27bae0bbf48d97bfc83b001b8d95209f99 (diff) | |
correctly load params
Diffstat (limited to 'debug_tools/WatchYourStep/ptxjitplus')
| -rw-r--r-- | debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp b/debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp index df034aa..e9b16f1 100644 --- a/debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp +++ b/debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp @@ -150,7 +150,7 @@ void initializeData(std::vector<unsigned char*>& param_data, std::vector< std::p info.first = len; assert( err==1 ); //printf("%lu : ", len); - unsigned char params[len]; + unsigned char* params = (unsigned char*) malloc(len*sizeof(unsigned char)); for (size_t i=0; i<len; i++) { err = fscanf(fin, "%u ", &val); @@ -165,6 +165,16 @@ void initializeData(std::vector<unsigned char*>& param_data, std::vector< std::p //printf("\n"); } fclose(fin); + //filename = std::string("../data/wys.out") + wys_launch_num + "_param"; + //fout = fopen(filename.c_str(), "w"); + //assert(fout); + //fprintf(fout, "param %zu: size = %zu, data = ", 0,param_info[0].first); + //for (size_t j = 0; j<param_info[0].first; j++){ + // fprintf(fout, " %u", i->second[j]); + //} + //fprintf(fout, "\n"); + //fflush(fout); + //fclose(fout); } int main(int argc, char **argv) @@ -186,6 +196,8 @@ int main(int argc, char **argv) std::vector< std::pair<size_t, bool> > param_info; initializeData(param_data,param_info); + + if (checkCmdLineFlag(argc, (const char **)argv, "device")) { cuda_device = getCmdLineArgumentInt(argc, (const char **)argv, "device="); |
