summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Rogers <[email protected]>2019-03-12 20:25:38 -0400
committerGitHub <[email protected]>2019-03-12 20:25:38 -0400
commit2e4669fdc12f251c60158e8b49d0bf74e5b17bef (patch)
treea20c217b18858738a3a9ce7cba77e046e9134299
parent695592593ac59be49bdc013814710e216d18a438 (diff)
parent49e95cdb5086d4ce4f7d7f2d295b5fc0a9529d41 (diff)
Merge pull request #1 from gpgpu-sim/dev
Merging the latest dev
-rw-r--r--Jenkinsfile9
-rw-r--r--README12
-rw-r--r--libcuda/cuda_runtime_api.cc95
-rw-r--r--src/abstract_hardware_model.h1
-rw-r--r--src/cuda-sim/cuda-sim.cc2
-rw-r--r--src/cuda-sim/instructions.cc2
6 files changed, 81 insertions, 40 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 1969aea..4bdbddf 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -24,9 +24,8 @@ pipeline {
stage('simulations-build'){
steps{
sh 'rm -rf gpgpu-sim_simulations'
- sh 'git clone [email protected]:TimRogersGroup/gpgpu-sim_simulations.git && \
+ sh 'git clone [email protected]:gpgpu-sim/gpgpu-sim_simulations.git && \
cd gpgpu-sim_simulations && \
- git checkout purdue-cluster && \
git pull && \
ln -s /home/tgrogers-raid/a/common/data_dirs benchmarks/'
sh 'source /home/tgrogers-raid/a/common/gpgpu-sim-setup/4.2_env_setup.sh &&\
@@ -55,7 +54,7 @@ pipeline {
}, "9.1-functest": {
sh 'source /home/tgrogers-raid/a/common/gpgpu-sim-setup/9.1_env_setup.sh &&\
source `pwd`/setup_environment &&\
- ./gpgpu-sim_simulations/util/job_launching/run_simulations.py -B rodinia_2.0-ft,sdk-4.2 -C TITANX,TITANX-L1ON -N regress-$$ && \
+ ./gpgpu-sim_simulations/util/job_launching/run_simulations.py -B rodinia_2.0-ft,sdk-4.2 -C TITANV -N regress-$$ && \
PLOTDIR="jenkins/${JOB_NAME}/${BUILD_NUMBER}/9.1-rodinia" && ssh [email protected] mkdir -p /home/dynamo/a/tgrogers/website/gpgpu-sim-plots/$PLOTDIR && \
./gpgpu-sim_simulations/util/job_launching/monitor_func_test.py -v -s stats-per-app-9.1.csv -N regress-$$ && \
./gpgpu-sim_simulations/util/plotting/plot-get-stats.py -c stats-per-app-9.1.csv -p [email protected]:~/website/gpgpu-sim-plots/$PLOTDIR -w https://engineering.purdue.edu/tgrogers/gpgpu-sim-plots/$PLOTDIR -n $PLOTDIR'
@@ -76,7 +75,7 @@ pipeline {
sh 'source /home/tgrogers-raid/a/common/gpgpu-sim-setup/9.1_env_setup.sh &&\
source `pwd`/setup_environment &&\
PLOTDIR="jenkins/${JOB_NAME}" &&\
- ./gpgpu-sim_simulations/util/job_launching/get_stats.py -R -K -k -B rodinia_2.0-ft,sdk-4.2 -C TITANX,TITANX-L1ON > stats-per-kernel-9.1.csv &&\
+ ./gpgpu-sim_simulations/util/job_launching/get_stats.py -R -K -k -B rodinia_2.0-ft,sdk-4.2 -C TITANV > stats-per-kernel-9.1.csv &&\
./gpgpu-sim_simulations/util/plotting/correlate_and_publish.sh stats-per-kernel-9.1.csv $PLOTDIR ${BUILD_NUMBER}'
}
}
@@ -88,7 +87,7 @@ pipeline {
./gpgpu-sim_simulations/util/job_launching/get_stats.py -R -K -k -B rodinia_2.0-ft -C GTX480-PTXPLUS > stats-per-kernel-4.2-ptxplus.csv &&\
./gpgpu-sim_simulations/util/job_launching/get_stats.py -R -K -k -B rodinia_2.0-ft -C GTX480 > stats-per-kernel-4.2-ptx.csv'
sh 'source /home/tgrogers-raid/a/common/gpgpu-sim-setup/9.1_env_setup.sh &&\
- ./gpgpu-sim_simulations/util/job_launching/get_stats.py -R -K -k -B rodinia_2.0-ft,sdk-4.2 -C TITANX > stats-per-kernel-9.1-titanx.csv'
+ ./gpgpu-sim_simulations/util/job_launching/get_stats.py -R -K -k -B rodinia_2.0-ft,sdk-4.2 -C TITANV > stats-per-kernel-9.1-titanx.csv'
sh './gpgpu-sim_simulations/util/plotting/merge-stats.py -c ./gpgpu-sim-results-repo/jenkins/quick-regress/AALP/gpgpu-sim_distribution/dev-purdue-integration/stats-per-app-4.2.csv,./stats-per-app-4.2.csv -R > per-app-merge-4.2.csv'
sh './gpgpu-sim_simulations/util/plotting/merge-stats.py -c ./gpgpu-sim-results-repo/jenkins/quick-regress/AALP/gpgpu-sim_distribution/dev-purdue-integration/stats-per-app-9.1.csv,./stats-per-app-9.1.csv -R > per-app-merge-9.1.csv'
sh 'PLOTDIR="jenkins/${JOB_NAME}" &&\
diff --git a/README b/README
index 8b8939c..998cb51 100644
--- a/README
+++ b/README
@@ -18,15 +18,23 @@ Analyzing CUDA Workloads Using a Detailed GPU Simulator, in IEEE International
Symposium on Performance Analysis of Systems and Software (ISPASS), Boston, MA,
April 19-21, 2009.
+If you use cuDNN and Pytorch support, the Checkpoint function or the Debigging tool for functional simulation error in GPGPU-Sim for your research,
+please cite:
+Jonathan Lew, Deval Shah, Suchita Pati, Shaylin Cattell, Mengchi Zhang, Amruth Sandhupatla, Christopher Ng, Negar Goli, Matthew D. Sinclair, Timothy G. Rogers, Tor M. Aamodt
+Analyzing Machine Learning Workloads Using a Detailed GPU Simulator, arXiv:1811.08933,
+https://arxiv.org/abs/1811.08933
+
If you use the memory system in GPGPU-Sim, or the Volta/Pascal models,
please cite:
Mahmoud Khairy, Jain Akshay, Tor Aamodt, Timothy G Rogers,
Exploring Modern GPU Memory System Design Challenges through Accurate Modeling, arXiv:1810.07269,
https://arxiv.org/abs/1810.07269
-If you use the tensorcore in GPGPU-Sim or CUTLASS Library in your research
+If you use the Tensor Core in GPGPU-Sim or CUTLASS Library for your research
please cite:
- add the arxiv link here
+Md Aamir Raihan, Negar Goli, Tor Aamodt,
+Modeling Deep Learning Accelerator Enabled GPUs, arXiv:1811.08309,
+https://arxiv.org/abs/1811.08309
If you use the GPUWattch energy model in your research, please cite:
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index 95a3c24..27644b3 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -1199,6 +1199,26 @@ __host__ cudaError_t CUDARTAPI cudaGetDevice(int *device)
*device = g_active_device;
return g_last_cudaError = cudaSuccess;
}
+__host__ cudaError_t CUDARTAPI cudaDeviceGetLimit ( size_t* pValue, cudaLimit limit )
+{
+ if(g_debug_execution >= 3){
+ announce_call(__my_func__);
+ }
+ cuda_not_implemented(__my_func__,__LINE__);
+ return g_last_cudaError = cudaSuccess;
+
+}
+
+
+__host__ cudaError_t CUDARTAPI cudaStreamGetPriority ( cudaStream_t hStream, int* priority )
+{
+ if(g_debug_execution >= 3){
+ announce_call(__my_func__);
+ }
+ cuda_not_implemented(__my_func__,__LINE__);
+ return g_last_cudaError = cudaSuccess;
+
+}
__host__ cudaError_t CUDARTAPI cudaDeviceGetPCIBusId (
char *pciBusId,
@@ -1235,6 +1255,16 @@ __host__ cudaError_t cudaIpcOpenMemHandle(
return g_last_cudaError = cudaErrorUnknown;
}
+__host__ cudaError_t CUDARTAPI cudaDestroyTextureObject(cudaTextureObject_t texObject)
+{
+ if(g_debug_execution >= 3){
+ announce_call(__my_func__);
+ }
+ cuda_not_implemented(__my_func__,__LINE__);
+ return g_last_cudaError = cudaErrorUnknown;
+}
+
+
/*******************************************************************************
* *
* *
@@ -1469,42 +1499,26 @@ __host__ cudaError_t CUDARTAPI cudaLaunch( const char *hostFun )
return g_last_cudaError = cudaSuccess;
}
-
__host__ cudaError_t CUDARTAPI cudaLaunchKernel ( const char* hostFun, dim3 gridDim, dim3 blockDim, const void** args, size_t sharedMem, cudaStream_t stream )
{
- struct CUstream_st *s = (struct CUstream_st *)stream;
- g_cuda_launch_stack.push_back( kernel_config(gridDim,blockDim,sharedMem,s) );
-
- //printf("cudaLaunchKernel:sizeof(Arg[0])=%d)\n ",sizeof(args[0]));
- kernel_config &config = g_cuda_launch_stack.back();
- config.set_arg(args[0],432,0);//standard interface for cutlass library #TODO Implementing a generalized kernel
-
- CUctx_st* context = GPGPUSim_Context();
- char *mode = getenv("PTX_SIM_MODE_FUNC");
- if( mode )
- sscanf(mode,"%u", &g_ptx_sim_mode);
- gpgpusim_ptx_assert( !g_cuda_launch_stack.empty(), "empty launch stack" );
- kernel_config config1 = g_cuda_launch_stack.back();
- struct CUstream_st *stream1 = config1.get_stream();
- printf("\nGPGPU-Sim PTX: cudaLaunch for 0x%p (mode=%s) on stream %u\n", hostFun,
- g_ptx_sim_mode?"functional simulation":"performance simulation", stream1?stream1->get_uid():0 );
- kernel_info_t *grid = gpgpu_cuda_ptx_sim_init_grid(hostFun,config1.get_args(),config1.grid_dim(),config1.block_dim(),context);
- std::string kname = grid->name();
- dim3 gridDim1 = config1.grid_dim();
- dim3 blockDim1 = config1.block_dim();
- printf("GPGPU-Sim PTX: pushing kernel \'%s\' to stream %u, gridDim= (%u,%u,%u) blockDim = (%u,%u,%u) \n",
- kname.c_str(), stream1?stream1->get_uid():0, gridDim1.x,gridDim1.y,gridDim1.z,blockDim1.x,blockDim1.y,blockDim1.z );
- /*Kernel is hardcoded to enable the cutlass library*/
- std::string cutlass("cutlass");
- assert(kname.find(cutlass) != std::string::npos);
+ if(g_debug_execution >= 3){
+ announce_call(__my_func__);
+ }
+ CUctx_st *context = GPGPUSim_Context();
+ function_info *entry = context->get_kernel(hostFun);
+
+ cudaConfigureCall(gridDim, blockDim, sharedMem, stream);
+ for(unsigned i = 0; i < entry->num_args(); i++){
+ std::pair<size_t, unsigned> p = entry->get_param_config(i);
+ cudaSetupArgument(args[i], p.first, p.second);
+ }
- stream_operation op(grid,g_ptx_sim_mode,stream1);
- g_stream_manager->push(op);
- g_cuda_launch_stack.pop_back();
+ cudaLaunch(hostFun);
return g_last_cudaError = cudaSuccess;
}
+
/*******************************************************************************
* *
* *
@@ -2552,8 +2566,17 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin )
// Making this a runtime variable based on the app, enables GPGPU-Sim compiled
// with a newer version of CUDA to run apps compiled with older versions of
// CUDA. This is especially useful for PTXPLUS execution.
- int app_cuda_version = get_app_cuda_version();
- assert( app_cuda_version == CUDART_VERSION / 1000 && "The app must be compiled with same major version as the simulator." );
+ //Skip cuda version check for pytorch application
+ std::string app_binary_path = get_app_binary();
+ int pos = app_binary_path.find("python");
+ if (pos==std::string::npos){
+ // Not pytorch app : checking cuda version
+ int app_cuda_version = get_app_cuda_version();
+ assert( app_cuda_version == CUDART_VERSION / 1000 && "The app must be compiled with same major version as the simulator." );
+ }
+
+ //int app_cuda_version = get_app_cuda_version();
+ //assert( app_cuda_version == CUDART_VERSION / 1000 && "The app must be compiled with same major version as the simulator." );
const char* filename;
#if CUDART_VERSION < 6000
// FatBin handle from the .fatbin.c file (one of the intermediate files generated by NVCC)
@@ -4447,6 +4470,16 @@ CUresult CUDAAPI cuPointerGetAttribute(void *data, CUpointer_attribute attribute
#endif /* CUDART_VERSION >= 4000 */
#if CUDART_VERSION >= 8000
+__host__ cudaError_t CUDARTAPI cudaCreateTextureObject ( cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc )
+{
+ if(g_debug_execution >= 3){
+ announce_call(__my_func__);
+ }
+ cuda_not_implemented(__my_func__,__LINE__);
+ return g_last_cudaError = cudaSuccess;
+
+}
+
CUresult CUDAAPI cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream)
{
if(g_debug_execution >= 3){
diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h
index 08aa88c..28a22e0 100644
--- a/src/abstract_hardware_model.h
+++ b/src/abstract_hardware_model.h
@@ -73,6 +73,7 @@ enum FuncCache
#include <set>
typedef unsigned long long new_addr_type;
+typedef unsigned long long cudaTextureObject_t;
typedef unsigned address_type;
typedef unsigned addr_t;
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc
index 3773f6f..ec68b5b 100644
--- a/src/cuda-sim/cuda-sim.cc
+++ b/src/cuda-sim/cuda-sim.cc
@@ -1308,7 +1308,7 @@ void function_info::list_param( FILE *fout ) const
void function_info::ptx_jit_config(std::map<unsigned long long, size_t> mallocPtr_Size, memory_space *param_mem, gpgpu_t* gpu, dim3 gridDim, dim3 blockDim)
{
- static unsigned long counter = 0;
+ static unsigned long long counter = 0;
std::vector< std::pair<size_t, unsigned char*> > param_data;
std::vector<unsigned> offsets;
std::vector<bool> paramIsPointer;
diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc
index 31a33c6..c85654c 100644
--- a/src/cuda-sim/instructions.cc
+++ b/src/cuda-sim/instructions.cc
@@ -195,7 +195,7 @@ void ptx_thread_info::print_reg_thread(char * fname)
{
reg_map_t reg = m_regs.back();
- typename reg_map_t::const_iterator it;
+ reg_map_t::const_iterator it;
for (it = reg.begin(); it != reg.end(); ++it)
{
const std::string &name = it->first->name();