diff --git a/hipamd/hipify-clang/src/ArgParse.cpp b/hipamd/hipify-clang/src/ArgParse.cpp index 60b0dd390b..8a5a5b6e6c 100644 --- a/hipamd/hipify-clang/src/ArgParse.cpp +++ b/hipamd/hipify-clang/src/ArgParse.cpp @@ -34,12 +34,12 @@ cl::opt OutputDir("o-dir", cl::value_desc("directory"), cl::cat(ToolTemplateCategory)); -cl::opt GeneratePerl("perl", +cl::opt GeneratePerl("perl", cl::desc("Generate hipify-perl"), cl::value_desc("perl"), cl::cat(ToolTemplateCategory)); -cl::opt GeneratePython("python", +cl::opt GeneratePython("python", cl::desc("Generate hipify-python"), cl::value_desc("python"), cl::cat(ToolTemplateCategory)); @@ -69,17 +69,17 @@ cl::opt CudaPath("cuda-path", cl::value_desc("directory"), cl::cat(ToolTemplateCategory)); -cl::opt SaveTemps("save-temps", +cl::opt SaveTemps("save-temps", cl::desc("Save temporary files"), cl::value_desc("save-temps"), cl::cat(ToolTemplateCategory)); -cl::opt Verbose("v", +cl::opt Verbose("v", cl::desc("Show commands to run and use verbose output"), cl::value_desc("v"), cl::cat(ToolTemplateCategory)); -cl::opt TranslateToRoc("roc", +cl::opt TranslateToRoc("roc", cl::desc("Translate to roc instead of hip where it is possible"), cl::value_desc("roc"), cl::cat(ToolTemplateCategory)); @@ -119,9 +119,9 @@ cl::opt Examine("examine", cl::value_desc("examine"), cl::cat(ToolTemplateCategory)); -cl::opt DashDash("-", +cl::opt DashDash(" ", cl::desc("Separator between hipify-clang and clang options;\ndon't specify if there are no clang options"), - cl::value_desc("--"), + cl::ValueDisallowed, cl::cat(ToolTemplateCategory)); cl::list IncludeDirs("I", diff --git a/hipamd/hipify-clang/src/HipifyAction.cpp b/hipamd/hipify-clang/src/HipifyAction.cpp index 241ca7ecae..d6fe9b88e5 100644 --- a/hipamd/hipify-clang/src/HipifyAction.cpp +++ b/hipamd/hipify-clang/src/HipifyAction.cpp @@ -267,11 +267,12 @@ void HipifyAction::PragmaDirective(clang::SourceLocation Loc, clang::PragmaIntro return; } clang::Preprocessor& PP = getCompilerInstance().getPreprocessor(); - const clang::Token tok = PP.LookAhead(0); + clang::Token tok; + PP.Lex(tok); StringRef Text(SM.getCharacterData(tok.getLocation()), tok.getLength()); if (Text == "once") { pragmaOnce = true; - pragmaOnceLoc = PP.LookAhead(1).getLocation(); + pragmaOnceLoc = tok.getEndLoc(); } } diff --git a/hipamd/include/hip/hip_runtime_api.h b/hipamd/include/hip/hip_runtime_api.h index e6cdfdd304..637de712b3 100644 --- a/hipamd/include/hip/hip_runtime_api.h +++ b/hipamd/include/hip/hip_runtime_api.h @@ -117,9 +117,11 @@ typedef struct hipDeviceProp_t { int integrated; ///< APU vs dGPU int cooperativeLaunch; ///< HIP device supports cooperative launch int cooperativeMultiDeviceLaunch; ///< HIP device supports cooperative launch on multiple devices +#if !__HIP_VDI__ // Temporarily disable the following three new fields for HIP/VDI runtime int maxTexture1D; ///< Maximum number of elements in 1D images int maxTexture2D[2]; ///< Maximum dimensions (width, height) of 2D images, in image elements int maxTexture3D[3]; ///< Maximum dimensions (width, height, depth) of 3D images, in image elements +#endif } hipDeviceProp_t;