Skip to content

Commit

Permalink
[TileAnalysis] Add a test for dynamic-update-slice.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pifon2a authored and copybara-github committed Nov 24, 2023
1 parent e5a0ad2 commit acd327d
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions xla/service/gpu/model/tile_analysis_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -467,16 +467,25 @@ TEST_F(TileAnalysisTest, DotOp) {
std::vector<int>{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
Expand Down

0 comments on commit acd327d

Please sign in to comment.