Skip to content

Commit

Permalink
Updated test to check for fusion
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoud-abuzaina committed Oct 5, 2023
1 parent c942976 commit 6ed8e02
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions third_party/xla/xla/tests/onednn_layer_norm_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ TEST_F(LayerNormTest, SimpleTest) {
)";

EXPECT_TRUE(RunAndCompare(layer_norm_module_str, ErrorSpec{1e-4, 1e-4}));
MatchOptimizedHlo(layer_norm_module_str,
R"(
; CHECK: custom_call_target="__onednn$layernorm",
; CHECK: backend_config={
; CHECK-DAG: "onednn_layer_norm_config":{
; CHECK-DAG: "fused_ops":"SCALE_AND_SHIFT"
; CHECK-DAG: }
; CHECK: }
)");
}

} // namespace
Expand Down

0 comments on commit 6ed8e02

Please sign in to comment.