Conversation
Just a simple demonstration of converting this project to uv. Install uv with ``` $ curl -LSsf https://astral.sh/uv/install.sh -o /tmp/uvinstall.sh \ && sh /tmp/uvinstall.sh $ curl -LSsf https://astral.sh/uv/install.sh | sh ``` Then do the following ``` $ uv run pytest -v -x ./tests ``` You can also build with which places wheels and zips in `dist/` ``` $ uv build ``` I've also slightly updated the Makefile to use the python and pip from the local environment.
Builds fine on my machine. Pushing to pull and then test in clean directory and on mac to make sure cpu only version works out. The will perform cleanup duties.
So this is kinda working but there's still some issues with the setup.py file. These issues are kinda old so I'm just going to resolve them. Mainly the problems are with the logic and environment detections. That whole file is going to change so pushing this up first. (Probably don't actually need setuptools-cuda but will fix that with the next fix)
The following commands work: uv pip install -e . uv build I have also made significant changes for added flexibility. We use a global env dictionary to handle all our variables compactly. We also modified the way that the autogen policies are created so that we may be more flexible to future builds and options. This should lead to better extendability Tested on Linux with 4080S. Still need to test on other hardware
stevenwalton
added a commit
to stevenwalton/NATTEN
that referenced
this pull request
Nov 1, 2025
This is the setup.py file from PR SHI-Labs#273 Updated with the minor change needed for blackwell ultra Minor change to src/natten/profiler: f-strings had use of " inside f (e.g. f"{", ".join(...)}.") This is not supported in all python versions and is bad practice as it is less readable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converted install process to work with
uvand virtual environments. While doing so I performed general upgrades to the setup file and our project file will make NATTEN more easily searchable on pypiChanges
pyproject.tomlfilesetup.py: This file should now be easier to edit for future architectures and flexible to other types of changes. Please reviewMakefilenow loads programs from the user's environment. This was the main issue previously as it would buildnatteninto the wrong python version if you used environments.CMakeListswas missing the ability to passCMAKE_CUDA_FLAGSfrom thesetup.pyfile. Now we can. Do we can runCMAKE_CUDA_FLAGS="-Wno-deprecated-declarations" uv pip install -e .if we want to turn off the cutlass deprecation warnings while building.requirements.txt: now handled bypyproject.tomlrequirements-dev.txt: now handled bypyproject.tomlsetup.cfg: No longer neededuv.locksetup.pyBuild process
$ git clone --recursive https://github.com/SHI-Labs/NATTEN $ cd NATTENOption 1: Explicit
Option 2: One liner
Option 3: Build
After each of these options you may run the profile commands
Verified systems
TODO:
pyproject.tomlon lines 22 and 25 to add your email address. We can either keep authors as is or include all contributors. Maintainers is what pypi shows and should stay you.