summaryrefslogtreecommitdiff
path: root/libopencl/opencl_runtime_api.cc
diff options
context:
space:
mode:
authortgrogers <[email protected]>2019-06-12 16:19:08 -0400
committertgrogers <[email protected]>2019-06-12 16:19:08 -0400
commit53e003426620636f0ba8243e28aa5c0687378749 (patch)
tree3af7e3a8f18689ef6b3f2cc55afc651478742e15 /libopencl/opencl_runtime_api.cc
parent933d0aa4f91588d17f8970c578b2c1d2bbc9fc9c (diff)
parentc5578dade2fef7985bf1b26a7f3ae78896c96b69 (diff)
Merge branch 'dev' of github.com:purdue-aalp/gpgpu-sim_distribution into dev
Diffstat (limited to 'libopencl/opencl_runtime_api.cc')
-rw-r--r--libopencl/opencl_runtime_api.cc5
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);
}