Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw ConfigError for unsupported WMMA shapes #166

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/config.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@ function check_operator_config(operator::Type{<:Operator.GeneralFPUOp})
end
end

function check_wmma_shape(operator::Type)
op_shape = Operator.shape(operator)

if op_shape ∉ [(M=16, N=16, K=16)]
throw(ConfigError("Unsupported WMMA Operator shape $(op_shape)!"))
end
end

check_operator_config(operator::Type{<:Operator.WMMAOp}) = check_wmma_shape(operator)
check_operator_config(operator::Type{<:Operator.WMMAComplexOp}) = check_wmma_shape(operator)
check_operator_config(operator::Type{<:Operator.WMMADualOp}) = check_wmma_shape(operator)

function get_config(; gemm_shape, operator, global_a_layout, global_c_layout, kwargs...)
params = Dict(kwargs)

Expand Down