Skip to content

[hipblaslt] Fix bug in TensorDescriptor#7050

Merged
minsukim-amd merged 1 commit into
developfrom
users/minsukim/tensor_descriptor_bug_fix_20260504
May 5, 2026
Merged

[hipblaslt] Fix bug in TensorDescriptor#7050
minsukim-amd merged 1 commit into
developfrom
users/minsukim/tensor_descriptor_bug_fix_20260504

Conversation

@minsukim-amd
Copy link
Copy Markdown
Contributor

Motivation

PR #6499 ("[hipblaslt] Add support for gfx950 mxfp4") changed DataTypeInfo::elementSize from size_tfloat to support sub-byte FP4/FP6 packed types, but missed updating one assert in tensilelite/include/Tensile/TensorDescriptor.hpp:352. The expression totalAllocatedElements() * info.elementSize % info.packing then evaluates to float % size_t, which the C++ compiler rejects with:

error: invalid operands to binary expression ('float' and 'const size_t' (aka 'const unsigned long'))

Technical Details

Uses the existing multiplyElementSize helper from Utils.hpp (already included). It properly handles the float elementSize for both whole-byte (≥1.0) and sub-byte (0.5, 0.75) cases, returning a size_t.

Test Plan

Build hipblaslt via install.sh locally

Test Result

MessagePack.cpp now builds clean

Submission Checklist

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

❌ Your project status has failed because the head coverage (77.83%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7050   +/-   ##
========================================
  Coverage    64.73%   64.73%           
========================================
  Files         2108     2108           
  Lines       328677   328677           
  Branches     43144    43144           
========================================
  Hits        212750   212750           
  Misses       98006    98006           
  Partials     17921    17921           
Flag Coverage Δ *Carryforward flag
hipBLAS 90.65% <ø> (ø) Carriedforward from 9d23823
hipBLASLt 39.83% <ø> (ø)
hipCUB 82.21% <ø> (ø) Carriedforward from 9d23823
hipDNN 79.75% <ø> (ø) Carriedforward from 9d23823
hipFFT 54.95% <ø> (ø) Carriedforward from 9d23823
hipRAND 76.12% <ø> (ø) Carriedforward from 9d23823
hipSOLVER 69.24% <ø> (ø) Carriedforward from 9d23823
hipSPARSE 84.70% <ø> (ø) Carriedforward from 9d23823
rocBLAS 48.11% <ø> (ø) Carriedforward from 9d23823
rocFFT 48.18% <ø> (ø) Carriedforward from 9d23823
rocPRIM 38.99% <ø> (ø) Carriedforward from 9d23823
rocRAND 57.03% <ø> (ø) Carriedforward from 9d23823
rocSOLVER 77.83% <ø> (ø) Carriedforward from 9d23823
rocSPARSE 72.82% <ø> (ø) Carriedforward from 9d23823

*This pull request uses carry forward flags. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@minsukim-amd minsukim-amd merged commit 5d736c6 into develop May 5, 2026
63 of 66 checks passed
@minsukim-amd minsukim-amd deleted the users/minsukim/tensor_descriptor_bug_fix_20260504 branch May 5, 2026 05:35
aledudek pushed a commit that referenced this pull request May 20, 2026
## Motivation

PR #6499 ("[hipblaslt] Add support for gfx950 mxfp4") changed
`DataTypeInfo::elementSize` from `size_t` → `float` to support sub-byte
FP4/FP6 packed types, but missed updating one assert in
`tensilelite/include/Tensile/TensorDescriptor.hpp:352`. The expression
`totalAllocatedElements() * info.elementSize % info.packing` then
evaluates to `float % size_t`, which the C++ compiler rejects with:

`error: invalid operands to binary expression ('float' and 'const
size_t' (aka 'const unsigned long'))`

## Technical Details

Uses the existing `multiplyElementSize` helper from `Utils.hpp` (already
included). It properly handles the float `elementSize` for both
whole-byte (≥1.0) and sub-byte (0.5, 0.75) cases, returning a `size_t`.

## Test Plan

Build hipblaslt via `install.sh` locally

## Test Result

`MessagePack.cpp` now builds clean

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants