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

Fix a non-c-typedef-for-linkage error #14857

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

gfengTT
Copy link
Contributor

@gfengTT gfengTT commented Nov 7, 2024

Allowing compilation to pass on Blackhole.

Ticket

Forge Issue

Problem description

Compilation failed in forge:

/localdev/gfeng/fg/third_party/tt-mlir/third_party/tt-metal/src/tt-metal/tt_metal/hw/inc/blackhole/tensix_types.h:60:15: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Werror,-Wnon-c-typedef-for-linkage]
   60 | typedef struct {
      |               ^
      |                fifo_ctl_t
/localdev/gfeng/fg/third_party/tt-mlir/third_party/tt-metal/src/tt-metal/tt_metal/hw/inc/blackhole/tensix_types.h:66:5: note: type is not C-compatible due to this member declaration
   66 |     operator std::string() const {
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   67 |         return fmt::format("Fifo Control: rd_ptr(0x{:08x}) wr_ptr(0x{:08x})", rd_ptr, wr_ptr);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |     }
      |     ~
/localdev/gfeng/fg/third_party/tt-mlir/third_party/tt-metal/src/tt-metal/tt_metal/hw/inc/blackhole/tensix_types.h:70:3: note: type is given name 'fifo_ctl_t' for linkage purposes by this typedef declaration
   70 | } fifo_ctl_t;
      |   ^
1 error generated.

What's changed

The same change has been made to wormhole:

Checklist

  • Post commit CI passes
  • Blackhole Post commit (if applicable)
  • Model regression CI testing passes (if applicable)
  • Device performance regression CI testing passes (if applicable)
  • New/Existing tests provide coverage for changes

@gfengTT gfengTT force-pushed the gfeng/fix-blackhole-compilation branch 2 times, most recently from b9fa577 to bb1b795 Compare November 9, 2024 22:37
Allowing compilation to pass on Blackhole.
@gfengTT gfengTT force-pushed the gfeng/fix-blackhole-compilation branch from bb1b795 to a484ea2 Compare November 12, 2024 17:33
@gfengTT gfengTT merged commit b074101 into main Nov 12, 2024
9 checks passed
@gfengTT gfengTT deleted the gfeng/fix-blackhole-compilation branch November 12, 2024 17:38
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.

2 participants