diff --git a/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td b/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td --- a/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td +++ b/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td @@ -2183,13 +2183,13 @@ } -def GPU_SDDMMBufferSizeOp : GPU_Op<"sddmm_buffer_size", [GPU_AsyncOpInterface]> { - let summary = "Precompute buffersize for SDDMM operation"; +def GPU_SpGEMMBufferSizeOp : GPU_Op<"spgemm_buffer_size", [GPU_AsyncOpInterface]> { + let summary = "Precompute buffersize for SpGEMM operation"; let description = [{ - The `gpu.sddmm_buffer_size` operation returns the buffer size required - to perform the SDDMM operation on the given sparse and dense matrices. + The `gpu.spgemm_buffer_size` operation returns the buffer size required + to perform the SpGEMM operation on the given sparse and dense matrices. The operation expects handles returned by previous sparse operations - to construct an environment and the operands for SDDMM. + to construct an environment and the operands for SpGEMM. If the `async` keyword is present, the op is executed asynchronously (i.e. it does not block until the execution has finished on the device). In @@ -2198,7 +2198,7 @@ Example: ```mlir - %buffersz, %token = gpu.sddmm_buffer_size async [%dep] %env, %dnmatA{TRANSPOSE}, %dnmatB{TRANSPOSE}, %spmatC into f32 + %buffersz, %token = gpu.spgemm_buffer_size async [%dep] %dnmatA{TRANSPOSE}, %dnmatB{TRANSPOSE}, %spmatC into f32 ``` The matrix arguments can also be associated with one of the following @@ -2207,7 +2207,6 @@ }]; let arguments = (ins Variadic:$asyncDependencies, - GPU_SparseEnvHandle:$env, GPU_TransposeModeAttr:$modeA, GPU_TransposeModeAttr:$modeB, GPU_SparseSpMatHandle:$dnmatA, @@ -2220,7 +2219,6 @@ "Type":$bufferSz, "Type":$asyncToken, "ValueRange":$asyncDependencies, - "Value":$env, "Value":$spmatA, "Value":$spmatB, "Value":$spmatC, @@ -2228,12 +2226,12 @@ auto modeA = gpu::TransposeMode::NON_TRANSPOSE; auto modeB = gpu::TransposeMode::NON_TRANSPOSE; return build($_builder, $_state, bufferSz, asyncToken, asyncDependencies, - env, modeA, modeB, spmatA, spmatB, spmatC, computeType);}]> + modeA, modeB, spmatA, spmatB, spmatC, computeType);}]> ]; let assemblyFormat = [{ custom(type($asyncToken), $asyncDependencies) - $env `,` $spmatA (`{` $modeA^ `}`)? `,` $spmatB (`{` $modeB^ `}`)? `,` $spmatC attr-dict `into` $computeType + $spmatA (`{` $modeA^ `}`)? `,` $spmatB (`{` $modeB^ `}`)? `,` $spmatC attr-dict `into` $computeType }]; } @@ -2254,7 +2252,7 @@ Example: ```mlir - %token = gpu.spgemm async [%dep] %env, %spmatA{TRANSPOSE}, %spmatB{TRANSPOSE}, %spmatC, %buffer into f32 + %token = gpu.spgemm async [%dep] %spmatA{TRANSPOSE}, %spmatB{TRANSPOSE}, %spmatC, %buffer into f32 ``` The matrix arguments can also be associated with one of the following @@ -2263,7 +2261,6 @@ }]; let arguments = (ins Variadic:$asyncDependencies, - GPU_SparseEnvHandle:$env, GPU_TransposeModeAttr:$modeA, GPU_TransposeModeAttr:$modeB, GPU_SparseSpMatHandle:$spmatA, @@ -2276,7 +2273,6 @@ let builders = [OpBuilder<(ins "Type":$asyncToken, "ValueRange":$asyncDependencies, - "Value":$env, "Value":$spmatA, "Value":$spmatB, "Value":$spmatC, @@ -2284,13 +2280,13 @@ "Value":$buffer), [{ auto modeA = gpu::TransposeMode::NON_TRANSPOSE; auto modeB = gpu::TransposeMode::NON_TRANSPOSE; - return build($_builder, $_state, asyncToken, asyncDependencies, env, modeA, + return build($_builder, $_state, asyncToken, asyncDependencies, modeA, modeB, spmatA, spmatB, spmatC, computeType, buffer);}]> ]; let assemblyFormat = [{ custom(type($asyncToken), $asyncDependencies) - $env `,` $spmatA (`{` $modeA^ `}`)? `,` $spmatB (`{` $modeB^ `}`)? `,` $spmatC `,` $buffer attr-dict `:` type($buffer) `into` $computeType + $spmatA (`{` $modeA^ `}`)? `,` $spmatB (`{` $modeB^ `}`)? `,` $spmatC `,` $buffer attr-dict `:` type($buffer) `into` $computeType }]; }