示例#1
0
文件: ops.py 项目: ddcc/llvm-project
 def pass_an_op_directly(arg0, arg1):
     one = arith.ConstantOp(F32Type.get(), 1.0)
     # CHECK: %[[LHS:.*]] = linalg.fill
     lhs = linalg.fill(one, outs=[arg0])
     # CHECK: %[[RHS:.*]] = linalg.fill
     rhs = linalg.fill(one, outs=[arg1])
     # CHECK: %[[INIT:.*]] = linalg.init_tensor
     init = linalg.InitTensorOp([4, 8], f32)
     # CHECK: linalg.matmul
     # CHECK: ins(%[[LHS]], %[[RHS]]
     # CHECK: outs(%[[INIT]]
     return linalg.matmul(lhs, rhs, outs=init)
示例#2
0
 def fill_2d_on_buffers(value, out):
     linalg.fill(value, outs=[out], emit_generic=True)
示例#3
0
 def fill_2d_on_buffers(value, out):
     linalg.fill(value, outs=[out])
示例#4
0
文件: ops.py 项目: ddcc/llvm-project
 def fill_buffer(out):
     zero = arith.ConstantOp(value=FloatAttr.get(f32, 0.),
                             result=f32).result
     linalg.fill(zero, outs=[out])
示例#5
0
文件: ops.py 项目: ddcc/llvm-project
 def fill_tensor(out):
     zero = arith.ConstantOp(value=FloatAttr.get(f32, 0.),
                             result=f32).result
     return linalg.fill(zero, outs=[out])