From 62e57c489f6414160025cf49c90eac40e685091a Mon Sep 17 00:00:00 2001 From: mmakevic-amd Date: Fri, 10 Jan 2025 02:35:03 -0800 Subject: [PATCH] PR #21234: [ROCm] Fix failing dot tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Imported from GitHub PR https://github.com/openxla/xla/pull/21234 Issue introduced here https://github.com/openxla/xla/commit/d1f63e2f60ee4ccb73a5e06484f4783eae79420a The following tests failed to build: ``` //xla/tests:dot_operation_single_threaded_runtime_test_gpu_amd_any FAILED TO BUILD //xla/tests:dot_operation_test_autotune_disabled_gpu_amd_any FAILED TO BUILD //xla/tests:dot_operation_test_gpu_amd_any FAILED TO BUILD ``` ...with: ``` [2025-01-09T01:19:37.573Z] xla/tests/dot_operation_test.cc:1014:24: error: there are no arguments to ‘CreateScalarMaxComputation’ that depend on a template parameter, so a declaration of ‘CreateScalarMaxComputation’ must be available [-fpermissive] [2025-01-09T01:19:37.573Z] 1014 | XlaComputation max = CreateScalarMaxComputation(F32, &builder); [2025-01-09T01:19:37.573Z] | ^~~~~~~~~~~~~~~~~~~~~~~~~~ [2025-01-09T01:19:37.573Z] xla/tests/dot_operation_test.cc:1014:24: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) [2025-01-09T01:19:37.573Z] xla/tests/dot_operation_test.cc: In instantiation of ‘void xla::{anonymous}::DotOperationTestWithCublasLt_F8_ScaledABScaledDWithDAmaxF8_Test::TestBody() [with gtest_TypeParam_ = ml_dtypes::float8_internal::float8_e4m3fnuz]’: [2025-01-09T01:19:37.573Z] xla/tests/dot_operation_test.cc:986:1: required from here [2025-01-09T01:19:37.573Z] xla/tests/dot_operation_test.cc:1014:50: error: ‘CreateScalarMaxComputation’ was not declared in this scope [2025-01-09T01:19:37.573Z] 1014 | XlaComputation max = CreateScalarMaxComputation(F32, &builder); ``` Returning `"xla/hlo/builder/lib/arithmetic.h"` include fixed the problem. Copybara import of the project: -- 79efd63f12e9b41da73a91c2ed1813559734712c by Milica Makevic : Add "xla/hlo/builder/lib/arithmetic.h" include to dot_operation_test Merging this change closes #21234 COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/21234 from ROCm:ci_fix_dot_operation_test 79efd63f12e9b41da73a91c2ed1813559734712c PiperOrigin-RevId: 713975031 --- xla/tests/dot_operation_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/xla/tests/dot_operation_test.cc b/xla/tests/dot_operation_test.cc index 2acc860804d0d..866e8693ece84 100644 --- a/xla/tests/dot_operation_test.cc +++ b/xla/tests/dot_operation_test.cc @@ -22,6 +22,7 @@ limitations under the License. #include "xla/array3d.h" #include "xla/client/local_client.h" #include "xla/error_spec.h" +#include "xla/hlo/builder/lib/arithmetic.h" #include "xla/hlo/builder/lib/matrix.h" #include "xla/hlo/builder/xla_builder.h" #include "xla/hlo/parser/hlo_parser.h"