From 13093a630b12a84980e4b870618a3e33cde00fb8 Mon Sep 17 00:00:00 2001 From: Michael Levesque-Dion Date: Wed, 17 Apr 2024 13:35:03 -0700 Subject: [PATCH] Add comments for each case --- stablehlo/tests/ops_speculatability.mlir | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stablehlo/tests/ops_speculatability.mlir b/stablehlo/tests/ops_speculatability.mlir index 31f59ee3a3..e3359ee472 100644 --- a/stablehlo/tests/ops_speculatability.mlir +++ b/stablehlo/tests/ops_speculatability.mlir @@ -1714,6 +1714,7 @@ func.func @select_and_scatter( %static_arg: tensor<10x24x24x64xf64>, %dynamic_arg: tensor, %source: tensor<10x12x12x64xf64>, %init: tensor ) { + // Inputs and output are static %0 = "stablehlo.select_and_scatter"(%static_arg, %source, %init) ({ ^bb0(%arg0: tensor, %arg1: tensor): %c0 = stablehlo.constant dense : tensor @@ -1727,6 +1728,7 @@ func.func @select_and_scatter( } : (tensor<10x24x24x64xf64>, tensor<10x12x12x64xf64>, tensor) -> tensor<10x24x24x64xf64> "hlo_test_speculatability.is_recursively_speculatable"(%0) : (tensor<10x24x24x64xf64>) -> () + // Inputs are static, output is dynamic %1 = "stablehlo.select_and_scatter"(%static_arg, %source, %init) ({ ^bb0(%arg0: tensor, %arg1: tensor): %c0 = stablehlo.constant dense : tensor @@ -1740,6 +1742,7 @@ func.func @select_and_scatter( } : (tensor<10x24x24x64xf64>, tensor<10x12x12x64xf64>, tensor) -> tensor "hlo_test_speculatability.is_recursively_speculatable"(%1) : (tensor) -> () + // Inputs are dynamic, output is static %2 = "stablehlo.select_and_scatter"(%dynamic_arg, %source, %init) ({ ^bb0(%arg0: tensor, %arg1: tensor): %c0 = stablehlo.constant dense : tensor @@ -1753,6 +1756,7 @@ func.func @select_and_scatter( } : (tensor, tensor<10x12x12x64xf64>, tensor) -> tensor<10x24x24x64xf64> "hlo_test_speculatability.is_not_speculatable"(%2) : (tensor<10x24x24x64xf64>) -> () + // Inputs and output are dynamic %3 = "stablehlo.select_and_scatter"(%dynamic_arg, %source, %init) ({ ^bb0(%arg0: tensor, %arg1: tensor): %c0 = stablehlo.constant dense : tensor