diff options
| author | Mengchi Zhang <[email protected]> | 2019-06-12 01:42:52 -0400 |
|---|---|---|
| committer | Mengchi Zhang <[email protected]> | 2019-06-12 01:42:52 -0400 |
| commit | 9e52c143a883f682c02d81149748cdf8aa5508f7 (patch) | |
| tree | ceaa34447db6adc3f26860d73db61df545ba86f9 /libopencl/opencl_runtime_api.cc | |
| parent | ba1ed2941753ae8406bc9ec4a0de1eddc6454a1c (diff) | |
Move some function from ptx_loader to gpgpu_context
Signed-off-by: Mengchi Zhang <[email protected]>
Diffstat (limited to 'libopencl/opencl_runtime_api.cc')
| -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); } |
