@@ -298,3 +298,35 @@ func @torch.aten.rsqrt$basic(%arg0: !torch.vtensor<[?,?],f32>) -> !torch.vtensor
298298 %0 = torch.aten.rsqrt %arg0 : !torch.vtensor <[?,?],f32 > -> !torch.vtensor <[?,?],f32 >
299299 return %0 : !torch.vtensor <[?,?],f32 >
300300}
301+
302+ // -----
303+
304+ // CHECK-LABEL: func @torch.aten.maximum$basic(
305+ // CHECK-SAME: %[[VAL_0:.*]]: !torch.vtensor<[?,?],f32>,
306+ // CHECK-SAME: %[[VAL_1:.*]]: !torch.vtensor<[?,?],f32>) -> !torch.vtensor<[?,?],f32> {
307+ // CHECK: %[[VAL_2:.*]] = torch_c.to_builtin_tensor %[[VAL_0]] : !torch.vtensor<[?,?],f32> -> tensor<?x?xf32>
308+ // CHECK: %[[VAL_3:.*]] = torch_c.to_builtin_tensor %[[VAL_1]] : !torch.vtensor<[?,?],f32> -> tensor<?x?xf32>
309+ // CHECK: %[[VAL_4:.*]] = "tosa.maximum"(%[[VAL_2]], %[[VAL_3]]) : (tensor<?x?xf32>, tensor<?x?xf32>) -> tensor<?x?xf32>
310+ // CHECK: %[[VAL_5:.*]] = torch_c.from_builtin_tensor %[[VAL_4]] : tensor<?x?xf32> -> !torch.vtensor<[?,?],f32>
311+ // CHECK: return %[[VAL_5]] : !torch.vtensor<[?,?],f32>
312+ // CHECK: }
313+ func @torch.aten.maximum$basic (%arg0: !torch.vtensor <[?,?],f32 >, %arg1: !torch.vtensor <[?,?],f32 >) -> !torch.vtensor <[?,?],f32 > {
314+ %0 = torch.aten.maximum %arg0 , %arg1 : !torch.vtensor <[?,?],f32 >, !torch.vtensor <[?,?],f32 > -> !torch.vtensor <[?,?],f32 >
315+ return %0 : !torch.vtensor <[?,?],f32 >
316+ }
317+
318+ // -----
319+
320+ // CHECK-LABEL: func @torch.aten.minimum$basic(
321+ // CHECK-SAME: %[[VAL_0:.*]]: !torch.vtensor<[?,?],f32>,
322+ // CHECK-SAME: %[[VAL_1:.*]]: !torch.vtensor<[?,?],f32>) -> !torch.vtensor<[?,?],f32> {
323+ // CHECK: %[[VAL_2:.*]] = torch_c.to_builtin_tensor %[[VAL_0]] : !torch.vtensor<[?,?],f32> -> tensor<?x?xf32>
324+ // CHECK: %[[VAL_3:.*]] = torch_c.to_builtin_tensor %[[VAL_1]] : !torch.vtensor<[?,?],f32> -> tensor<?x?xf32>
325+ // CHECK: %[[VAL_4:.*]] = "tosa.minimum"(%[[VAL_2]], %[[VAL_3]]) : (tensor<?x?xf32>, tensor<?x?xf32>) -> tensor<?x?xf32>
326+ // CHECK: %[[VAL_5:.*]] = torch_c.from_builtin_tensor %[[VAL_4]] : tensor<?x?xf32> -> !torch.vtensor<[?,?],f32>
327+ // CHECK: return %[[VAL_5]] : !torch.vtensor<[?,?],f32>
328+ // CHECK: }
329+ func @torch.aten.minimum$basic (%arg0: !torch.vtensor <[?,?],f32 >, %arg1: !torch.vtensor <[?,?],f32 >) -> !torch.vtensor <[?,?],f32 > {
330+ %0 = torch.aten.minimum %arg0 , %arg1 : !torch.vtensor <[?,?],f32 >, !torch.vtensor <[?,?],f32 > -> !torch.vtensor <[?,?],f32 >
331+ return %0 : !torch.vtensor <[?,?],f32 >
332+ }
0 commit comments