[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 09:57:41 PDT 2023
MaskRay accepted this revision.
MaskRay added inline comments.
================
Comment at: clang/include/clang/Driver/Options.td:1281
+ "rocThrust path, required by the HIP Standard Parallel Algorithm "
+ "Acceleration library, used to implicitly include the rocThrust library.">;
+def hipstdpar_prim_path_EQ : Joined<["--"], "hipstdpar-prim-path=">,
----------------
The convention is to omit the trailing dot.
================
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:340
+ HasRocThrustLibrary = !HIPRocThrustPathArg.empty() &&
+ D.getVFS().exists(HIPRocThrustPathArg + "/thrust");
+ HIPRocPrimPathArg =
----------------
Prefer `concat` so that if `HIPRocThrustPathArg` ends with `/`, we will not get `...//thrust`.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6566
options::OPT_fno_gpu_allow_device_init);
+ if (Args.hasFlag(options::OPT_fgpu_allow_device_init,
+ options::OPT_fno_gpu_allow_device_init, false))
----------------
Note that I have refactored the code to use `addOptInFlag`. You need to remove the repeated OPT_fgpu_allow_device_init checking.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155775/new/
https://reviews.llvm.org/D155775
More information about the llvm-commits
mailing list