Don't link `opencl.bc` when compiling for ROCm. (#16778)
We shouldn't be using it, and linking it in to every executable adds ~20
seconds wall time for large programs like unet:

~~Also enable the external tests (ONNX ops) on ROCm again to confirm
that this doesn't regress anything there.~~ (Need to update the XFAIL
sets there after newly passing tests, in a separate PR)
diff --git a/compiler/plugins/target/ROCM/CMakeLists.txt b/compiler/plugins/target/ROCM/CMakeLists.txt
index d3fe5f5..d1be434 100644
--- a/compiler/plugins/target/ROCM/CMakeLists.txt
+++ b/compiler/plugins/target/ROCM/CMakeLists.txt
@@ -73,7 +73,7 @@
# there. We default to downloading as it is a better use experience
# by default.
# See: https://github.com/shark-infra/amdgpu-device-libs
-set(_amd_required_libs "ocml.bc" "ockl.bc" "opencl.bc")
+set(_amd_required_libs "ocml.bc" "ockl.bc")
set(_amd_device_bc_url
"https://github.com/shark-infra/amdgpu-device-libs/releases/download/v20231101/amdgpu-device-libs-llvm-6086c272a3a59eb0b6b79dcbe00486bf4461856a.tgz")
set(_amd_device_bc_sha256 "336362416c68fdd8bb80328f65ca7ebaa0c119ea19c95df6df30c832a4df39b9")
diff --git a/compiler/plugins/target/ROCM/ROCMTargetUtils.cpp b/compiler/plugins/target/ROCM/ROCMTargetUtils.cpp
index e027907..f86741e 100644
--- a/compiler/plugins/target/ROCM/ROCMTargetUtils.cpp
+++ b/compiler/plugins/target/ROCM/ROCMTargetUtils.cpp
@@ -139,8 +139,7 @@
static std::vector<std::string> getROCDLPaths(std::string targetChip,
std::string bitCodeDir) {
// AMDGPU bitcodes.
- static const std::vector<std::string> rocdlFilenames(
- {"opencl.bc", "ocml.bc", "ockl.bc"});
+ static const std::vector<std::string> rocdlFilenames({"ocml.bc", "ockl.bc"});
// Construct full path to ROCDL bitcode libraries.
std::vector<std::string> result;