When we are creating jobs for the new driver we first check the cache to
see if the job was already created as a part of the offloading
toolchain. This would sometimes fail if the bound architecture was set
for the host during offloading. We want to ingore this because it is not
relevant for looking up host actions. Previously it was set on some
machines and would cause the cache lookup to fail.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Looks like this breaks tests on Mac: http://45.33.8.238/macm1/27158/step_7.txt
Please take a look and revert for now if it takes a while to fix.
Comment Actions
Can you do me a favor and run the command clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-new-driver -no-canonical-prefixes -ccc-print-bindings $HOME/Documents/code/llvm-project/clang/test/Driver/openmp-offload-gpu.c -o openmp-offload-gpu -fopenmp -fopenmp-targets=nvptx64 -fopenmp-new-driver -ccc-print-bindings
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 3bfddeefc7b2..cba9cecd7d5e 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -4745,6 +4745,7 @@ InputInfoList Driver::BuildJobsForAction( Action::OffloadKind TargetDeviceOffloadKind) const { std::pair<const Action *, std::string> ActionTC = { A, GetTriplePlusArchString(TC, BoundArch, TargetDeviceOffloadKind)}; + llvm::errs() << "Insert: " << A << " " << TC->getTriple().getTriple() << " " << BoundArch << " " << TargetDeviceOffloadKind << "\n"; auto CachedResult = CachedResults.find(ActionTC); if (CachedResult != CachedResults.end()) { return CachedResult->second; @@ -4831,6 +4832,7 @@ InputInfoList Driver::BuildJobsForActionNoCache( std::pair<const Action *, std::string> ActionTC = { OA->getHostDependence(), GetTriplePlusArchString(TC, BoundArch, TargetDeviceOffloadKind)}; + llvm::errs() << "Check: " << A << " " << TC->getTriple().getTriple() << " " << BoundArch << " " << TargetDeviceOffloadKind << "\n"; if (CachedResults.find(ActionTC) != CachedResults.end()) { InputInfoList Inputs = CachedResults[ActionTC]; Inputs.append(OffloadDependencesInputInfo);