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

Unify WMMA and FPU operator typevars [NFC] #122

Merged
merged 1 commit into from
Jun 30, 2023
Merged

Unify WMMA and FPU operator typevars [NFC] #122

merged 1 commit into from
Jun 30, 2023

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Jun 30, 2023

The WMMA operator only had a T typevar for the accumulator type, while the FPU operator had DT for the destination type and CT for the compute type. Unify that by adding both compute type (CT) and accumulator type (AT) typevars that indicate the type that should be used for the register-level storage and operations.

Note that the WMMA operator's typevars are actually not useful, and should match the eltype of the shared memory (as we use WMMA intrinsics to load/store shared memory, so cannot convert between shared memory and registers). However, we need the accumulator typevar as it cannot be inferred from arguments at some points, so I decided to add the compute typevar too for alignment with the FPU operator.

The WMMA operator only had a T typevar for the accumulator type,
while the FPU operator had DT for the destination type and CT for
the compute type. Unify that by adding both compute type (CT) and
accumulator type (AT) typevars that indicate the type that should
be used for the register-level storage and operations.

Note that the WMMA operator's typevars are actually not useful, and
should match the eltype of the shared memory (as we use WMMA intrinsics
to load/store shared memory, so cannot convert between shared memory and
registers). However, we need the accumulator typevar as it cannot be
inferred from arguments at some points, so I decided to add the compute
typevar too for alignment with the FPU operator.
@maleadt
Copy link
Member Author

maleadt commented Jun 30, 2023

Benchmark results for commit ff15b5b (comparing to ef5e19b):
No regressions or improvements detected.

@codecov
Copy link

codecov bot commented Jun 30, 2023

Codecov Report

Patch coverage: 27.77% and project coverage change: -0.04 ⚠️

Comparison is base (ef5e19b) 30.39% compared to head (ff15b5b) 30.35%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #122      +/-   ##
==========================================
- Coverage   30.39%   30.35%   -0.04%     
==========================================
  Files          11       11              
  Lines         783      784       +1     
==========================================
  Hits          238      238              
- Misses        545      546       +1     
Impacted Files Coverage Δ
src/operator.jl 11.72% <25.71%> (ø)
src/blas.jl 83.33% <100.00%> (-2.88%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@maleadt maleadt merged commit a7f6021 into master Jun 30, 2023
@maleadt maleadt deleted the tb/typevars branch June 30, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant