[PATCH] D120272: [CUDA] Add driver support for compiling CUDA with the new driver
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 19 10:34:09 PDT 2022
tra added a comment.
Thank you for adding the compilation pipeline tests.
LGTM overall.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6223-6226
if (Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc, false))
CmdArgs.push_back("-fgpu-rdc");
+ if (Args.hasArg(options::OPT_foffload_new_driver))
+ CmdArgs.push_back("-fgpu-rdc");
----------------
Combine both ifs, so we don't add `-fgpu-rdc` twice?
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6892-6893
CmdArgs.push_back("-fgpu-rdc");
+ if (Args.hasArg(options::OPT_foffload_new_driver))
+ CmdArgs.push_back("-fgpu-rdc");
}
----------------
Ditto.
================
Comment at: clang/test/Driver/cuda-openmp-driver.cu:18
+// RUN: %clang -### -nocudalib -foffload-new-driver %s 2>&1 | FileCheck -check-prefix RDC %s
+// RDC: ptxas{{.*}}-c
----------------
You probably want to check for `clang -cc1 ... -fgpu-rdc`, too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120272/new/
https://reviews.llvm.org/D120272
More information about the cfe-commits
mailing list