diff --git a/gpu-simulator/CMakeLists.txt b/gpu-simulator/CMakeLists.txt index 72052bd8b..55f541931 100644 --- a/gpu-simulator/CMakeLists.txt +++ b/gpu-simulator/CMakeLists.txt @@ -61,7 +61,6 @@ file(WRITE ${CMAKE_BINARY_DIR}/accelsim_version.h "const char *g_accelsim_versio add_subdirectory($ENV{GPGPUSIM_ROOT}) add_subdirectory(trace-driven) add_subdirectory(trace-parser) -add_subdirectory(extern/pybind11) include_directories($ENV{CUDA_INSTALL_PATH}/include) @@ -73,21 +72,9 @@ include_directories(trace-driven) include_directories(trace-parser) -add_executable(accel-sim.out accel-sim.cc main.cc) +add_executable(accel-sim.out main.cc) target_link_libraries(accel-sim.out PUBLIC cuda ptxsim gpgpusim intersim accelwattch entrypoint) target_link_libraries(accel-sim.out PUBLIC -lm -lz -lGL -pthread) target_link_libraries(accel-sim.out PUBLIC trace-driven trace-parser) -pybind11_add_module(accel_sim ./accel-sim.cc ./python_wrapper/python_wrapper.cc) -target_link_libraries(accel_sim PRIVATE cuda ptxsim gpgpusim intersim accelwattch entrypoint) -target_link_libraries(accel_sim PRIVATE trace-driven trace-parser) - -# allow failure for stubgen -add_custom_target(gen_pyi ALL - COMMAND $ENV{HOME}/.local/bin/stubgen -m accel_sim -o . || (exit 0) - DEPENDS accel_sim - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - ) - - install(TARGETS accel-sim.out DESTINATION ${CMAKE_SOURCE_DIR}/bin/$ENV{ACCELSIM_CONFIG}) \ No newline at end of file diff --git a/gpu-simulator/Makefile b/gpu-simulator/Makefile index 6a4cbefe4..550a862c7 100644 --- a/gpu-simulator/Makefile +++ b/gpu-simulator/Makefile @@ -42,10 +42,6 @@ else CXXFLAGS = -Wall -O3 -g3 -fPIC -std=c++17 endif -CXXFLAGS+=-I./trace-driven -I./trace-parser -I$(GPGPUSIM_ROOT)/libcuda -I$(GPGPUSIM_ROOT)/src -I$(CUDA_INSTALL_PATH)/include -I$(BUILD_DIR) - -LIBS+=-L$(GPGPUSIM_ROOT)/lib/$(GPGPUSIM_CONFIG)/ -lcudart -lm -lz -lGL -pthread $(BUILD_DIR)/*.o - all: $(BIN_DIR)/accel-sim.out $(BUILD_DIR)/main.makedepend: depend makedirs @@ -63,8 +59,11 @@ checkenv: makedirs exit 1; \ fi -$(BIN_DIR)/accel-sim.out: trace-driven trace-parser gpgpu-sim makedirs version - $(CXX) $(CXXFLAGS) $(LIBS) -o $(BIN_DIR)/accel-sim.out accel-sim.cc main.cc +$(BIN_DIR)/accel-sim.out: trace-driven trace-parser gpgpu-sim makedirs $(BUILD_DIR)/main.o version + $(CXX) -std=c++0x -o $(BIN_DIR)/accel-sim.out -L$(GPGPUSIM_ROOT)/lib/$(GPGPUSIM_CONFIG)/ -lcudart -lm -lz -lGL -pthread $(BUILD_DIR)/*.o + +$(BUILD_DIR)/main.o: main.cc version + $(CXX) $(CXXFLAGS) -I$(BUILD_DIR) -I./trace-driven -I./trace-parser -I$(GPGPUSIM_ROOT)/libcuda -I$(GPGPUSIM_ROOT)/src -I$(CUDA_INSTALL_PATH)/include -c main.cc -o $(BUILD_DIR)/main.o version: echo "const char *g_accelsim_version=\"$(ACCELSIM_BUILD)\";" > $(BUILD_DIR)/accelsim_version.h diff --git a/gpu-simulator/accel-sim.cc b/gpu-simulator/accel-sim.cc deleted file mode 100644 index c5c17d2d9..000000000 --- a/gpu-simulator/accel-sim.cc +++ /dev/null @@ -1,230 +0,0 @@ -#include "accel-sim.h" -#include "accelsim_version.h" - -accel_sim_framework::accel_sim_framework(std::string config_file, - std::string trace_file) { - std::cout << "Accel-Sim [build " << g_accelsim_version << "]"; - m_gpgpu_context = new gpgpu_context(); - - // mimic argv - unsigned argc = 5; - const char *argv[] = {"accel-sim.out", "-config", config_file.c_str(), - "-trace", trace_file.c_str()}; - - gpgpu_sim *m_gpgpu_sim = - gpgpu_trace_sim_init_perf_model(argc, argv, m_gpgpu_context, &tconfig); - m_gpgpu_sim->init(); - - tracer = trace_parser(tconfig.get_traces_filename()); - - tconfig.parse_config(); - - init(); -} - -accel_sim_framework::accel_sim_framework(int argc, const char **argv) { - std::cout << "Accel-Sim [build " << g_accelsim_version << "]"; - m_gpgpu_context = new gpgpu_context(); - - m_gpgpu_sim = - gpgpu_trace_sim_init_perf_model(argc, argv, m_gpgpu_context, &tconfig); - m_gpgpu_sim->init(); - - tracer = trace_parser(tconfig.get_traces_filename()); - - tconfig.parse_config(); - - init(); -} - -void accel_sim_framework::simulation_loop() { - // for each kernel - // load file - // parse and create kernel info - // launch - // while loop till the end of the end kernel execution - // prints stats - - while (commandlist_index < commandlist.size() || !kernels_info.empty()) { - parse_commandlist(); - - // Launch all kernels within window that are on a stream that isn't already - // running - for (auto k : kernels_info) { - bool stream_busy = false; - for (auto s : busy_streams) { - if (s == k->get_cuda_stream_id()) stream_busy = true; - } - if (!stream_busy && m_gpgpu_sim->can_start_kernel() && - !k->was_launched()) { - std::cout << "launching kernel name: " << k->get_name() - << " uid: " << k->get_uid() - << " cuda_stream_id: " << k->get_cuda_stream_id() - << std::endl; - m_gpgpu_sim->launch(k); - k->set_launched(); - busy_streams.push_back(k->get_cuda_stream_id()); - } - } - - unsigned finished_kernel_uid = simulate(); - // cleanup finished kernel - if (finished_kernel_uid || m_gpgpu_sim->cycle_insn_cta_max_hit() || - !m_gpgpu_sim->active()) { - cleanup(finished_kernel_uid); - } - - if (sim_cycles) { - m_gpgpu_sim->update_stats(); - m_gpgpu_context->print_simulation_time(); - } - - if (m_gpgpu_sim->cycle_insn_cta_max_hit()) { - printf( - "GPGPU-Sim: ** break due to reaching the maximum cycles (or " - "instructions) **\n"); - fflush(stdout); - break; - } - } -} - -void accel_sim_framework::parse_commandlist() { - // gulp up as many commands as possible - either cpu_gpu_mem_copy - // or kernel_launch - until the vector "kernels_info" has reached - // the window_size or we have read every command from commandlist - while (kernels_info.size() < window_size && commandlist_index < commandlist.size()) { - trace_kernel_info_t *kernel_info = NULL; - if (commandlist[commandlist_index].m_type == command_type::cpu_gpu_mem_copy) { - size_t addre, Bcount; - tracer.parse_memcpy_info(commandlist[commandlist_index].command_string, addre, Bcount); - std::cout << "launching memcpy command : " - << commandlist[commandlist_index].command_string << std::endl; - m_gpgpu_sim->perf_memcpy_to_gpu(addre, Bcount); - commandlist_index++; - } else if (commandlist[commandlist_index].m_type == command_type::kernel_launch) { - // Read trace header info for window_size number of kernels - kernel_trace_t *kernel_trace_info = - tracer.parse_kernel_info(commandlist[commandlist_index].command_string); - kernel_info = create_kernel_info(kernel_trace_info, m_gpgpu_context, - &tconfig, &tracer); - kernels_info.push_back(kernel_info); - std::cout << "Header info loaded for kernel command : " - << commandlist[commandlist_index].command_string << std::endl; - commandlist_index++; - } else { - // unsupported commands will fail the simulation - assert(0 && "Undefined Command"); - } - } -} - -void accel_sim_framework::cleanup(unsigned finished_kernel) { - trace_kernel_info_t *k = NULL; - unsigned long long finished_kernel_cuda_stream_id = -1; - for (unsigned j = 0; j < kernels_info.size(); j++) { - k = kernels_info.at(j); - if (k->get_uid() == finished_kernel || - m_gpgpu_sim->cycle_insn_cta_max_hit() || !m_gpgpu_sim->active()) { - for (unsigned int l = 0; l < busy_streams.size(); l++) { - if (busy_streams.at(l) == k->get_cuda_stream_id()) { - finished_kernel_cuda_stream_id = k->get_cuda_stream_id(); - busy_streams.erase(busy_streams.begin() + l); - break; - } - } - tracer.kernel_finalizer(k->get_trace_info()); - delete k->entry(); - delete k; - kernels_info.erase(kernels_info.begin() + j); - if (!m_gpgpu_sim->cycle_insn_cta_max_hit() && m_gpgpu_sim->active()) - break; - } - } - assert(k); - m_gpgpu_sim->print_stats(finished_kernel_cuda_stream_id); -} - -unsigned accel_sim_framework::simulate() { - unsigned finished_kernel_uid = 0; - do { - if (!m_gpgpu_sim->active()) break; - - // performance simulation - if (m_gpgpu_sim->active()) { - m_gpgpu_sim->cycle(); - sim_cycles = true; - m_gpgpu_sim->deadlock_check(); - } else { - if (m_gpgpu_sim->cycle_insn_cta_max_hit()) { - m_gpgpu_context->the_gpgpusim->g_stream_manager - ->stop_all_running_kernels(); - break; - } - } - - active = m_gpgpu_sim->active(); - finished_kernel_uid = m_gpgpu_sim->finished_kernel(); - } while (active && !finished_kernel_uid); - return finished_kernel_uid; -} - -trace_kernel_info_t *accel_sim_framework::create_kernel_info(kernel_trace_t *kernel_trace_info, - gpgpu_context *m_gpgpu_context, - trace_config *config, - trace_parser *parser) { - gpgpu_ptx_sim_info info; - info.smem = kernel_trace_info->shmem; - info.regs = kernel_trace_info->nregs; - dim3 gridDim(kernel_trace_info->grid_dim_x, kernel_trace_info->grid_dim_y, - kernel_trace_info->grid_dim_z); - dim3 blockDim(kernel_trace_info->tb_dim_x, kernel_trace_info->tb_dim_y, - kernel_trace_info->tb_dim_z); - trace_function_info *function_info = - new trace_function_info(info, m_gpgpu_context); - function_info->set_name(kernel_trace_info->kernel_name.c_str()); - trace_kernel_info_t *kernel_info = new trace_kernel_info_t( - gridDim, blockDim, function_info, parser, config, kernel_trace_info); - - return kernel_info; -} - -gpgpu_sim *accel_sim_framework::gpgpu_trace_sim_init_perf_model( - int argc, const char *argv[], gpgpu_context *m_gpgpu_context, - trace_config *m_config) { - srand(1); - print_splash(); - - option_parser_t opp = option_parser_create(); - - m_gpgpu_context->ptx_reg_options(opp); - m_gpgpu_context->func_sim->ptx_opcocde_latency_options(opp); - - icnt_reg_options(opp); - - m_gpgpu_context->the_gpgpusim->g_the_gpu_config = - new gpgpu_sim_config(m_gpgpu_context); - m_gpgpu_context->the_gpgpusim->g_the_gpu_config->reg_options( - opp); // register GPU microrachitecture options - m_config->reg_options(opp); - - option_parser_cmdline(opp, argc, argv); // parse configuration options - fprintf(stdout, "GPGPU-Sim: Configuration options:\n\n"); - option_parser_print(opp, stdout); - // Set the Numeric locale to a standard locale where a decimal point is a - // "dot" not a "comma" so it does the parsing correctly independent of the - // system environment variables - assert(setlocale(LC_NUMERIC, "C")); - m_gpgpu_context->the_gpgpusim->g_the_gpu_config->init(); - - m_gpgpu_context->the_gpgpusim->g_the_gpu = new trace_gpgpu_sim( - *(m_gpgpu_context->the_gpgpusim->g_the_gpu_config), m_gpgpu_context); - - m_gpgpu_context->the_gpgpusim->g_stream_manager = - new stream_manager((m_gpgpu_context->the_gpgpusim->g_the_gpu), - m_gpgpu_context->func_sim->g_cuda_launch_blocking); - - m_gpgpu_context->the_gpgpusim->g_simulation_starttime = time((time_t *)NULL); - - return m_gpgpu_context->the_gpgpusim->g_the_gpu; -} \ No newline at end of file diff --git a/gpu-simulator/accel-sim.h b/gpu-simulator/accel-sim.h deleted file mode 100644 index 3e425dbae..000000000 --- a/gpu-simulator/accel-sim.h +++ /dev/null @@ -1,74 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "../ISA_Def/trace_opcode.h" -#include "../trace-parser/trace_parser.h" -#include "abstract_hardware_model.h" -#include "cuda-sim/cuda-sim.h" -#include "gpgpu-sim/gpu-sim.h" -#include "gpgpu-sim/icnt_wrapper.h" -#include "gpgpu_context.h" -#include "gpgpusim_entrypoint.h" -#include "option_parser.h" -#include "trace_driven.h" - -class accel_sim_framework { - public: - accel_sim_framework(int argc, const char **argv); - accel_sim_framework(std::string config_file, std::string trace_file); - - void init() { - active = false; - sim_cycles = false; - window_size = 0; - commandlist_index = 0; - - assert(m_gpgpu_context); - assert(m_gpgpu_sim); - - concurrent_kernel_sm = - m_gpgpu_sim->getShaderCoreConfig()->gpgpu_concurrent_kernel_sm; - window_size = concurrent_kernel_sm - ? m_gpgpu_sim->get_config().get_max_concurrent_kernel() - : 1; - assert(window_size > 0); - commandlist = tracer.parse_commandlist_file(); - - kernels_info.reserve(window_size); - } - void simulation_loop(); - void parse_commandlist(); - void cleanup(unsigned finished_kernel); - unsigned simulate(); - trace_kernel_info_t *create_kernel_info(kernel_trace_t *kernel_trace_info, - gpgpu_context *m_gpgpu_context, - trace_config *config, - trace_parser *parser); - gpgpu_sim *gpgpu_trace_sim_init_perf_model(int argc, const char *argv[], - gpgpu_context *m_gpgpu_context, - trace_config *m_config); - - - private: - gpgpu_context *m_gpgpu_context; - trace_config tconfig; - trace_parser tracer; - gpgpu_sim *m_gpgpu_sim; - - bool concurrent_kernel_sm; - bool active; - bool sim_cycles; - unsigned window_size; - unsigned commandlist_index; - - std::vector busy_streams; - std::vector kernels_info; - std::vector commandlist; - -}; \ No newline at end of file diff --git a/gpu-simulator/main.cc b/gpu-simulator/main.cc index 37002a66f..f9fd88cf4 100644 --- a/gpu-simulator/main.cc +++ b/gpu-simulator/main.cc @@ -1,7 +1,26 @@ // developed by Mahmoud Khairy, Purdue Univ // abdallm@purdue.edu -#include "accel-sim.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../ISA_Def/trace_opcode.h" +#include "../trace-parser/trace_parser.h" +#include "abstract_hardware_model.h" +#include "accelsim_version.h" +#include "cuda-sim/cuda-sim.h" +#include "gpgpu-sim/gpu-sim.h" +#include "gpgpu-sim/icnt_wrapper.h" +#include "gpgpu_context.h" +#include "gpgpusim_entrypoint.h" +#include "option_parser.h" +#include "trace_driven.h" /* TO DO: * NOTE: the current version of trace-driven is functionally working fine, @@ -25,9 +44,160 @@ * change the tracer */ +gpgpu_sim *gpgpu_trace_sim_init_perf_model(int argc, const char *argv[], + gpgpu_context *m_gpgpu_context, + class trace_config *m_config); + +trace_kernel_info_t *create_kernel_info(kernel_trace_t *kernel_trace_info, + gpgpu_context *m_gpgpu_context, + class trace_config *config, + trace_parser *parser); + int main(int argc, const char **argv) { - accel_sim_framework accel_sim(argc, argv); - accel_sim.simulation_loop(); + std::cout << "Accel-Sim [build " << g_accelsim_version << "]"; + gpgpu_context *m_gpgpu_context = new gpgpu_context(); + trace_config tconfig; + + gpgpu_sim *m_gpgpu_sim = + gpgpu_trace_sim_init_perf_model(argc, argv, m_gpgpu_context, &tconfig); + m_gpgpu_sim->init(); + + trace_parser tracer(tconfig.get_traces_filename()); + + tconfig.parse_config(); + + // for each kernel + // load file + // parse and create kernel info + // launch + // while loop till the end of the end kernel execution + // prints stats + bool concurrent_kernel_sm = + m_gpgpu_sim->getShaderCoreConfig()->gpgpu_concurrent_kernel_sm; + unsigned window_size = + concurrent_kernel_sm + ? m_gpgpu_sim->get_config().get_max_concurrent_kernel() + : 1; + assert(window_size > 0); + std::vector commandlist = tracer.parse_commandlist_file(); + std::vector busy_streams; + std::vector kernels_info; + kernels_info.reserve(window_size); + + unsigned i = 0; + while (i < commandlist.size() || !kernels_info.empty()) { + // gulp up as many commands as possible - either cpu_gpu_mem_copy + // or kernel_launch - until the vector "kernels_info" has reached + // the window_size or we have read every command from commandlist + while (kernels_info.size() < window_size && i < commandlist.size()) { + trace_kernel_info_t *kernel_info = NULL; + if (commandlist[i].m_type == command_type::cpu_gpu_mem_copy) { + size_t addre, Bcount; + tracer.parse_memcpy_info(commandlist[i].command_string, addre, Bcount); + std::cout << "launching memcpy command : " + << commandlist[i].command_string << std::endl; + m_gpgpu_sim->perf_memcpy_to_gpu(addre, Bcount); + i++; + } else if (commandlist[i].m_type == command_type::kernel_launch) { + // Read trace header info for window_size number of kernels + kernel_trace_t *kernel_trace_info = + tracer.parse_kernel_info(commandlist[i].command_string); + kernel_info = create_kernel_info(kernel_trace_info, m_gpgpu_context, + &tconfig, &tracer); + kernels_info.push_back(kernel_info); + std::cout << "Header info loaded for kernel command : " + << commandlist[i].command_string << std::endl; + i++; + } else { + // unsupported commands will fail the simulation + assert(0 && "Undefined Command"); + } + } + + // Launch all kernels within window that are on a stream that isn't already + // running + for (auto k : kernels_info) { + bool stream_busy = false; + for (auto s : busy_streams) { + if (s == k->get_cuda_stream_id()) stream_busy = true; + } + if (!stream_busy && m_gpgpu_sim->can_start_kernel() && + !k->was_launched()) { + std::cout << "launching kernel name: " << k->get_name() + << " uid: " << k->get_uid() + << " cuda_stream_id: " << k->get_cuda_stream_id() + << std::endl; + m_gpgpu_sim->launch(k); + k->set_launched(); + busy_streams.push_back(k->get_cuda_stream_id()); + } + } + + bool active = false; + bool sim_cycles = false; + unsigned finished_kernel_uid = 0; + + do { + if (!m_gpgpu_sim->active()) break; + + // performance simulation + if (m_gpgpu_sim->active()) { + m_gpgpu_sim->cycle(); + sim_cycles = true; + m_gpgpu_sim->deadlock_check(); + } else { + if (m_gpgpu_sim->cycle_insn_cta_max_hit()) { + m_gpgpu_context->the_gpgpusim->g_stream_manager + ->stop_all_running_kernels(); + break; + } + } + + active = m_gpgpu_sim->active(); + finished_kernel_uid = m_gpgpu_sim->finished_kernel(); + } while (active && !finished_kernel_uid); + + // cleanup finished kernel + if (finished_kernel_uid || m_gpgpu_sim->cycle_insn_cta_max_hit() || + !m_gpgpu_sim->active()) { + trace_kernel_info_t *k = NULL; + unsigned long long finished_kernel_cuda_stream_id = -1; + for (unsigned j = 0; j < kernels_info.size(); j++) { + k = kernels_info.at(j); + if (k->get_uid() == finished_kernel_uid || + m_gpgpu_sim->cycle_insn_cta_max_hit() || !m_gpgpu_sim->active()) { + for (unsigned int l = 0; l < busy_streams.size(); l++) { + if (busy_streams.at(l) == k->get_cuda_stream_id()) { + finished_kernel_cuda_stream_id = k->get_cuda_stream_id(); + busy_streams.erase(busy_streams.begin() + l); + break; + } + } + tracer.kernel_finalizer(k->get_trace_info()); + delete k->entry(); + delete k; + kernels_info.erase(kernels_info.begin() + j); + if (!m_gpgpu_sim->cycle_insn_cta_max_hit() && m_gpgpu_sim->active()) + break; + } + } + assert(k); + m_gpgpu_sim->print_stats(finished_kernel_cuda_stream_id); + } + + if (sim_cycles) { + m_gpgpu_sim->update_stats(); + m_gpgpu_context->print_simulation_time(); + } + + if (m_gpgpu_sim->cycle_insn_cta_max_hit()) { + printf( + "GPGPU-Sim: ** break due to reaching the maximum cycles (or " + "instructions) **\n"); + fflush(stdout); + break; + } + } // we print this message to inform the gpgpu-simulation stats_collect script // that we are done @@ -37,3 +207,63 @@ int main(int argc, const char **argv) { return 0; } + +trace_kernel_info_t *create_kernel_info(kernel_trace_t *kernel_trace_info, + gpgpu_context *m_gpgpu_context, + class trace_config *config, + trace_parser *parser) { + gpgpu_ptx_sim_info info; + info.smem = kernel_trace_info->shmem; + info.regs = kernel_trace_info->nregs; + dim3 gridDim(kernel_trace_info->grid_dim_x, kernel_trace_info->grid_dim_y, + kernel_trace_info->grid_dim_z); + dim3 blockDim(kernel_trace_info->tb_dim_x, kernel_trace_info->tb_dim_y, + kernel_trace_info->tb_dim_z); + trace_function_info *function_info = + new trace_function_info(info, m_gpgpu_context); + function_info->set_name(kernel_trace_info->kernel_name.c_str()); + trace_kernel_info_t *kernel_info = new trace_kernel_info_t( + gridDim, blockDim, function_info, parser, config, kernel_trace_info); + + return kernel_info; +} + +gpgpu_sim *gpgpu_trace_sim_init_perf_model(int argc, const char *argv[], + gpgpu_context *m_gpgpu_context, + trace_config *m_config) { + srand(1); + print_splash(); + + option_parser_t opp = option_parser_create(); + + m_gpgpu_context->ptx_reg_options(opp); + m_gpgpu_context->func_sim->ptx_opcocde_latency_options(opp); + + icnt_reg_options(opp); + + m_gpgpu_context->the_gpgpusim->g_the_gpu_config = + new gpgpu_sim_config(m_gpgpu_context); + m_gpgpu_context->the_gpgpusim->g_the_gpu_config->reg_options( + opp); // register GPU microrachitecture options + m_config->reg_options(opp); + + option_parser_cmdline(opp, argc, argv); // parse configuration options + fprintf(stdout, "GPGPU-Sim: Configuration options:\n\n"); + option_parser_print(opp, stdout); + // Set the Numeric locale to a standard locale where a decimal point is a + // "dot" not a "comma" so it does the parsing correctly independent of the + // system environment variables + assert(setlocale(LC_NUMERIC, "C")); + m_gpgpu_context->the_gpgpusim->g_the_gpu_config->init(); + + m_gpgpu_context->the_gpgpusim->g_the_gpu = new trace_gpgpu_sim( + *(m_gpgpu_context->the_gpgpusim->g_the_gpu_config), m_gpgpu_context); + + m_gpgpu_context->the_gpgpusim->g_stream_manager = + new stream_manager((m_gpgpu_context->the_gpgpusim->g_the_gpu), + m_gpgpu_context->func_sim->g_cuda_launch_blocking); + + m_gpgpu_context->the_gpgpusim->g_simulation_starttime = time((time_t *)NULL); + + return m_gpgpu_context->the_gpgpusim->g_the_gpu; +} diff --git a/gpu-simulator/python_wrapper/python_wrapper.cc b/gpu-simulator/python_wrapper/python_wrapper.cc deleted file mode 100644 index a535ffb7d..000000000 --- a/gpu-simulator/python_wrapper/python_wrapper.cc +++ /dev/null @@ -1,16 +0,0 @@ -#include "python_wrapper.h" - -namespace py = pybind11; - - - -PYBIND11_MODULE(accel_sim, m) { - py::class_(m, "accel_sim_framework") - .def(py::init()) - .def("init", &accel_sim_framework::init) - .def("simulation_loop", &accel_sim_framework::simulation_loop) - .def("parse_commandlist", &accel_sim_framework::parse_commandlist) - .def("cleanup", &accel_sim_framework::cleanup) - .def("simulate", &accel_sim_framework::simulate); - -} \ No newline at end of file diff --git a/gpu-simulator/python_wrapper/python_wrapper.h b/gpu-simulator/python_wrapper/python_wrapper.h deleted file mode 100644 index ee25aea05..000000000 --- a/gpu-simulator/python_wrapper/python_wrapper.h +++ /dev/null @@ -1,4 +0,0 @@ -#include "../accel-sim.h" - -#include -#include diff --git a/gpu-simulator/setup_environment.sh b/gpu-simulator/setup_environment.sh index eef25633a..cfe9c7c9c 100755 --- a/gpu-simulator/setup_environment.sh +++ b/gpu-simulator/setup_environment.sh @@ -69,14 +69,8 @@ else source $GPGPUSIM_ROOT/setup_environment $ACCELSIM_CONFIG || return 1 fi -if [ ! -d "$ACCELSIM_ROOT/extern/pybind11" ] ; then - git clone --depth 1 -b master https://github.com/pybind/pybind11.git $ACCELSIM_ROOT/extern/pybind11 -fi - -export PYTHONPATH=$ACCELSIM_ROOT/build/$ACCELSIM_CONFIG:$PYTHONPATH echo "Using GPGPU-Sim in $GPGPUSIM_ROOT" #echo "If that is not the intended behavior, then run: \"unset GPGPUSIM_ROOT; unset GPGPUSIM_SETUP_ENVIRONMENT_WAS_RUN\"." - echo "Accel-Sim setup succeeded." export ACCELSIM_SETUP_ENVIRONMENT_WAS_RUN=1