diff --git a/GPU/GPUTracking/Standalone/tools/rtc/rtcsource.sh b/GPU/GPUTracking/Standalone/tools/rtc/rtcsource.sh deleted file mode 100755 index 9f59855eaf278..0000000000000 --- a/GPU/GPUTracking/Standalone/tools/rtc/rtcsource.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -cat < source.cu -# 1 "/home/qon/alice/O2/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDArtc.cu" -# 1 "/home/qon/alice/O2/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDArtcPre.h" 1 -EOT -cat src/Base/cuda/GPUReconstructionCUDAIncludes.h >> source.cu -nvcc -std=c++17 -gencode arch=compute_75,code=sm_75 -E \ - -I src/ -I src/Common/ -I src/Base/ -I src/SliceTracker/ -I src/Merger/ -I src/TRDTracking/ -I src/TPCClusterFinder/ -I src/TPCConvert/ -I src/Global/ -I src/dEdx/ -I src/TPCFastTransformation/ -I src/GPUUtils/ -I src/DataCompression -I src/ITS \ - -I$HOME/alice/O2/DataFormats/Detectors/TPC/include -I$HOME/alice/O2/Detectors/Base/include -I$HOME/alice/O2/Detectors/Base/src -I$HOME/alice/O2/Common/MathUtils/include -I$HOME/alice/O2/DataFormats/Headers/include \ - -I$HOME/alice/O2/Detectors/TRD/base/include -I$HOME/alice/O2/Detectors/TRD/base/src -I$HOME/alice/O2/Detectors/ITSMFT/ITS/tracking/include -I$HOME/alice/O2/Detectors/ITSMFT/ITS/tracking/cuda/include -I$HOME/alice/O2/Common/Constants/include \ - -I$HOME/alice/O2/DataFormats/common/include -I$HOME/alice/O2/DataFormats/Detectors/TRD/include -I$HOME/alice/O2/Detectors/Raw/include \ - -DGPUCA_HAVE_O2HEADERS -DGPUCA_TPC_GEOMETRY_O2 -DGPUCA_STANDALONE \ - ~/alice/O2/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDArtc.cu \ -| sed '1,/^# 1 ".*GPUReconstructionCUDArtcPre.h" 1$/d' | grep -v O2_GPU_KERNEL_TEMPLATE_REPLACE \ ->> source.cu diff --git a/GPU/GPUTracking/Standalone/tools/rtc/test.cu b/GPU/GPUTracking/Standalone/tools/rtc/test.cu deleted file mode 100644 index f567218046ac7..0000000000000 --- a/GPU/GPUTracking/Standalone/tools/rtc/test.cu +++ /dev/null @@ -1,86 +0,0 @@ -#include -#include -#include - -#define NVRTC_SAFE_CALL(x) \ - do { \ - nvrtcResult result = x; \ - if (result != NVRTC_SUCCESS) { \ - std::cerr << "\nerror: " #x " failed with error " \ - << nvrtcGetErrorString(result) << '\n'; \ - exit(1); \ - } \ - } while (0) - -#define CUDA_SAFE_CALL(x) \ - do { \ - CUresult result = x; \ - if (result != CUDA_SUCCESS) { \ - const char* msg; \ - cuGetErrorName(result, &msg); \ - std::cerr << "\nerror: " #x " failed with error " \ - << msg << '\n'; \ - exit(1); \ - } \ - } while (0) - -int32_t main(int argc, char** argv) -{ - //Read Sourcecode from file - uint32_t filesize; - FILE* pFile; - //Open file - if ((pFile = fopen("source.cu", "rb")) == NULL) - exit(1); - //Optain File Size - fseek(pFile, 0, SEEK_END); - filesize = ftell(pFile); - rewind(pFile); - //Read file - char* sourceCode = new char[filesize + 1]; - if (fread(sourceCode, 1, filesize, pFile) != filesize) - exit(1); - //Make sourceCode 0-terminated - sourceCode[filesize] = 0; - fclose(pFile); - - nvrtcProgram prog; - NVRTC_SAFE_CALL(nvrtcCreateProgram(&prog, // prog - sourceCode, // buffer - "saxpy.cu", // name - 0, // numHeaders - NULL, // headers - NULL)); // includeNames - delete[] sourceCode; - //const char *opts[] = {"-default-device -std=c++17 --extended-lambda -Xptxas -O4 -Xcompiler -O4 -use_fast_math --ftz=true"}; - const char* opts[] = {"-default-device", "--std=c++17", "-use_fast_math", "-ftz=true"}; - nvrtcResult compileResult = nvrtcCompileProgram(prog, // prog - sizeof(opts) / sizeof(opts[0]), // numOptions - opts); // options - size_t logSize; - NVRTC_SAFE_CALL(nvrtcGetProgramLogSize(prog, &logSize)); - char* log = new char[logSize]; - NVRTC_SAFE_CALL(nvrtcGetProgramLog(prog, log)); - std::cout << log << '\n'; - delete[] log; - if (compileResult != NVRTC_SUCCESS) { - exit(1); - } - size_t ptxSize; - NVRTC_SAFE_CALL(nvrtcGetPTXSize(prog, &ptxSize)); - char* ptx = new char[ptxSize]; - NVRTC_SAFE_CALL(nvrtcGetPTX(prog, ptx)); - NVRTC_SAFE_CALL(nvrtcDestroyProgram(&prog)); - CUmodule module; - CUfunction kernel; - CUDA_SAFE_CALL(cuModuleLoadDataEx(&module, ptx, 0, 0, 0)); - CUDA_SAFE_CALL(cuModuleGetFunction(&kernel, module, "foo")); - void* args[] = {}; - CUDA_SAFE_CALL( - cuLaunchKernel(kernel, - 1, 1, 1, // grid dim - 32, 1, 1, // block dim - 0, NULL, // shared mem and stream - args, 0)); // arguments - return 0; -}