From 75b2ff1c3f0f0468c2da0dfa47fd9d4dc8172648 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 4 Oct 2016 22:18:55 +0530 Subject: [PATCH] Update hipify-clang to generate updated hip_runtime header path Change-Id: I64ceb037f2aa68e4e8d254be7d0bebff83061990 --- hipamd/clang-hipify/src/Cuda2Hip.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hipamd/clang-hipify/src/Cuda2Hip.cpp b/hipamd/clang-hipify/src/Cuda2Hip.cpp index 885626f0b4..789014ffc9 100644 --- a/hipamd/clang-hipify/src/Cuda2Hip.cpp +++ b/hipamd/clang-hipify/src/Cuda2Hip.cpp @@ -107,9 +107,9 @@ struct cuda2hipMap { cuda2hipRename["__CUDACC__"] = {"__HIPCC__", CONV_DEF, API_RUNTIME}; // CUDA includes - cuda2hipRename["cuda.h"] = {"hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_DRIVER}; - cuda2hipRename["cuda_runtime.h"] = {"hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_RUNTIME}; - cuda2hipRename["cuda_runtime_api.h"] = {"hip_runtime_api.h", CONV_INCLUDE, API_RUNTIME}; + cuda2hipRename["cuda.h"] = {"hip/hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_DRIVER}; + cuda2hipRename["cuda_runtime.h"] = {"hip/hip_runtime.h", CONV_INCLUDE_CUDA_MAIN_H, API_RUNTIME}; + cuda2hipRename["cuda_runtime_api.h"] = {"hip/hip_runtime_api.h", CONV_INCLUDE, API_RUNTIME}; // HIP includes // TODO: uncomment this when hip/cudacommon.h will be renamed to hip/hipcommon.h @@ -1939,7 +1939,7 @@ public: } while (false); if (PP->countReps[CONV_INCLUDE_CUDA_MAIN_H] == 0 && countReps[CONV_INCLUDE_CUDA_MAIN_H] == 0 && Replace->size() > 0) { - StringRef repName = "#include \n"; + StringRef repName = "#include \n"; SourceManager *SM = Result.SourceManager; Replacement Rep(*SM, SM->getLocForStartOfFile(SM->getMainFileID()), 0, repName); Replace->insert(Rep); @@ -1961,7 +1961,7 @@ private: void HipifyPPCallbacks::handleEndSource() { if (Match->countReps[CONV_INCLUDE_CUDA_MAIN_H] == 0 && countReps[CONV_INCLUDE_CUDA_MAIN_H] == 0 && Replace->size() > 0) { - StringRef repName = "#include \n"; + StringRef repName = "#include \n"; Replacement Rep(*_sm, _sm->getLocForStartOfFile(_sm->getMainFileID()), 0, repName); Replace->insert(Rep); countReps[CONV_INCLUDE_CUDA_MAIN_H]++;