summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml32
-rw-r--r--CHANGES2
-rw-r--r--Makefile8
-rw-r--r--README3
-rw-r--r--libcuda/cuda_runtime_api.cc7
-rw-r--r--libopencl/opencl_runtime_api.cc2
-rw-r--r--setup_environment2
-rw-r--r--src/cuda-sim/Makefile4
-rw-r--r--src/cuda-sim/cuda-sim.cc5
-rw-r--r--src/cuda-sim/ptx_ir.cc2
-rw-r--r--version1
-rw-r--r--version_detection.mk7
12 files changed, 51 insertions, 24 deletions
diff --git a/.travis.yml b/.travis.yml
index 18fcd7a..fabfc5b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,23 @@
-dist: trusty
-before_install:
- - wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb
- - sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb
- - sudo apt-get -qq update
- - sudo apt-get install -y cuda
- - sudo apt-get install -y build-essential xutils-dev bison zlib1g-dev flex libglu1-mesa-dev
-env:
- - CUDA_INSTALL_PATH=/usr/local/cuda-7.5/
+sudo: required
+
+before_install:
+ - docker pull tgrogers/gpgpu-sim_regress:latest
+
language: cpp
-script: source ./setup_environment && make
+
+
+matrix:
+ include:
+ - services: docker
+ env: CONFIG=configs.gtx480.yml
+# This config is just taking far too long...
+# - services: docker
+# env: CONFIG=configs.gtx750ti.yml
+ - services: docker
+ env: CONFIG=configs.quadro5600.yml
+ - services: docker
+ env: CONFIG=configs.quadro5800.yml
+ - services: docker
+ env: CONFIG=configs.teslac2050.yml
+
+script: docker run -v `pwd`:/home/runner/gpgpu-sim_distribution:rw tgrogers/gpgpu-sim_regress:latest /bin/bash -c "./start_torque.sh; chown -R runner /home/runner/gpgpu-sim_distribution; su - runner -c 'source /home/runner/gpgpu-sim_distribution/setup_environment && make -j -C /home/runner/gpgpu-sim_distribution && cd /home/runner/gpgpu-sim_simulations/ && git pull && /home/runner/gpgpu-sim_simulations/util/job_launching/run_simulations.py -c /home/runner/gpgpu-sim_simulations/util/job_launching/regression_recipies/rodinia_2.0-ft/$CONFIG -N regress && /home/runner/gpgpu-sim_simulations/util/job_launching/monitor_func_test.py -v -N regress'"
diff --git a/CHANGES b/CHANGES
index e3b3177..dbf5b39 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
LOG:
Version 3.2.3+edits (development branch) versus 3.2.3
+- Support for running regression tests using Travis
+- Support added for CUDA dynamic parallelism (courtesy of Jin Wang from Georgia Tech)
- Added a parameter to the cache configuration to configure the set index
function. Added a hash set index function to the Fermi L1 data cache for
the two default cache sizes, 16KB/48KB with 32/64 sets.
diff --git a/Makefile b/Makefile
index a044648..e83de9a 100644
--- a/Makefile
+++ b/Makefile
@@ -54,6 +54,9 @@ ifneq ($(shell which nvcc), "")
endif
endif
+
+$(shell mkdir -p $(SIM_OBJ_FILES_DIR)/libcuda && echo "const char *g_gpgpusim_build_string=\"$(GPGPUSIM_BUILD)\";" > $(SIM_OBJ_FILES_DIR)/detailed_version)
+
LIBS = cuda-sim gpgpu-sim_uarch $(INTERSIM) gpgpusimlib
@@ -140,7 +143,7 @@ no_opencl_support:
@echo "Warning: gpgpu-sim is building without opencl support. Make sure NVOPENCL_LIBDIR and NVOPENCL_INCDIR are set"
$(SIM_LIB_DIR)/libcudart.so: makedirs $(LIBS) cudalib
- g++ -shared -Wl,-soname,libcudart.so \
+ g++ -shared -Wl,-soname,libcudart_$(GPGPUSIM_BUILD).so \
$(SIM_OBJ_FILES_DIR)/libcuda/*.o \
$(SIM_OBJ_FILES_DIR)/cuda-sim/*.o \
$(SIM_OBJ_FILES_DIR)/cuda-sim/decuda_pred_table/*.o \
@@ -157,6 +160,7 @@ $(SIM_LIB_DIR)/libcudart.so: makedirs $(LIBS) cudalib
if [ ! -f $(SIM_LIB_DIR)/libcudart.so.6.0 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.6.0; fi
if [ ! -f $(SIM_LIB_DIR)/libcudart.so.6.5 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.6.5; fi
if [ ! -f $(SIM_LIB_DIR)/libcudart.so.7.5 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.7.5; fi
+ if [ ! -f $(SIM_LIB_DIR)/libcudart.so.8.0 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.8.0; fi
$(SIM_LIB_DIR)/libcudart.dylib: makedirs $(LIBS) cudalib
g++ -dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-compatibility_version,1.1,-current_version,1.1\
@@ -170,7 +174,7 @@ $(SIM_LIB_DIR)/libcudart.dylib: makedirs $(LIBS) cudalib
-o $(SIM_LIB_DIR)/libcudart.dylib
$(SIM_LIB_DIR)/libOpenCL.so: makedirs $(LIBS) opencllib
- g++ -shared -Wl,-soname,libOpenCL.so \
+ g++ -shared -Wl,-soname,libOpenCL_$(GPGPUSIM_BUILD).so \
$(SIM_OBJ_FILES_DIR)/libopencl/*.o \
$(SIM_OBJ_FILES_DIR)/cuda-sim/*.o \
$(SIM_OBJ_FILES_DIR)/cuda-sim/decuda_pred_table/*.o \
diff --git a/README b/README
index 4eb0651..6e2d734 100644
--- a/README
+++ b/README
@@ -5,7 +5,8 @@ AerialVision and a configurable and extensible energy model called GPUWattch.
GPGPU-Sim and GPUWattch have been rigorously validated with performance and
power measurements of real hardware GPUs.
-This version of GPGPU-Sim has been tested with CUDA version 2.3, 3.1 and 4.0.
+This version of GPGPU-Sim has been tested with CUDA version 2.3, 3.1, 4.0,
+5.0, 5.5, 6.0 and 7.5.
Please see the copyright notice in the file COPYRIGHT distributed with this
release in the same directory as this file.
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index 8d717c5..cbe8a11 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -126,7 +126,9 @@
#include "host_defines.h"
#include "builtin_types.h"
#include "driver_types.h"
+#if (CUDART_VERSION < 8000)
#include "__cudaFatFormat.h"
+#endif
#include "../src/gpgpu-sim/gpu-sim.h"
#include "../src/cuda-sim/ptx_loader.h"
#include "../src/cuda-sim/cuda-sim.h"
@@ -1795,7 +1797,9 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin )
cuobjdumpRegisterFatBinary(fat_cubin_handle, filename);
return (void**)fat_cubin_handle;
- } else {
+ }
+ #if (CUDART_VERSION < 8000)
+ else {
static unsigned source_num=1;
unsigned long long fat_cubin_handle = next_fat_bin_handle++;
__cudaFatCudaBinary *info = (__cudaFatCudaBinary *)fatCubin;
@@ -1852,6 +1856,7 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin )
}
return (void**)fat_cubin_handle;
}
+ #endif
}
void __cudaUnregisterFatBinary(void **fatCubinHandle)
diff --git a/libopencl/opencl_runtime_api.cc b/libopencl/opencl_runtime_api.cc
index 020384f..63f7c81 100644
--- a/libopencl/opencl_runtime_api.cc
+++ b/libopencl/opencl_runtime_api.cc
@@ -74,7 +74,9 @@
#define __CUDA_RUNTIME_API_H__
#include "host_defines.h"
#include "builtin_types.h"
+#if (CUDART_VERSION < 8000)
#include "__cudaFatFormat.h"
+#endif
#include "../src/abstract_hardware_model.h"
#include "../src/cuda-sim/cuda-sim.h"
#include "../src/cuda-sim/ptx_loader.h"
diff --git a/setup_environment b/setup_environment
index 2684514..854a335 100644
--- a/setup_environment
+++ b/setup_environment
@@ -43,7 +43,7 @@ CC_VERSION=`gcc --version | head -1 | awk '{for(i=1;i<=NF;i++){ if(match($i,/^[0
CUDA_VERSION_STRING=`$CUDA_INSTALL_PATH/bin/nvcc --version | awk '/release/ {print $5;}' | sed 's/,//'`;
CUDA_VERSION_NUMBER=`echo $CUDA_VERSION_STRING | sed 's/\./ /' | awk '{printf("%02u%02u", 10*int($1), 10*$2);}'`
-if [ $CUDA_VERSION_NUMBER -gt 7500 -o $CUDA_VERSION_NUMBER -lt 2030 ]; then
+if [ $CUDA_VERSION_NUMBER -gt 8000 -o $CUDA_VERSION_NUMBER -lt 2030 ]; then
echo "ERROR ** GPGPU-Sim version $GPGPUSIM_VERSION_STRING not tested with CUDA version $CUDA_VERSION_STRING (please see README)";
return
elif [ $CUDA_VERSION_NUMBER -gt 4020 ]; then
diff --git a/src/cuda-sim/Makefile b/src/cuda-sim/Makefile
index f479294..999dad7 100644
--- a/src/cuda-sim/Makefile
+++ b/src/cuda-sim/Makefile
@@ -46,7 +46,7 @@ OPT := -O3 -g3 -Wall -Wno-unused-function -Wno-sign-compare
ifeq ($(DEBUG),1)
OPT := -g3 -Wall -Wno-unused-function -Wno-sign-compare
endif
-OPT += -I$(CUDA_INSTALL_PATH)/include -I$(OUTPUT_DIR)/ -I.
+OPT += -I$(CUDA_INSTALL_PATH)/include -I$(OUTPUT_DIR)/ -I. -I$(SIM_OBJ_FILES_DIR)
OPT += -fPIC
ifeq ($(TRACE),1)
@@ -142,7 +142,7 @@ $(OUTPUT_DIR)/ptx_parser.o: $(OUTPUT_DIR)/ptx.tab.c $(OUTPUT_DIR)/ptx_parser_dec
$(OUTPUT_DIR)/ptxinfo.tab.o: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/ptx-stats.o: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/ptx_sim.o: $(OUTPUT_DIR)/ptx.tab.c
-$(OUTPUT_DIR)/cuda-sim.o: $(OUTPUT_DIR)/ptx.tab.c
+$(OUTPUT_DIR)/cuda-sim.o: $(OUTPUT_DIR)/ptx.tab.c $(SIM_OBJ_FILES_DIR)/detailed_version
$(OUTPUT_DIR)/lex.ptxinfo_.o: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/lex.ptx_.o: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/cuda_device_runtime.o: $(OUTPUT_DIR)/ptx.tab.c
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc
index 7ec3ce9..d4ace76 100644
--- a/src/cuda-sim/cuda-sim.cc
+++ b/src/cuda-sim/cuda-sim.cc
@@ -1623,14 +1623,13 @@ kernel_info_t *gpgpu_opencl_ptx_sim_init_grid(class function_info *entry,
}
#include "../../version"
+#include "detailed_version"
void print_splash()
{
static int splash_printed=0;
if ( !splash_printed ) {
- unsigned build=0;
- sscanf(g_gpgpusim_build_string, "$Change"": %u $", &build);
- fprintf(stdout, "\n\n *** %s [build %u] ***\n\n\n", g_gpgpusim_version_string, build );
+ fprintf(stdout, "\n\n *** %s [build %s] ***\n\n\n", g_gpgpusim_version_string, g_gpgpusim_build_string );
splash_printed=1;
}
}
diff --git a/src/cuda-sim/ptx_ir.cc b/src/cuda-sim/ptx_ir.cc
index 1805ce9..8ebdcf8 100644
--- a/src/cuda-sim/ptx_ir.cc
+++ b/src/cuda-sim/ptx_ir.cc
@@ -498,7 +498,7 @@ void function_info::connect_basic_blocks( ) //iterate across m_basic_blocks of f
if( pI->has_pred() ) {
printf("GPGPU-Sim PTX: Warning detected predicated return/exit.\n");
// if predicated, add link to next block
- unsigned next_addr = pI->get_m_instr_mem_index() + 1;
+ unsigned next_addr = pI->get_m_instr_mem_index() + pI->inst_size();
if( next_addr < m_instr_mem_size && m_instr_mem[next_addr] ) {
basic_block_t *next_bb = m_instr_mem[next_addr]->get_bb();
(*bb_itr)->successor_ids.insert(next_bb->bb_id);
diff --git a/version b/version
index e565a98..c70c6ac 100644
--- a/version
+++ b/version
@@ -1,2 +1 @@
const char *g_gpgpusim_version_string = "GPGPU-Sim Simulator Version 3.2.2 ";
-const char *g_gpgpusim_build_string = "$Change$";
diff --git a/version_detection.mk b/version_detection.mk
index 8796d5c..00a86c0 100644
--- a/version_detection.mk
+++ b/version_detection.mk
@@ -30,7 +30,11 @@
ifeq ($(GPGPUSIM_ROOT),)
else
GPGPUSIM_VERSION=$(shell cat $(GPGPUSIM_ROOT)/version | awk '/Version/ {print $$8}' )
-GPGPUSIM_BUILD=$(shell cat $(GPGPUSIM_ROOT)/version | awk '/Change/ {print $$6}' )
+
+#Detect Git branch and commit #
+GIT_COMMIT := $(shell git log -n 1 | head -1 | sed -re 's/commit (.*)/\1/')
+GIT_FILES_CHANGED := $(shell git diff --numstat --cached && git diff --numstat | wc | sed -re 's/^\s+([0-9]+).*/\1/')
+GPGPUSIM_BUILD := "gpgpu-sim_git-commit-$(GIT_COMMIT)_modified_$(GIT_FILES_CHANGED)"
endif
# Detect CUDA Runtime Version
@@ -42,4 +46,3 @@ CC_VERSION := $(shell gcc --version | head -1 | awk '{for(i=1;i<=NF;i++){ if(mat
# Detect Support for C++11 (C++0x) from GCC Version
GNUC_CPP0X := $(shell gcc --version | perl -ne 'if (/gcc\s+\(.*\)\s+([0-9.]+)/){ if($$1 >= 4.3) {$$n=1} else {$$n=0;} } END { print $$n; }')
-