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
Merged

Fix setup.py for Anaconda #17111

merged 12 commits into from
Jan 28, 2025

Conversation

blozano-tt
Copy link
Contributor

@blozano-tt blozano-tt commented Jan 25, 2025

Problem description

For some reason we are manually specifying the python modules to be packaged into a wheel, and/or installed using pip.

We aren't relying on auto-discovery.

When I tried to package in Anaconda with Python 3.10, I could not import ttnn.

What's changed

Adjusted to use auto discovery function.
For some reason I had to add an __init__.py to tt_lib.fused_ops
Updated manifest to package ttnn kernel files.

Checklist

@blozano-tt
Copy link
Contributor Author

Looks like this attempt to do the right thing has broken the packaging of some kernels.

Need to triage.

             Always | FATAL    | Kernel file ttnn/cpp/ttnn/operations/eltwise/unary/device/kernels/compute/eltwise_sfpu.cpp doesn't exist!
             Always | FATAL    | Kernel file ttnn/cpp/ttnn/operations/eltwise/unary/device/kernels/dataflow/reader_unary_interleaved_start_id.cpp doesn't exist!
             Always | FATAL    | Kernel file ttnn/cpp/ttnn/operations/eltwise/unary/device/kernels/dataflow/writer_unary_interleaved_start_id.cpp doesn't exist!
             Always | FATAL    | Failed to generate binaries for eltwise_sfpu TT_FATAL @ /home/ubuntu/actions-runner/_work/tt-metal/tt-metal/tt_metal/jit_build/genfiles.cpp:80: does_file_exist

info:
Kernel file ttnn/cpp/ttnn/operations/eltwise/unary/device/kernels/compute/eltwise_sfpu.cpp doesn't exist!

@tt-rkim
Copy link
Collaborator

tt-rkim commented Jan 25, 2025

ah to get needed files in ttnn, which were the kernel files, I believe the ttnn.cpp declaration was needed when we didn't use autodiscovery before

I'm not sure if that's correct, but that's what we did before

@blozano-tt
Copy link
Contributor Author

ah to get needed files in ttnn, which were the kernel files, I believe the ttnn.cpp declaration was needed when we didn't use autodiscovery before

I'm not sure if that's correct, but that's what we did before

I’m trying to combine auto discovery with manual adjust in this PR. Let’s see if I can get there.

@blozano-tt
Copy link
Contributor Author

ah to get needed files in ttnn, which were the kernel files, I believe the ttnn.cpp declaration was needed when we didn't use autodiscovery before

I'm not sure if that's correct, but that's what we did before

@tt-rkim for when you are feeling better.

I manually add ttnn.cpp in the latest commit and same failure.

what is this python black magic?

maybe these cpp files are supposed to be mentioned in the manifest?

@blozano-tt
Copy link
Contributor Author

I have diffed the wheel from this PR, vs main ... and the only difference is that this PR's wheel has no ttnn/cpp folder.

setup.py Outdated Show resolved Hide resolved
@blozano-tt blozano-tt merged commit 4ceaf6b into main Jan 28, 2025
195 of 220 checks passed
@blozano-tt blozano-tt deleted the blozano-python-quirk branch January 28, 2025 21:39
williamlyTT pushed a commit that referenced this pull request Jan 30, 2025
yieldthought pushed a commit that referenced this pull request Jan 31, 2025
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.

3 participants