diff options
| author | Jin Wang <[email protected]> | 2014-09-29 14:26:42 -0400 |
|---|---|---|
| committer | Jin Wang <[email protected]> | 2016-07-05 08:59:56 -0400 |
| commit | e340759d5d886661722e978912b28cd1259c00ec (patch) | |
| tree | 1a6454bcb59acd616b491db23e51cd727945e5bd /libcuda | |
| parent | 0c5684afcd55e8352fe4b05d9c75a54593417b5f (diff) | |
MOD: Hack warning for cuda device runtime lib function registration
Diffstat (limited to 'libcuda')
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index bdfc47c..5dc9cc1 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -260,10 +260,20 @@ struct CUctx_st { { if( m_code.find(fat_cubin_handle) != m_code.end() ) { symbol *s = m_code[fat_cubin_handle]->lookup(deviceFun); - assert( s != NULL ); - function_info *f = s->get_pc(); - assert( f != NULL ); - m_kernel_lookup[hostFun] = f; + if(s != NULL) { + function_info *f = s->get_pc(); + assert( f != NULL ); + 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; + } + // assert( s != NULL ); + // function_info *f = s->get_pc(); + // assert( f != NULL ); + // m_kernel_lookup[hostFun] = f; } else { m_kernel_lookup[hostFun] = NULL; } |
