From 101e5f7cfb9f127bf69768ef6474166bf4d187cb Mon Sep 17 00:00:00 2001 From: mmakevic-amd Date: Wed, 2 Oct 2024 09:17:54 -0700 Subject: [PATCH] PR #17858: [ROCm] Fix build brake caused by missing dso_loader.h includes Imported from GitHub PR https://github.com/openxla/xla/pull/17858 The issue was introduced here -> https://github.com/openxla/xla/commit/b30b420510a89caa6ce9ae12c16add7e416e9034#diff-923ec2612240244a60ae28c17f798a7daeccbab84a8e9de9efd7ba96c311c763L115 Some of the ROCm files need `dso_loader.h`. Copybara import of the project: -- 38531050acc09a96cef2423694f9e106611aaac0 by Milica Makevic : Return dso_loader.h includes for ROCm Merging this change closes #17858 FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/17858 from ROCm:ci_hotfix_241002 38531050acc09a96cef2423694f9e106611aaac0 PiperOrigin-RevId: 681479175 --- xla/stream_executor/rocm/BUILD | 6 ++++++ xla/stream_executor/rocm/hipblaslt_wrapper.h | 1 + xla/stream_executor/rocm/hipsolver_wrapper.h | 1 + xla/stream_executor/rocm/rocblas_wrapper.h | 1 + xla/stream_executor/rocm/rocm_dnn.cc | 1 + xla/stream_executor/rocm/rocm_driver_wrapper.h | 1 + xla/stream_executor/rocm/rocm_fft.cc | 1 + xla/stream_executor/rocm/rocsolver_wrapper.h | 2 +- xla/stream_executor/rocm/roctracer_wrapper.h | 1 + 9 files changed, 14 insertions(+), 1 deletion(-) diff --git a/xla/stream_executor/rocm/BUILD b/xla/stream_executor/rocm/BUILD index f6e8a867e2b484..6ba2574c9e665e 100644 --- a/xla/stream_executor/rocm/BUILD +++ b/xla/stream_executor/rocm/BUILD @@ -76,6 +76,7 @@ cc_library( "//xla/stream_executor/gpu:gpu_driver_header", "//xla/stream_executor/gpu:scoped_activate_context", "//xla/stream_executor/platform", + "//xla/stream_executor/platform:dso_loader", "@com_google_absl//absl/base", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/container:node_hash_map", @@ -350,6 +351,7 @@ cc_library( ":rocm_executor", ":rocm_platform_id", "//xla/stream_executor/platform", + "//xla/stream_executor/platform:dso_loader", "//xla/tsl/util:determinism_for_kernels", "@local_config_rocm//rocm:rocm_headers", "@tsl//tsl/platform", @@ -444,6 +446,7 @@ cc_library( "//xla/stream_executor/gpu:gpu_stream_header", "//xla/stream_executor/gpu:scoped_activate_context", "//xla/stream_executor/platform", + "//xla/stream_executor/platform:dso_loader", "@local_config_rocm//rocm:rocm_headers", "@tsl//tsl/platform:env", "@tsl//tsl/platform:logging", @@ -599,6 +602,7 @@ cc_library( ":rocm_platform_id", ":rocsolver_if_static", "//xla/stream_executor/platform", + "//xla/stream_executor/platform:dso_loader", "@local_config_rocm//rocm:rocm_headers", "@tsl//tsl/platform:env", ], @@ -634,6 +638,7 @@ cc_library( ":rocm_executor", ":rocm_platform_id", "//xla/stream_executor/platform", + "//xla/stream_executor/platform:dso_loader", "@local_config_rocm//rocm:rocm_headers", "@tsl//tsl/platform:env", ], @@ -783,6 +788,7 @@ cc_library( ":rocm_platform_id", ":roctracer_if_static", "//xla/stream_executor/platform", + "//xla/stream_executor/platform:dso_loader", "@local_config_rocm//rocm:rocm_headers", "@tsl//tsl/platform", "@tsl//tsl/platform:env", diff --git a/xla/stream_executor/rocm/hipblaslt_wrapper.h b/xla/stream_executor/rocm/hipblaslt_wrapper.h index 8a20e7543f1ab4..c53cff6a933913 100644 --- a/xla/stream_executor/rocm/hipblaslt_wrapper.h +++ b/xla/stream_executor/rocm/hipblaslt_wrapper.h @@ -27,6 +27,7 @@ limitations under the License. #else #include "rocm/include/hipblaslt.h" #endif +#include "xla/stream_executor/platform/dso_loader.h" #include "xla/stream_executor/platform/port.h" #include "tsl/platform/env.h" diff --git a/xla/stream_executor/rocm/hipsolver_wrapper.h b/xla/stream_executor/rocm/hipsolver_wrapper.h index 6f05fcddee3fe4..8434ae03b96685 100644 --- a/xla/stream_executor/rocm/hipsolver_wrapper.h +++ b/xla/stream_executor/rocm/hipsolver_wrapper.h @@ -29,6 +29,7 @@ limitations under the License. #include "rocm/include/hipsolver.h" #endif +#include "xla/stream_executor/platform/dso_loader.h" #include "xla/stream_executor/platform/port.h" #include "tsl/platform/env.h" diff --git a/xla/stream_executor/rocm/rocblas_wrapper.h b/xla/stream_executor/rocm/rocblas_wrapper.h index 2b74fc2458761e..d7188176f29738 100644 --- a/xla/stream_executor/rocm/rocblas_wrapper.h +++ b/xla/stream_executor/rocm/rocblas_wrapper.h @@ -25,6 +25,7 @@ limitations under the License. #include "rocm/include/rocblas/rocblas.h" #include "rocm/rocm_config.h" +#include "xla/stream_executor/platform/dso_loader.h" #include "xla/stream_executor/platform/port.h" #include "tsl/platform/env.h" #include "tsl/platform/platform.h" diff --git a/xla/stream_executor/rocm/rocm_dnn.cc b/xla/stream_executor/rocm/rocm_dnn.cc index 6de2a3e349fde0..c83d4fac52af3b 100644 --- a/xla/stream_executor/rocm/rocm_dnn.cc +++ b/xla/stream_executor/rocm/rocm_dnn.cc @@ -36,6 +36,7 @@ limitations under the License. #include "xla/stream_executor/gpu/gpu_executor.h" #include "xla/stream_executor/gpu/gpu_stream.h" #include "xla/stream_executor/gpu/scoped_activate_context.h" +#include "xla/stream_executor/platform/dso_loader.h" #include "xla/stream_executor/platform/initialize.h" #include "xla/stream_executor/plugin_registry.h" #include "xla/stream_executor/rocm/rocm_diagnostics.h" diff --git a/xla/stream_executor/rocm/rocm_driver_wrapper.h b/xla/stream_executor/rocm/rocm_driver_wrapper.h index 89207e9c440db5..d3ac52ead9f07f 100644 --- a/xla/stream_executor/rocm/rocm_driver_wrapper.h +++ b/xla/stream_executor/rocm/rocm_driver_wrapper.h @@ -24,6 +24,7 @@ limitations under the License. #include "rocm/include/hip/hip_runtime.h" #include "rocm/rocm_config.h" +#include "xla/stream_executor/platform/dso_loader.h" #include "xla/stream_executor/platform/port.h" #include "tsl/platform/env.h" diff --git a/xla/stream_executor/rocm/rocm_fft.cc b/xla/stream_executor/rocm/rocm_fft.cc index e62786a5adf389..fe85422350838e 100644 --- a/xla/stream_executor/rocm/rocm_fft.cc +++ b/xla/stream_executor/rocm/rocm_fft.cc @@ -22,6 +22,7 @@ limitations under the License. #include "xla/stream_executor/gpu/gpu_helpers.h" #include "xla/stream_executor/gpu/gpu_stream.h" #include "xla/stream_executor/gpu/scoped_activate_context.h" +#include "xla/stream_executor/platform/dso_loader.h" #include "xla/stream_executor/platform/initialize.h" #include "xla/stream_executor/platform/port.h" #include "xla/stream_executor/plugin_registry.h" diff --git a/xla/stream_executor/rocm/rocsolver_wrapper.h b/xla/stream_executor/rocm/rocsolver_wrapper.h index cfeea5f54b667e..dc9aba7ca423ed 100644 --- a/xla/stream_executor/rocm/rocsolver_wrapper.h +++ b/xla/stream_executor/rocm/rocsolver_wrapper.h @@ -26,7 +26,7 @@ limitations under the License. #else #include "rocm/include/rocsolver.h" #endif - +#include "xla/stream_executor/platform/dso_loader.h" #include "xla/stream_executor/platform/port.h" #include "tsl/platform/env.h" diff --git a/xla/stream_executor/rocm/roctracer_wrapper.h b/xla/stream_executor/rocm/roctracer_wrapper.h index 49f1411712b15b..b42751bb53e0cf 100644 --- a/xla/stream_executor/rocm/roctracer_wrapper.h +++ b/xla/stream_executor/rocm/roctracer_wrapper.h @@ -28,6 +28,7 @@ limitations under the License. #else #include "rocm/include/roctracer/roctracer_hcc.h" #endif +#include "xla/stream_executor/platform/dso_loader.h" #include "xla/stream_executor/platform/port.h" #include "tsl/platform/env.h" #include "tsl/platform/platform.h"