-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This took a lot of time to figure out, but we can generate linux and osx wheels now on GitHub Actions that seem functional on both systems. Will probably hit problems, e.g. with different Mac OSs, but I suspect that the right tweaks cibuildwheel arguments will be able to fix those.
- Loading branch information
Showing
8 changed files
with
90 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.lake/** | ||
\.lake/ | ||
__pycache__/ | ||
*.so | ||
*.dSYM | ||
/.vscode/ | ||
.wheel/ | ||
.vscode/ | ||
/.wheel/ |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
include klr/bin/* | ||
# All files must be below the python project root | ||
include bin/klr |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// A dummy file to trick Python's `build` into makeing an arch-specific wheel. | ||
|
||
#include <stdio.h> | ||
|
||
int main() { | ||
printf("Hello, World!\n"); | ||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
# NB: All this setuptools stuff took about 1000 hours to figure out so never delete this. | ||
[build-system] | ||
#requires = ["setuptools>=61.0"] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "klr" | ||
version = "0.0.2" | ||
description = "Intermediate langauge for tensor compilers" | ||
version = "0.0.3" | ||
authors = [ | ||
{name = "Paul Govereau", email = "[email protected]"}, | ||
{name = "Sean McLaughlin", email = "[email protected]"}, | ||
] | ||
description = "Intermediate langauge for tensor compilers" | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
keywords = ["trainium", "tpu", "pallas", "triton", "gpu"] | ||
|
@@ -20,12 +26,24 @@ dependencies = [ | |
"ml_dtypes", | ||
"numpy", | ||
] | ||
requires-python = ">= 3.8" # cibuildwheel can't seem to handle eariler versions | ||
|
||
[project.urls] | ||
Repository = "https://github.com/leanprover/KLR" | ||
|
||
[tool.pytest.ini_options] | ||
pythonpath = "." # Needed for tests to pass | ||
testpaths = [ | ||
"test", | ||
] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/leanprover/KLR" | ||
[tool.setuptools] | ||
packages = ["bin", "klr", "nki", 'nki.isa', 'nki.language'] # This field is tequired to have more than 1 top level packages (nki/klr). It's not beautiful but it works. | ||
|
||
# Build a fake C file to trick the `build` command to make an arch-specific wheel | ||
# We need this because we hide our `klr` Lean binary in the wheel but Python tools | ||
# don't know about it. I couldn't find another way to stop Python from generating | ||
# a generic `any` wheel. | ||
[[tool.setuptools.ext-modules]] | ||
name = "noop" | ||
sources = ["noop.c"] |