@@ -246,12 +246,6 @@ cc_library(
246246 "manual" ,
247247 "rocm-only" ,
248248 ],
249- linkopts = [
250- "-Wl,--no-as-needed" ,
251- "-L/opt/rocm/lib" ,
252- "-Wl,-rpath,/opt/rocm/lib" ,
253- "-lhsa-runtime64" ,
254- ],
255249 deps = [
256250 "//xla/tsl/profiler/backends/cpu:annotation_stack" ,
257251 "//xla/tsl/profiler/utils:time_utils" ,
@@ -266,6 +260,7 @@ cc_library(
266260 "@tsl//tsl/platform:errors" ,
267261 "@tsl//tsl/platform:logging" ,
268262 "@tsl//tsl/platform:macros" ,
263+ "@local_config_rocm//rocm:rocprofiler-sdk" ,
269264 ],
270265 visibility = ["//visibility:public" ],
271266)
@@ -274,13 +269,6 @@ cc_library(
274269 name = "rocm_collector" ,
275270 srcs = ["rocm_collector.cc" ],
276271 hdrs = ["rocm_collector.h" ],
277- # copybara:uncomment compatible_with = ["//buildenv/target:non_prod"],
278- linkopts = select ({
279- "//conditions:default" : [
280- "-L/opt/rocm/lib" , # search path for all ROCm shared objects
281- "-lrocprofiler-sdk" , # the library that owns the missing symbols
282- ],
283- }),
284272 tags = [
285273 "gpu" ,
286274 "rocm-only" ,
@@ -315,6 +303,7 @@ cc_library(
315303 "@tsl//tsl/platform:types" ,
316304 "@tsl//tsl/profiler/lib:profiler_factory" ,
317305 "@tsl//tsl/profiler/lib:profiler_interface" ,
306+ "@local_config_rocm//rocm:rocprofiler-sdk" ,
318307 ],
319308)
320309
@@ -401,6 +390,7 @@ xla_test(
401390 tags = [
402391 "gpu" ,
403392 "rocm-only" ,
393+ "skip_rocprofiler_sdk" , # due to rocprofiler-sdk's rocprofiler_force_configure
404394 ] + if_google ([
405395 # Optional: only run internally if ROCm config is enabled
406396 "manual" ,
0 commit comments