diff options
| author | Mengchi Zhang <[email protected]> | 2019-06-12 13:02:19 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-06-12 13:02:19 -0400 |
| commit | c5578dade2fef7985bf1b26a7f3ae78896c96b69 (patch) | |
| tree | f92e42961c0fda60a5f22383490831dcf1cc900b /libopencl | |
| parent | 35b55f5313d079327be9e6c91de5a53a01030e3e (diff) | |
| parent | 7a6ff7084c1c65450775b4d58e80f8c789888815 (diff) | |
Merge pull request #16 from echoedit/dev
Dev
Diffstat (limited to 'libopencl')
| -rw-r--r-- | libopencl/opencl_runtime_api.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libopencl/opencl_runtime_api.cc b/libopencl/opencl_runtime_api.cc index 97a54d8..0ec635e 100644 --- a/libopencl/opencl_runtime_api.cc +++ b/libopencl/opencl_runtime_api.cc @@ -84,6 +84,7 @@ #include "../src/gpgpusim_entrypoint.h" #include "../src/gpgpu-sim/gpu-sim.h" #include "../src/gpgpu-sim/shader.h" +#include "../libcuda/gpgpu_context.h" //# define __my_func__ __PRETTY_FUNCTION__ # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4) @@ -424,6 +425,8 @@ void register_ptx_function( const char *name, function_info *impl ) void _cl_program::Build(const char *options) { + gpgpu_context *ctx; + ctx = GPGPU_Context(); printf("GPGPU-Sim OpenCL API: compiling OpenCL kernels...\n"); std::map<cl_uint,pgm_info>::iterator i; for( i = m_pgm.begin(); i!= m_pgm.end(); i++ ) { @@ -576,7 +579,7 @@ void _cl_program::Build(const char *options) } } info.m_asm = tmp; - info.m_symtab = gpgpu_ptx_sim_load_ptx_from_string( tmp, source_num ); + info.m_symtab = ctx->gpgpu_ptx_sim_load_ptx_from_string( tmp, source_num ); gpgpu_ptxinfo_load_from_string( tmp, source_num ); free(tmp); } |
