-
Notifications
You must be signed in to change notification settings - Fork 517
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
Add torch-mlir-no-jit-importer
build case for mac os wheels
#1902
Merged
Conversation
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
makslevental
force-pushed
the
out_of_tree_build
branch
3 times, most recently
from
March 3, 2023 21:53
f43beca
to
055333b
Compare
makslevental
changed the title
add flags to setup.py for out-of-tree build
Add Mar 3, 2023
torch-mlir-no-jit-importer
build case for mac os wheels
makslevental
commented
Mar 3, 2023
powderluv
approved these changes
Mar 3, 2023
also run a nightly build with the "One shot build" |
using main repo branch (rather than my fork) to do a oneshot build produce a wheel (here). Demo of using the wheel: (nelli) mlevental@maksims-MacBook-Pro examples % cat demo.py
import torch_mlir.ir
from torch_mlir.dialects import torch
with torch_mlir.ir.Context() as ctx:
torch.register_dialect(ctx)
with torch_mlir.ir.Location.unknown() as loc:
module = torch_mlir.ir.Module.create(loc)
with torch_mlir.ir.InsertionPoint.at_block_begin(module.body):
n = torch.ConstantNoneOp()
module.operation.print()
(nelli) mlevental@maksims-MacBook-Pro examples % python demo.py
Traceback (most recent call last):
File "/Users/mlevental/dev_projects/loopy/examples/demo.py", line 2, in <module>
import torch_mlir.ir
ModuleNotFoundError: No module named 'torch_mlir'
(nelli) mlevental@maksims-MacBook-Pro examples % pip install https://github.com/llvm/torch-mlir/releases/download/oneshot-20230304.83/torch_mlir_no_jit_importer-20230304.83-cp311-cp311-macosx_11_0_universal2.whl
Collecting torch-mlir-no-jit-importer==20230304.83
Downloading https://github.com/llvm/torch-mlir/releases/download/oneshot-20230304.83/torch_mlir_no_jit_importer-20230304.83-cp311-cp311-macosx_11_0_universal2.whl (58.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.6/58.6 MB 18.6 MB/s eta 0:00:00
Requirement already satisfied: numpy in /Users/mlevental/miniforge3/envs/nelli/lib/python3.11/site-packages (from torch-mlir-no-jit-importer==20230304.83) (1.24.2)
Installing collected packages: torch-mlir-no-jit-importer
Successfully installed torch-mlir-no-jit-importer-20230304.83
(nelli) mlevental@maksims-MacBook-Pro examples % python demo.py
module {
%none = torch.constant.none
}
(nelli) mlevental@maksims-MacBook-Pro examples % pip freeze | grep torch
torch-mlir-no-jit-importer @ https://github.com/llvm/torch-mlir/releases/download/oneshot-20230304.83/torch_mlir_no_jit_importer-20230304.83-cp311-cp311-macosx_11_0_universal2.whl
(nelli) mlevental@maksims-MacBook-Pro examples % |
makslevental
force-pushed
the
out_of_tree_build
branch
3 times, most recently
from
March 5, 2023 03:55
4d4d381
to
e641adc
Compare
- add wheels script cases for mac wheels
makslevental
force-pushed
the
out_of_tree_build
branch
from
March 5, 2023 17:44
e641adc
to
31a664b
Compare
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.
This PR adds a build case in the
build_macos_packages.sh
fortorch-mlir-no-jit-importer
. This is probably not the best way to factor this, which is why I didn't go ahead and add such cases to the other platforms/targets.