Skip to content

Commit

Permalink
#0: Fix ttnn shared libs build (tenstorrent#17127)
Browse files Browse the repository at this point in the history
### 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)
  • Loading branch information
sankarmanoj-tt authored and nikileshx committed Feb 3, 2025
1 parent 54468f5 commit f4a279c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ttnn/cpp/ttnn/tensor/shape/shape.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
PYBIND11_EXPORT static handle cast(
const ttnn::SimpleShape& src, return_value_policy /* policy */, handle /* parent */);
};
} // namespace detail
} // namespace PYBIND11_NAMESPACE
Expand Down

0 comments on commit f4a279c

Please sign in to comment.