yxsamliu wrote: > > > Still, I think it is possible to make it generic with minor assumption. > > > Let's say you are now about to parsing the final part of the target ID > > > string which may be either "env-cpu" or "cpu" without env. > > > > > > This is not actually the issue. The issue is when the cpu is a generic > > target, such as `gfx10-3-generic`. By the current logic, the target id > > after split is `generic`, which is totally a valid one, and leave the rest > > with things like `hip-amd-amdhsa-amd-gfx10-3`. > > That is probably due to this line > https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/OffloadBundler.cpp#L88 > > It assumes there is no '-' in GPU name. > > we could add a loop. If that line fails, we will split at the second '-' from > right.
Ok I get your point. since generic is a valid GPU name. it will stop there. https://github.com/llvm/llvm-project/pull/122629 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits