| 61 | } |
| 62 | |
| 63 | void MatmulKernel::CreateCompute( |
| 64 | Block* entryBlock, mlir::OpBuilder& op_builder, mlir::MLIRContext* ctx, |
| 65 | TContext* context) const { |
| 66 | Value input_a = entryBlock->getArgument(0); |
| 67 | Value input_b = entryBlock->getArgument(1); |
| 68 | Value output_c = entryBlock->getArgument(2); |
| 69 | |
| 70 | SmallVector<Value> inputs_val; |
| 71 | SmallVector<Value> outputs_val; |
| 72 | inputs_val.push_back(input_a); |
| 73 | inputs_val.push_back(input_b); |
| 74 | outputs_val.push_back(output_c); |
| 75 | |
| 76 | op_builder.create<linalg::MatmulOp>( |
| 77 | op_builder.getUnknownLoc(), inputs_val, outputs_val); |
| 78 | std::vector<Value> results; |
| 79 | op_builder.create<ReturnOp>(op_builder.getUnknownLoc(), results); |
| 80 | } |
| 81 | |
| 82 | void MatmulKernel::CreatePass( |
| 83 | mlir::PassManager& pm, mlir::MLIRContext* ctx, TContext* context) const { |
nothing calls this directly
no outgoing calls
no test coverage detected