Skip to content

Commit dbf7930

Browse files
committed
Remove old element_wise operations
1 parent 3ba161b commit dbf7930

File tree

2 files changed

+0
-145
lines changed

2 files changed

+0
-145
lines changed

mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml

Lines changed: 0 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -44,56 +44,6 @@ structured_op: !LinalgStructuredOpConfig
4444
- !ScalarExpression
4545
scalar_arg: I
4646
--- !LinalgOpConfig
47-
metadata: !LinalgOpMetadata
48-
name: elemwise_unary
49-
cpp_class_name: ElemwiseUnaryOp
50-
doc: |-
51-
Applies the unary function fun elementwise.
52-
53-
Numeric casting is performed on the input operand, promoting it to the same
54-
data type as the accumulator/output.
55-
structured_op: !LinalgStructuredOpConfig
56-
args:
57-
- !LinalgOperandDefConfig
58-
name: I
59-
kind: input_tensor
60-
type_var: T1
61-
shape_map: affine_map<() -> ()>
62-
- !LinalgOperandDefConfig
63-
name: O
64-
kind: output_tensor
65-
type_var: U
66-
shape_map: affine_map<() -> ()>
67-
- !LinalgOperandDefConfig
68-
name: fun
69-
kind: unary_fn_attr
70-
default_fn: exp
71-
- !LinalgOperandDefConfig
72-
name: cast
73-
kind: type_fn_attr
74-
default_fn: cast_signed
75-
indexing_maps: !LinalgIndexingMapsConfig
76-
static_indexing_maps:
77-
- affine_map<() -> ()>
78-
- affine_map<() -> ()>
79-
iterator_types: []
80-
assignments:
81-
- !ScalarAssign
82-
arg: O
83-
value: !ScalarExpression
84-
scalar_fn:
85-
kind: unary
86-
attr_name: fun
87-
operands:
88-
- !ScalarExpression
89-
scalar_fn:
90-
kind: type
91-
attr_name: cast
92-
type_var: U
93-
operands:
94-
- !ScalarExpression
95-
scalar_arg: I
96-
--- !LinalgOpConfig
9747
metadata: !LinalgOpMetadata
9848
name: exp
9949
cpp_class_name: ExpOp
@@ -549,70 +499,6 @@ structured_op: !LinalgStructuredOpConfig
549499
- !ScalarExpression
550500
scalar_arg: I
551501
--- !LinalgOpConfig
552-
metadata: !LinalgOpMetadata
553-
name: elemwise_binary
554-
cpp_class_name: ElemwiseBinaryOp
555-
doc: |-
556-
Applies the binary function fun elementwise.
557-
558-
Numeric casting is performed on the input operand, promoting it to the same
559-
data type as the accumulator/output.
560-
structured_op: !LinalgStructuredOpConfig
561-
args:
562-
- !LinalgOperandDefConfig
563-
name: lhs
564-
kind: input_tensor
565-
type_var: T1
566-
shape_map: affine_map<() -> ()>
567-
- !LinalgOperandDefConfig
568-
name: rhs
569-
kind: input_tensor
570-
type_var: T2
571-
shape_map: affine_map<() -> ()>
572-
- !LinalgOperandDefConfig
573-
name: O
574-
kind: output_tensor
575-
type_var: U
576-
shape_map: affine_map<() -> ()>
577-
- !LinalgOperandDefConfig
578-
name: fun
579-
kind: binary_fn_attr
580-
default_fn: add
581-
- !LinalgOperandDefConfig
582-
name: cast
583-
kind: type_fn_attr
584-
default_fn: cast_signed
585-
indexing_maps: !LinalgIndexingMapsConfig
586-
static_indexing_maps:
587-
- affine_map<() -> ()>
588-
- affine_map<() -> ()>
589-
- affine_map<() -> ()>
590-
iterator_types: []
591-
assignments:
592-
- !ScalarAssign
593-
arg: O
594-
value: !ScalarExpression
595-
scalar_fn:
596-
kind: binary
597-
attr_name: fun
598-
operands:
599-
- !ScalarExpression
600-
scalar_fn:
601-
kind: type
602-
attr_name: cast
603-
type_var: U
604-
operands:
605-
- !ScalarExpression
606-
scalar_arg: lhs
607-
- !ScalarExpression
608-
scalar_fn:
609-
kind: type
610-
attr_name: cast
611-
type_var: U
612-
operands:
613-
- !ScalarExpression
614-
scalar_arg: rhs
615-
--- !LinalgOpConfig
616502
metadata: !LinalgOpMetadata
617503
name: add
618504
cpp_class_name: AddOp

mlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,6 @@ def copy(
2121
O[None] = cast(U, I[None])
2222

2323

24-
@linalg_structured_op
25-
def elemwise_unary(
26-
I=TensorDef(T1),
27-
O=TensorDef(U, output=True),
28-
fun=UnaryFnAttrDef(default=UnaryFn.exp),
29-
cast=TypeFnAttrDef(default=TypeFn.cast_signed),
30-
):
31-
"""Applies the unary function fun elementwise.
32-
33-
Numeric casting is performed on the input operand, promoting it to the same
34-
data type as the accumulator/output.
35-
"""
36-
O[None] = fun(cast(U, I[None]))
37-
38-
3924
@linalg_structured_op
4025
def exp(
4126
I=TensorDef(T1),
@@ -192,22 +177,6 @@ def erf(
192177
O[None] = UnaryFn.erf(I[None])
193178

194179

195-
@linalg_structured_op
196-
def elemwise_binary(
197-
lhs=TensorDef(T1),
198-
rhs=TensorDef(T2),
199-
O=TensorDef(U, output=True),
200-
fun=BinaryFnAttrDef(default=BinaryFn.add),
201-
cast=TypeFnAttrDef(default=TypeFn.cast_signed),
202-
):
203-
"""Applies the binary function fun elementwise.
204-
205-
Numeric casting is performed on the input operand, promoting it to the same
206-
data type as the accumulator/output.
207-
"""
208-
O[None] = fun(cast(U, lhs[None]), cast(U, rhs[None]))
209-
210-
211180
@linalg_structured_op
212181
def add(
213182
lhs=TensorDef(T1),

0 commit comments

Comments
 (0)