-
Notifications
You must be signed in to change notification settings - Fork 102
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
#0: Fix ttnn shared libs build #17127
Conversation
@@ -62,8 +62,9 @@ class type_caster<ttnn::SimpleShape> { | |||
public: | |||
PYBIND11_TYPE_CASTER(ttnn::SimpleShape, _("SimpleShape")); | |||
|
|||
bool load(handle src, bool); | |||
static handle cast(const ttnn::SimpleShape& src, return_value_policy /* policy */, handle /* parent */); | |||
PYBIND11_EXPORT bool load(handle src, bool); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don’t need to export the class itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried making the whole namespace visible initially, but that didn't work.
The error I got was that the function was an undefined hidden symbol. Just exporting the function made it work.
### Problem description Build using `--ttnn-shared-sublibs` was broken ### What's changed Pybind uses hidden visibility, which causes a linker error for functions defined in *.cpp files. Defintions moved to header file. ### Checklist - [ ] Post commit CI [passes](https://github.com/tenstorrent/tt-metal/actions/runs/13003713246)
### Problem description Build using `--ttnn-shared-sublibs` was broken ### What's changed Pybind uses hidden visibility, which causes a linker error for functions defined in *.cpp files. Defintions moved to header file. ### Checklist - [ ] Post commit CI [passes](https://github.com/tenstorrent/tt-metal/actions/runs/13003713246)
### Problem description Build using `--ttnn-shared-sublibs` was broken ### What's changed Pybind uses hidden visibility, which causes a linker error for functions defined in *.cpp files. Defintions moved to header file. ### Checklist - [ ] Post commit CI [passes](https://github.com/tenstorrent/tt-metal/actions/runs/13003713246)
Problem description
Build using
--ttnn-shared-sublibs
was brokenWhat's changed
Pybind uses hidden visibility, which causes a linker error for functions defined in *.cpp files.
Defintions moved to header file.
Checklist