From 7ec84c52b0d8b80ba4bd48467ce56ee5f4322d0e Mon Sep 17 00:00:00 2001 From: zoranjovanovic-ns <126815388+zoranjovanovic-ns@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:44:04 -0700 Subject: [PATCH] PR #15267: [ROCm] Fixed compilation issues. Imported from GitHub PR https://github.com/openxla/xla/pull/15267 Issues were caused by following commits: https://github.com/openxla/xla/commit/d17181b49de71b0fb0ff6236745d43d630c39401 https://github.com/openxla/xla/commit/429da0c5cca821b75a75f95e1c4256f883b0bae5 Copybara import of the project: -- 66fbafe91986ebb02b8236175f27d7ebf8a23989 by Zoran Jovanovic : [ROCm] Fixed compilation issues. Merging this change closes #15267 COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/15267 from ROCm:ci_hotfix_20240724 66fbafe91986ebb02b8236175f27d7ebf8a23989 PiperOrigin-RevId: 655686460 --- xla/stream_executor/gpu/BUILD | 4 ++-- xla/stream_executor/rocm/rocm_executor.cc | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/xla/stream_executor/gpu/BUILD b/xla/stream_executor/gpu/BUILD index c65157f311712..8e918262abfc5 100644 --- a/xla/stream_executor/gpu/BUILD +++ b/xla/stream_executor/gpu/BUILD @@ -576,8 +576,8 @@ xla_test( cc_library( name = "gpu_cudamallocasync_allocator", - srcs = ["gpu_cudamallocasync_allocator.cc"], - hdrs = ["gpu_cudamallocasync_allocator.h"], + srcs = if_cuda_is_configured(["gpu_cudamallocasync_allocator.cc"]), + hdrs = if_cuda_is_configured(["gpu_cudamallocasync_allocator.h"]), tags = ["gpu"], deps = [ ":gpu_init_impl", diff --git a/xla/stream_executor/rocm/rocm_executor.cc b/xla/stream_executor/rocm/rocm_executor.cc index 3ebe531e1ba55..49fc9c646868a 100644 --- a/xla/stream_executor/rocm/rocm_executor.cc +++ b/xla/stream_executor/rocm/rocm_executor.cc @@ -190,8 +190,7 @@ GpuExecutor::CreateEventBasedTimer(GpuStream* stream, bool use_delay_kernel) { TF_ASSIGN_OR_RETURN(auto stop_event, CreateGpuEvent(/*allow_timing=*/true)); TF_RETURN_IF_ERROR(start_event->Record(stream->gpu_stream())); return std::make_unique(gpu_context(), std::move(start_event), - std::move(stop_event), stream, - std::move(semaphore)); + std::move(stop_event), stream); } bool GpuExecutor::UnloadGpuBinary(const void* gpu_binary) {