From f3a0fce24eac245e6398a34daaeef701e2927d8e Mon Sep 17 00:00:00 2001 From: mmakevic-amd Date: Thu, 17 Oct 2024 02:39:05 -0700 Subject: [PATCH] PR #18387: [ROCm] Disable failing subtests for command_buffer_scheduling_test Imported from GitHub PR https://github.com/openxla/xla/pull/18387 Disabling `Conditional` and `While` subtests in `command_buffer_scheduling_test` since ROCm does not support conditional nodes in the hip graph Copybara import of the project: -- ba4396eee2410a1cc0846ee6eac0c401ba984afe by Milica Makevic : Disable Conditional and While subtests for ROCm Merging this change closes #18387 COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/18387 from ROCm:fix_command_buffer_scheduling_test ba4396eee2410a1cc0846ee6eac0c401ba984afe PiperOrigin-RevId: 686834433 --- .../transforms/command_buffer_scheduling_test.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/xla/service/gpu/transforms/command_buffer_scheduling_test.cc b/xla/service/gpu/transforms/command_buffer_scheduling_test.cc index a30ade0f61cbc..056af54d5a827 100644 --- a/xla/service/gpu/transforms/command_buffer_scheduling_test.cc +++ b/xla/service/gpu/transforms/command_buffer_scheduling_test.cc @@ -54,6 +54,13 @@ class CommandBufferSchedulingTest : public HloTestBase { debug_options.set_xla_gpu_graph_min_graph_size(2); return debug_options; } + + const se::GpuComputeCapability& GetGpuComputeCapability() { + return backend() + .default_stream_executor() + ->GetDeviceDescription() + .gpu_compute_capability(); + } }; using CommandBuffer = CommandBufferScheduling::CommandBuffer; @@ -809,6 +816,10 @@ TEST_F(CommandBufferSchedulingTest, WhileNotCommand) { } TEST_F(CommandBufferSchedulingTest, While) { + const auto& gpu_desc = GetGpuComputeCapability(); + if (std::holds_alternative(gpu_desc)) { + GTEST_SKIP() << "Not supported for ROCm!"; + } const char* hlo = R"( HloModule TestModule, is_scheduled=true @@ -870,6 +881,10 @@ TEST_F(CommandBufferSchedulingTest, While) { } TEST_F(CommandBufferSchedulingTest, Conditional) { + const auto& gpu_desc = GetGpuComputeCapability(); + if (std::holds_alternative(gpu_desc)) { + GTEST_SKIP() << "Not supported for ROCm!"; + } const char* hlo = R"( HloModule TestModule, is_scheduled=true