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 setup.py for Anaconda #17111

Merged
merged 12 commits into from
Jan 28, 2025
14 changes: 10 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,14 @@ def is_editable_install_(self):
return self.inplace


# Include tt_metal_C for kernels and src/ and tools
# And any kernels inside `tt_eager/tt_dnn. We must keep all ops kernels inside tt_dnn
packages = ["tt_lib", "tt_metal", "tt_lib.models", "ttnn", "ttnn.cpp", "tracy"]
packages = find_namespace_packages(where="ttnn")
packages = [item for item in packages if not item.startswith("cpp")]
packages.append("tt_metal")
packages.append("ttnn.cpp")

print(("packaging: ", packages))

kernel_files = find_files_in_kernels_subdir("ttnn")
blozano-tt marked this conversation as resolved.
Show resolved Hide resolved
# Empty sources in order to force extension executions
ttnn_lib_C = Extension("ttnn._ttnn", sources=[])

Expand All @@ -192,11 +196,13 @@ def is_editable_install_(self):
packages=packages,
package_dir={
"": "ttnn", # only this is relevant in case of editable install mode
"tracy": "ttnn/tracy",
"tt_metal": "tt_metal", # kernels depend on headers here
"ttnn.cpp": "ttnn/cpp",
"tt_lib.models": "models", # make sure ttnn does not depend on model and remove!!!
},
package_data={
"ttnn.cpp": ["*.cpp", "*.hpp", "*.cc", "*.h"],
},
include_package_data=True,
long_description_content_type="text/markdown",
ext_modules=ext_modules,
Expand Down
10 changes: 10 additions & 0 deletions ttnn/tt_lib/fused_ops/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent Inc.

# SPDX-License-Identifier: Apache-2.0

from .add_and_norm import *
from .average_pool import *
from .layernorm import *
from .linear import *
from .max_pool import *
from .softmax import *
Loading