================
@@ -303,19 +303,16 @@ IncrementalCompilerBuilder::CreateCpp() {
 }
 
 llvm::Expected<std::unique_ptr<CompilerInstance>>
-IncrementalCompilerBuilder::createCuda(bool device) {
+IncrementalCompilerBuilder::createOffload(bool HipEnabled, bool device) {
   std::vector<const char *> Argv;
   Argv.reserve(5 + 4 + UserArgs.size());
+  Argv.push_back(HipEnabled ? "-xhip" : "-xcuda");
+  Argv.push_back(device ? "--cuda-device-only" : "--cuda-host-only");
----------------
yxsamliu wrote:

The host-only and device-only driver calls have different arguments, so they 
may generate different CUIDs. HIP uses the CUID in some host and device symbol 
names, which must match. Could we generate one session CUID and pass the same 
`-cuid=` value to both compiler instances?

https://github.com/llvm/llvm-project/pull/217582
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to