mirror of https://github.com/llvm/torch-mlir
Switch sample tracer to emit builtin_ufunc globals instead of the impl versions.
parent
497f1de5a2
commit
db0b0ef1b2
|
@ -91,26 +91,8 @@ def load_builtin_module(context=None):
|
|||
|
||||
|
||||
_BUILTIN_MODULE_ASM = r"""
|
||||
numpy.generic_ufunc @numpy.add (
|
||||
overload(%arg0: i32, %arg1: i32) -> i32 {
|
||||
%0 = addi %arg0, %arg1 : i32
|
||||
numpy.ufunc_return %0 : i32
|
||||
},
|
||||
overload(%arg0: f32, %arg1: f32) -> f32 {
|
||||
%0 = addf %arg0, %arg1 : f32
|
||||
numpy.ufunc_return %0 : f32
|
||||
}
|
||||
)
|
||||
numpy.generic_ufunc @numpy.multiply (
|
||||
overload(%arg0: i32, %arg1: i32) -> i32 {
|
||||
%0 = muli %arg0, %arg1 : i32
|
||||
numpy.ufunc_return %0 : i32
|
||||
},
|
||||
overload(%arg0: f32, %arg1: f32) -> f32 {
|
||||
%0 = mulf %arg0, %arg1 : f32
|
||||
numpy.ufunc_return %0 : f32
|
||||
}
|
||||
)
|
||||
numpy.builtin_ufunc @numpy.add
|
||||
numpy.builtin_ufunc @numpy.multiply
|
||||
"""
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in New Issue