Skip to content

Commit

Permalink
revert python frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
JRPan committed Sep 3, 2024
1 parent f783a4c commit 9804920
Show file tree
Hide file tree
Showing 8 changed files with 294 additions and 395 deletions.
15 changes: 1 addition & 14 deletions gpu-simulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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})
11 changes: 5 additions & 6 deletions gpu-simulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
230 changes: 0 additions & 230 deletions gpu-simulator/accel-sim.cc

This file was deleted.

74 changes: 0 additions & 74 deletions gpu-simulator/accel-sim.h

This file was deleted.

Loading

0 comments on commit 9804920

Please sign in to comment.