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

[Bug Report] sfpi doesn't support shifting by register #18161

Open
jasondavies opened this issue Feb 21, 2025 · 0 comments
Open

[Bug Report] sfpi doesn't support shifting by register #18161

jasondavies opened this issue Feb 21, 2025 · 0 comments
Labels
bug Something isn't working community

Comments

@jasondavies
Copy link
Contributor

Describe the bug

The hardware (at least Wormhole): supports shifting by register as well as immediate value. Right now, only immediate values are supported.

To Reproduce

Insert into any LLK:

vInt foo = 1;
vInt bar = 1;
foo <<= bar;

This will fail to compile with error: no match for 'operator<<=' (operand types are 'sfpi::vInt' and 'sfpi::vInt')

/home/jason/tt-metal/runtime/sfpi/include/sfpi.h:556:22: note: candidate: 'sfpi::vInt sfpi::vInt::operator<<(uint32_t)'
  556 |     sfpi_inline vInt operator<<=(uint32_t amt) { this->__vIntBase::operator<<=<vInt>(amt); return v; }
      |                      ^~~~~~~~
/home/jason/tt-metal/runtime/sfpi/include/sfpi.h:556:43: note:   no known conversion for argument 1 from 'sfpi::vInt' to 'uint32_t' {aka 'long unsigned int'}
  556 |     sfpi_inline vInt operator<<=(uint32_t amt) { this->__vIntBase::operator<<=<vInt>(amt); return v; }
      |                                  ~~~~~~~~~^~~

Expected behavior

This should compile.

Please complete the following environment information:

@jasondavies jasondavies added the bug Something isn't working label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community
Projects
None yet
Development

No branches or pull requests

1 participant