summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcuda/cuda_runtime_api.cc1
-rw-r--r--src/cuda-sim/instructions.cc13
2 files changed, 12 insertions, 2 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index 5dc9cc1..5310a52 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -266,7 +266,6 @@ struct CUctx_st {
m_kernel_lookup[hostFun] = f;
}
else {
- m_code[fat_cubin_handle]->dump();
printf("Warning: cannot find deviceFun %s\n", deviceFun);
m_kernel_lookup[hostFun] = NULL;
}
diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc
index cf7f04a..254427b 100644
--- a/src/cuda-sim/instructions.cc
+++ b/src/cuda-sim/instructions.cc
@@ -148,6 +148,9 @@ ptx_reg_t ptx_thread_info::get_operand_value( const operand_info &op, operand_in
result.u64 = op.get_symbol()->get_address();
} else if ( op.is_local() ) {
result.u64 = op.get_symbol()->get_address();
+ } else if ( op.is_function_address() ) {
+ result.u64 = op.get_symbol()->get_pc()->get_start_PC();
+ printf("Get pc for kernel function %u\n", op.get_symbol()->get_pc()->get_start_PC());
} else {
const char *name = op.name().c_str();
printf("GPGPU-Sim PTX: ERROR ** get_operand_value : unknown operand type for %s\n", name );
@@ -1407,7 +1410,15 @@ void call_impl( const ptx_instruction *pI, ptx_thread_info *thread )
if( fname == "vprintf" ) {
gpgpusim_cuda_vprintf(pI, thread, target_func);
return;
- }
+ }
+ else if(fname == "cudaGetParameterBufferV2") {
+ printf("calling cudaGetParameterBufferV2\n");
+ return;
+ }
+ else if(fname == "cudaLaunchDeviceV2") {
+ printf("calling cudaLaunchDeviceV2\n");
+ return;
+ }
// read source arguements into register specified in declaration of function
arg_buffer_list_t arg_values;