From acd327d19c782c63ca0c6c1bd70a64d648eee0e9 Mon Sep 17 00:00:00 2001 From: Alexander Belyaev Date: Fri, 24 Nov 2023 11:13:12 -0800 Subject: [PATCH] [TileAnalysis] Add a test for dynamic-update-slice. This op is unsupported by tile analysis. Adding a test so that we don't shoot ourselves in the foot by using `isElementwise` method, for example. PiperOrigin-RevId: 585123986 --- xla/service/gpu/model/tile_analysis_test.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/xla/service/gpu/model/tile_analysis_test.cc b/xla/service/gpu/model/tile_analysis_test.cc index a93ecb75cf94c..917bea1851f3d 100644 --- a/xla/service/gpu/model/tile_analysis_test.cc +++ b/xla/service/gpu/model/tile_analysis_test.cc @@ -467,16 +467,25 @@ TEST_F(TileAnalysisTest, DotOp) { std::vector{18, 17}))))); } -TEST_F(TileAnalysisTest, UnsupportedOp) { - auto input_indexing_or = GetIndexingMapsForEntryComputation(R"( +TEST_F(TileAnalysisTest, UnsupportedOps) { + ASSERT_IS_NOT_OK(GetIndexingMapsForEntryComputation(R"( HloModule m ENTRY e { p0 = f32[1, 17, 9, 9] parameter(0) p1 = f32[5, 17, 9, 9] parameter(1) ROOT concat = f32[6, 17, 9, 9] concatenate(p0, p1) } - )"); - ASSERT_IS_NOT_OK(input_indexing_or); + )")); + ASSERT_IS_NOT_OK(GetIndexingMapsForEntryComputation(R"( + HloModule m + ENTRY e { + input = s32[1,1,25,1] parameter(0) + update = s32[1,1,2,1] parameter(1) + start_indices = s32[4] parameter(2) + ROOT dyn-update = s32[1,1,25,1] dynamic-update-slice( + s32[1,1,25,1] input, s32[1,1,2,1] update, s32[4] start_indices) + } + )")); } } // namespace