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

python3Packages.torch: 1.13.1 -> 2.0.0 #222273

Merged
merged 10 commits into from Apr 8, 2023
Merged

Conversation

SomeoneSerge
Copy link
Contributor

@SomeoneSerge SomeoneSerge commented Mar 21, 2023

Warnings

XXXX-XX-XX: After this change, torchWithRocm is going to require allowUnfree = true because python3Packages.openai-triton assumes a copy of cudatoolkit's ptxas in their site-packages. I'm preparing a follow-up PR that patches this around, but in the meantime hydra won't be building torchWithRocm

2023-04-06: Upstream uses a fork of triton: https://github.com/ROCmSoftwarePlatform/triton/releases/tag/pytorch-triton-rocm-v2.0.1, which follows LLVM 17. This PR uses OpenAI's triton repo and LLVM 15, so beware of possible deviations

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@SomeoneSerge
Copy link
Contributor Author

torchWithRocm now requires https://pypi.org/project/pytorch-triton-rocm/, which appears to be a build of https://github.com/openai/triton/, which don't package yet

@SomeoneSerge
Copy link
Contributor Author

Result of nixpkgs-review pr 222273 --extra-nixpkgs-config '{ cudaCapabilities = [ "8.6" ]; }' run on x86_64-linux 1

58 packages failed to build:
  • ocamlPackages.torch
  • openai-full
  • openai-full.dist
  • python310Packages.arviz
  • python310Packages.arviz.dist
  • python310Packages.bambi
  • python310Packages.bambi.dist
  • python310Packages.dalle-mini
  • python310Packages.dalle-mini.dist
  • python310Packages.deepdish
  • python310Packages.deepdish.dist
  • python310Packages.elegy
  • python310Packages.elegy.dist
  • python310Packages.fastai
  • python310Packages.fastai.dist
  • python310Packages.flammkuchen
  • python310Packages.flammkuchen.dist
  • python310Packages.pandas-stubs
  • python310Packages.pandas-stubs.dist
  • python310Packages.pymanopt
  • python310Packages.pymanopt.dist
  • python310Packages.pymc
  • python310Packages.pymc.dist
  • python310Packages.pywick
  • python310Packages.pywick.dist
  • python310Packages.qiskit
  • python310Packages.qiskit-machine-learning
  • python310Packages.qiskit-machine-learning.dist
  • python310Packages.qiskit.dist
  • python310Packages.shap
  • python310Packages.shap.dist
  • python310Packages.skorch
  • python310Packages.skorch.dist
  • python310Packages.skrl
  • python310Packages.skrl.dist
  • python310Packages.slicer
  • python310Packages.slicer.dist
  • python310Packages.spacy
  • python310Packages.spacy-transformers
  • python310Packages.spacy-transformers.dist
  • python310Packages.spacy.dist
  • python310Packages.stytra
  • python310Packages.stytra.dist
  • python310Packages.textacy
  • python310Packages.textacy.dist
  • python310Packages.textnets
  • python310Packages.textnets.dist
  • python310Packages.timm
  • python310Packages.timm.dist
  • python310Packages.tiny-cuda-nn
  • python310Packages.torchWithRocm
  • python310Packages.torchWithRocm.dev
  • python310Packages.torchWithRocm.dist
  • python310Packages.torchWithRocm.lib
  • python310Packages.torchinfo
  • python310Packages.torchinfo.dist
  • python310Packages.treex
  • python310Packages.treex.dist
96 packages built:
  • easyocr (python310Packages.easyocr)
  • easyocr.dist (python310Packages.easyocr.dist)
  • khoj
  • khoj.dist
  • larynx-train (python310Packages.larynx-train)
  • larynx-train.dist (python310Packages.larynx-train.dist)
  • openai-whisper (python310Packages.openai-whisper)
  • openai-whisper.dist (python310Packages.openai-whisper.dist)
  • pianotrans
  • pianotrans.dist
  • python310Packages.apptools
  • python310Packages.apptools.dist
  • python310Packages.blosc2
  • python310Packages.blosc2.dist
  • python310Packages.boxx
  • python310Packages.boxx.dist
  • python310Packages.bpycv
  • python310Packages.bpycv.dist
  • python310Packages.clip
  • python310Packages.clip.dist
  • python310Packages.deepwave
  • python310Packages.deepwave.dist
  • python310Packages.envisage
  • python310Packages.envisage.dist
  • python310Packages.ezyrb
  • python310Packages.ezyrb.dist
  • python310Packages.ffcv
  • python310Packages.ffcv.dist
  • python310Packages.grad-cam
  • python310Packages.grad-cam.dist
  • python310Packages.ignite
  • python310Packages.ignite.dist
  • python310Packages.invisible-watermark
  • python310Packages.invisible-watermark.dist
  • python310Packages.mayavi
  • python310Packages.mayavi.dist
  • python310Packages.monai
  • python310Packages.monai.dist
  • python310Packages.nianet
  • python310Packages.nianet.dist
  • python310Packages.piano-transcription-inference
  • python310Packages.piano-transcription-inference.dist
  • python310Packages.pydmd
  • python310Packages.pydmd.dist
  • python310Packages.pyro-ppl
  • python310Packages.pyro-ppl.dist
  • python310Packages.pytorch-lightning
  • python310Packages.pytorch-lightning.dist
  • python310Packages.pytorch-metric-learning
  • python310Packages.pytorch-metric-learning.dist
  • python310Packages.pytorch-pfn-extras
  • python310Packages.pytorch-pfn-extras.dist
  • python310Packages.rising
  • python310Packages.rising.dist
  • python310Packages.sentence-transformers
  • python310Packages.sentence-transformers.dist
  • python310Packages.sfepy
  • python310Packages.sfepy.dist
  • python310Packages.spacy-loggers
  • python310Packages.spacy-loggers.dist
  • python310Packages.stanza
  • python310Packages.stanza.dist
  • python310Packages.tables
  • python310Packages.tables.dist
  • python310Packages.tensorboardx
  • python310Packages.tensorboardx.dist
  • python310Packages.test-tube
  • python310Packages.test-tube.dist
  • python310Packages.torch (python310Packages.torchWithoutCuda ,python310Packages.torchWithoutRocm)
  • python310Packages.torch-tb-profiler
  • python310Packages.torch-tb-profiler.dist
  • python310Packages.torch.dev (python310Packages.torchWithoutCuda.dev ,python310Packages.torchWithoutRocm.dev)
  • python310Packages.torch.dist (python310Packages.torchWithoutCuda.dist ,python310Packages.torchWithoutRocm.dist)
  • python310Packages.torch.lib (python310Packages.torchWithoutCuda.lib ,python310Packages.torchWithoutRocm.lib)
  • python310Packages.torchWithCuda
  • python310Packages.torchWithCuda.dev
  • python310Packages.torchWithCuda.dist
  • python310Packages.torchWithCuda.lib
  • python310Packages.torchgpipe
  • python310Packages.torchgpipe.dist
  • python310Packages.torchlibrosa
  • python310Packages.torchlibrosa.dist
  • python310Packages.torchmetrics
  • python310Packages.torchmetrics.dist
  • python310Packages.torchvision
  • python310Packages.torchvision.dist
  • python310Packages.trainer
  • python310Packages.trainer.dist
  • python310Packages.ttach
  • python310Packages.ttach.dist
  • python310Packages.wandb
  • python310Packages.wandb.dist
  • python310Packages.zcs
  • python310Packages.zcs.dist
  • tts
  • tts.dist

@SomeoneSerge
Copy link
Contributor Author

SomeoneSerge commented Mar 21, 2023

Failed derivations

@SomeoneSerge
Copy link
Contributor Author

Result of nixpkgs-review pr 222273 --extra-nixpkgs-config '{ cudaCapabilities = [ "8.6" ]; cudaSupport = true; }' run on x86_64-linux 1

75 packages failed to build:
  • easyocr (python310Packages.easyocr)
  • easyocr.dist (python310Packages.easyocr.dist)
  • khoj
  • khoj.dist
  • ocamlPackages.torch
  • openai-full
  • openai-full.dist
  • python310Packages.arviz
  • python310Packages.arviz.dist
  • python310Packages.bambi
  • python310Packages.bambi.dist
  • python310Packages.dalle-mini
  • python310Packages.dalle-mini.dist
  • python310Packages.deepdish
  • python310Packages.deepdish.dist
  • python310Packages.elegy
  • python310Packages.elegy.dist
  • python310Packages.ezyrb
  • python310Packages.ezyrb.dist
  • python310Packages.fastai
  • python310Packages.fastai.dist
  • python310Packages.ffcv
  • python310Packages.ffcv.dist
  • python310Packages.flammkuchen
  • python310Packages.flammkuchen.dist
  • python310Packages.grad-cam
  • python310Packages.grad-cam.dist
  • python310Packages.pandas-stubs
  • python310Packages.pandas-stubs.dist
  • python310Packages.pydmd
  • python310Packages.pydmd.dist
  • python310Packages.pymanopt
  • python310Packages.pymanopt.dist
  • python310Packages.pymc
  • python310Packages.pymc.dist
  • python310Packages.pytorch-metric-learning
  • python310Packages.pytorch-metric-learning.dist
  • python310Packages.pywick
  • python310Packages.pywick.dist
  • python310Packages.qiskit
  • python310Packages.qiskit-machine-learning
  • python310Packages.qiskit-machine-learning.dist
  • python310Packages.qiskit.dist
  • python310Packages.sentence-transformers
  • python310Packages.sentence-transformers.dist
  • python310Packages.sfepy
  • python310Packages.sfepy.dist
  • python310Packages.shap
  • python310Packages.shap.dist
  • python310Packages.skorch
  • python310Packages.skorch.dist
  • python310Packages.skrl
  • python310Packages.skrl.dist
  • python310Packages.slicer
  • python310Packages.slicer.dist
  • python310Packages.spacy
  • python310Packages.spacy-transformers
  • python310Packages.spacy-transformers.dist
  • python310Packages.spacy.dist
  • python310Packages.stytra
  • python310Packages.stytra.dist
  • python310Packages.textacy
  • python310Packages.textacy.dist
  • python310Packages.textnets
  • python310Packages.textnets.dist
  • python310Packages.timm
  • python310Packages.timm.dist
  • python310Packages.torchWithRocm
  • python310Packages.torchWithRocm.dev
  • python310Packages.torchWithRocm.dist
  • python310Packages.torchWithRocm.lib
  • python310Packages.torchinfo
  • python310Packages.torchinfo.dist
  • python310Packages.treex
  • python310Packages.treex.dist
79 packages built:
  • larynx-train (python310Packages.larynx-train)
  • larynx-train.dist (python310Packages.larynx-train.dist)
  • openai-whisper (python310Packages.openai-whisper)
  • openai-whisper.dist (python310Packages.openai-whisper.dist)
  • pianotrans
  • pianotrans.dist
  • python310Packages.apptools
  • python310Packages.apptools.dist
  • python310Packages.blosc2
  • python310Packages.blosc2.dist
  • python310Packages.boxx
  • python310Packages.boxx.dist
  • python310Packages.bpycv
  • python310Packages.bpycv.dist
  • python310Packages.clip
  • python310Packages.clip.dist
  • python310Packages.deepwave
  • python310Packages.deepwave.dist
  • python310Packages.envisage
  • python310Packages.envisage.dist
  • python310Packages.ignite
  • python310Packages.ignite.dist
  • python310Packages.invisible-watermark
  • python310Packages.invisible-watermark.dist
  • python310Packages.mayavi
  • python310Packages.mayavi.dist
  • python310Packages.monai
  • python310Packages.monai.dist
  • python310Packages.nianet
  • python310Packages.nianet.dist
  • python310Packages.piano-transcription-inference
  • python310Packages.piano-transcription-inference.dist
  • python310Packages.pyro-ppl
  • python310Packages.pyro-ppl.dist
  • python310Packages.pytorch-lightning
  • python310Packages.pytorch-lightning.dist
  • python310Packages.pytorch-pfn-extras
  • python310Packages.pytorch-pfn-extras.dist
  • python310Packages.rising
  • python310Packages.rising.dist
  • python310Packages.spacy-loggers
  • python310Packages.spacy-loggers.dist
  • python310Packages.stanza
  • python310Packages.stanza.dist
  • python310Packages.tables
  • python310Packages.tables.dist
  • python310Packages.tensorboardx
  • python310Packages.tensorboardx.dist
  • python310Packages.test-tube
  • python310Packages.test-tube.dist
  • python310Packages.tiny-cuda-nn
  • python310Packages.torch (python310Packages.torchWithCuda ,python310Packages.torchWithoutRocm)
  • python310Packages.torch-tb-profiler
  • python310Packages.torch-tb-profiler.dist
  • python310Packages.torch.dev (python310Packages.torchWithCuda.dev ,python310Packages.torchWithoutRocm.dev)
  • python310Packages.torch.dist (python310Packages.torchWithCuda.dist ,python310Packages.torchWithoutRocm.dist)
  • python310Packages.torch.lib (python310Packages.torchWithCuda.lib ,python310Packages.torchWithoutRocm.lib)
  • python310Packages.torchWithoutCuda
  • python310Packages.torchWithoutCuda.dev
  • python310Packages.torchWithoutCuda.dist
  • python310Packages.torchWithoutCuda.lib
  • python310Packages.torchgpipe
  • python310Packages.torchgpipe.dist
  • python310Packages.torchlibrosa
  • python310Packages.torchlibrosa.dist
  • python310Packages.torchmetrics
  • python310Packages.torchmetrics.dist
  • python310Packages.torchvision
  • python310Packages.torchvision.dist
  • python310Packages.trainer
  • python310Packages.trainer.dist
  • python310Packages.ttach
  • python310Packages.ttach.dist
  • python310Packages.wandb
  • python310Packages.wandb.dist
  • python310Packages.zcs
  • python310Packages.zcs.dist
  • tts
  • tts.dist

@SomeoneSerge
Copy link
Contributor Author

Result of nixpkgs-review pr 222273 --extra-nixpkgs-config '{ cudaCapabilities = [ "8.6" ]; cudaSupport = true; }' run on x86_64-linux 1

75 packages failed to build:
  • easyocr (python310Packages.easyocr)
  • easyocr.dist (python310Packages.easyocr.dist)
  • khoj
  • khoj.dist
  • ocamlPackages.torch
  • openai-full
  • openai-full.dist
  • python310Packages.arviz
  • python310Packages.arviz.dist
  • python310Packages.bambi
  • python310Packages.bambi.dist
  • python310Packages.dalle-mini
  • python310Packages.dalle-mini.dist
  • python310Packages.deepdish
  • python310Packages.deepdish.dist
  • python310Packages.elegy
  • python310Packages.elegy.dist
  • python310Packages.ezyrb
  • python310Packages.ezyrb.dist
  • python310Packages.fastai
  • python310Packages.fastai.dist
  • python310Packages.ffcv
  • python310Packages.ffcv.dist
  • python310Packages.flammkuchen
  • python310Packages.flammkuchen.dist
  • python310Packages.grad-cam
  • python310Packages.grad-cam.dist
  • python310Packages.pandas-stubs
  • python310Packages.pandas-stubs.dist
  • python310Packages.pydmd
  • python310Packages.pydmd.dist
  • python310Packages.pymanopt
  • python310Packages.pymanopt.dist
  • python310Packages.pymc
  • python310Packages.pymc.dist
  • python310Packages.pytorch-metric-learning
  • python310Packages.pytorch-metric-learning.dist
  • python310Packages.pywick
  • python310Packages.pywick.dist
  • python310Packages.qiskit
  • python310Packages.qiskit-machine-learning
  • python310Packages.qiskit-machine-learning.dist
  • python310Packages.qiskit.dist
  • python310Packages.sentence-transformers
  • python310Packages.sentence-transformers.dist
  • python310Packages.sfepy
  • python310Packages.sfepy.dist
  • python310Packages.shap
  • python310Packages.shap.dist
  • python310Packages.skorch
  • python310Packages.skorch.dist
  • python310Packages.skrl
  • python310Packages.skrl.dist
  • python310Packages.slicer
  • python310Packages.slicer.dist
  • python310Packages.spacy
  • python310Packages.spacy-transformers
  • python310Packages.spacy-transformers.dist
  • python310Packages.spacy.dist
  • python310Packages.stytra
  • python310Packages.stytra.dist
  • python310Packages.textacy
  • python310Packages.textacy.dist
  • python310Packages.textnets
  • python310Packages.textnets.dist
  • python310Packages.timm
  • python310Packages.timm.dist
  • python310Packages.torchWithRocm
  • python310Packages.torchWithRocm.dev
  • python310Packages.torchWithRocm.dist
  • python310Packages.torchWithRocm.lib
  • python310Packages.torchinfo
  • python310Packages.torchinfo.dist
  • python310Packages.treex
  • python310Packages.treex.dist
83 packages built:
  • larynx-train (python310Packages.larynx-train)
  • larynx-train.dist (python310Packages.larynx-train.dist)
  • openai-whisper (python310Packages.openai-whisper)
  • openai-whisper.dist (python310Packages.openai-whisper.dist)
  • pianotrans
  • pianotrans.dist
  • python310Packages.apptools
  • python310Packages.apptools.dist
  • python310Packages.blosc2
  • python310Packages.blosc2.dist
  • python310Packages.boxx
  • python310Packages.boxx.dist
  • python310Packages.bpycv
  • python310Packages.bpycv.dist
  • python310Packages.clip
  • python310Packages.clip.dist
  • python310Packages.deepwave
  • python310Packages.deepwave.dist
  • python310Packages.envisage
  • python310Packages.envisage.dist
  • python310Packages.ignite
  • python310Packages.ignite.dist
  • python310Packages.invisible-watermark
  • python310Packages.invisible-watermark.dist
  • python310Packages.mayavi
  • python310Packages.mayavi.dist
  • python310Packages.monai
  • python310Packages.monai.dist
  • python310Packages.nianet
  • python310Packages.nianet.dist
  • python310Packages.openai-triton
  • python310Packages.openai-triton.dist
  • python310Packages.piano-transcription-inference
  • python310Packages.piano-transcription-inference.dist
  • python310Packages.pyro-ppl
  • python310Packages.pyro-ppl.dist
  • python310Packages.pytorch-lightning
  • python310Packages.pytorch-lightning.dist
  • python310Packages.pytorch-pfn-extras
  • python310Packages.pytorch-pfn-extras.dist
  • python310Packages.rising
  • python310Packages.rising.dist
  • python310Packages.spacy-loggers
  • python310Packages.spacy-loggers.dist
  • python310Packages.stanza
  • python310Packages.stanza.dist
  • python310Packages.tables
  • python310Packages.tables.dist
  • python310Packages.tensorboardx
  • python310Packages.tensorboardx.dist
  • python310Packages.test-tube
  • python310Packages.test-tube.dist
  • python310Packages.tiny-cuda-nn
  • python310Packages.torch (python310Packages.torchWithCuda ,python310Packages.torchWithoutRocm)
  • python310Packages.torch-tb-profiler
  • python310Packages.torch-tb-profiler.dist
  • python310Packages.torch.dev (python310Packages.torchWithCuda.dev ,python310Packages.torchWithoutRocm.dev)
  • python310Packages.torch.dist (python310Packages.torchWithCuda.dist ,python310Packages.torchWithoutRocm.dist)
  • python310Packages.torch.lib (python310Packages.torchWithCuda.lib ,python310Packages.torchWithoutRocm.lib)
  • python310Packages.torchWithoutCuda
  • python310Packages.torchWithoutCuda.dev
  • python310Packages.torchWithoutCuda.dist
  • python310Packages.torchWithoutCuda.lib
  • python310Packages.torchgpipe
  • python310Packages.torchgpipe.dist
  • python310Packages.torchlibrosa
  • python310Packages.torchlibrosa.dist
  • python310Packages.torchmetrics
  • python310Packages.torchmetrics.dist
  • python310Packages.torchvision
  • python310Packages.torchvision.dist
  • python310Packages.trainer
  • python310Packages.trainer.dist
  • python310Packages.ttach
  • python310Packages.ttach.dist
  • python310Packages.wandb
  • python310Packages.wandb.dist
  • python310Packages.zcs
  • python310Packages.zcs.dist
  • python311Packages.openai-triton
  • python311Packages.openai-triton.dist
  • tts
  • tts.dist

@SomeoneSerge
Copy link
Contributor Author

Failed derivations

@SomeoneSerge
Copy link
Contributor Author

Ah, I forgot to rename pytorch-triton-rocm<2.1,>=2.0.0 into simple triton.
Also, I see some GLIBCXX_3.4.30 again: ImportError: /nix/store/yiflcg7zmirny3654g8l8f85sz958gqk-gcc-11.3.0-lib/lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /nix/store/9akbpvs52j2b257fi4hhs3bha020b698-opencv-4.7.0/lib/libopencv_gapi.so.407). Not sure it was there before, so maybe I need to build openai with cudaPackages.backendStdenv...

@ConnorBaker
Copy link
Contributor

@SomeoneSerge not sure how relevant these are to you (I'll probably throw them in issues at some point) but I was in the process of rewriting the 1.13 derivation to fix some stuff. You may be interested in some of the changes (I included a list of things I changed):

https://gist.github.com/ConnorBaker/15df60d501eab2ca9a48072ea54d2786

@SomeoneSerge
Copy link
Contributor Author

@ConnorBaker Oh, this is so great! I was looking at some of the same annoyances and thinking "maybe we catch up with 2.0.0 before we refactor?" I'm glad to see you got these changes working. I think the refactor should go in a separate PR. I also have a suspicion the review for the current one may take a while (e.g. I'm touching llvmPackages_rocm in a somewhat un-canonical way, etc? nixpkgs-review runs are hefty too, and I'm waiting for another one), so should you feel like your change is ready and you want to take priority, I won't mind

@SomeoneSerge
Copy link
Contributor Author

Result of nixpkgs-review pr 222273 --extra-nixpkgs-config '{ cudaCapabilities = [ "8.6" ]; }' run on x86_64-linux 1

56 packages failed to build:
  • ocamlPackages.torch
  • openai-full
  • openai-full.dist
  • python310Packages.arviz
  • python310Packages.arviz.dist
  • python310Packages.bambi
  • python310Packages.bambi.dist
  • python310Packages.dalle-mini
  • python310Packages.dalle-mini.dist
  • python310Packages.deepdish
  • python310Packages.deepdish.dist
  • python310Packages.elegy
  • python310Packages.elegy.dist
  • python310Packages.fastai
  • python310Packages.fastai.dist
  • python310Packages.flammkuchen
  • python310Packages.flammkuchen.dist
  • python310Packages.pandas-stubs
  • python310Packages.pandas-stubs.dist
  • python310Packages.pymanopt
  • python310Packages.pymanopt.dist
  • python310Packages.pymc
  • python310Packages.pymc.dist
  • python310Packages.pywick
  • python310Packages.pywick.dist
  • python310Packages.qiskit
  • python310Packages.qiskit-machine-learning
  • python310Packages.qiskit-machine-learning.dist
  • python310Packages.qiskit.dist
  • python310Packages.sfepy
  • python310Packages.sfepy.dist
  • python310Packages.shap
  • python310Packages.shap.dist
  • python310Packages.skorch
  • python310Packages.skorch.dist
  • python310Packages.skrl
  • python310Packages.skrl.dist
  • python310Packages.slicer
  • python310Packages.slicer.dist
  • python310Packages.spacy
  • python310Packages.spacy-transformers
  • python310Packages.spacy-transformers.dist
  • python310Packages.spacy.dist
  • python310Packages.stytra
  • python310Packages.stytra.dist
  • python310Packages.textacy
  • python310Packages.textacy.dist
  • python310Packages.textnets
  • python310Packages.textnets.dist
  • python310Packages.timm
  • python310Packages.timm.dist
  • python310Packages.tiny-cuda-nn
  • python310Packages.torchinfo
  • python310Packages.torchinfo.dist
  • python310Packages.treex
  • python310Packages.treex.dist
102 packages built:
  • easyocr (python310Packages.easyocr)
  • easyocr.dist (python310Packages.easyocr.dist)
  • khoj
  • khoj.dist
  • larynx-train (python310Packages.larynx-train)
  • larynx-train.dist (python310Packages.larynx-train.dist)
  • openai-whisper (python310Packages.openai-whisper)
  • openai-whisper.dist (python310Packages.openai-whisper.dist)
  • pianotrans
  • pianotrans.dist
  • python310Packages.apptools
  • python310Packages.apptools.dist
  • python310Packages.blosc2
  • python310Packages.blosc2.dist
  • python310Packages.boxx
  • python310Packages.boxx.dist
  • python310Packages.bpycv
  • python310Packages.bpycv.dist
  • python310Packages.clip
  • python310Packages.clip.dist
  • python310Packages.deepwave
  • python310Packages.deepwave.dist
  • python310Packages.envisage
  • python310Packages.envisage.dist
  • python310Packages.ezyrb
  • python310Packages.ezyrb.dist
  • python310Packages.ffcv
  • python310Packages.ffcv.dist
  • python310Packages.grad-cam
  • python310Packages.grad-cam.dist
  • python310Packages.ignite
  • python310Packages.ignite.dist
  • python310Packages.invisible-watermark
  • python310Packages.invisible-watermark.dist
  • python310Packages.mayavi
  • python310Packages.mayavi.dist
  • python310Packages.monai
  • python310Packages.monai.dist
  • python310Packages.nianet
  • python310Packages.nianet.dist
  • python310Packages.openai-triton
  • python310Packages.openai-triton.dist
  • python310Packages.piano-transcription-inference
  • python310Packages.piano-transcription-inference.dist
  • python310Packages.pydmd
  • python310Packages.pydmd.dist
  • python310Packages.pyro-ppl
  • python310Packages.pyro-ppl.dist
  • python310Packages.pytorch-lightning
  • python310Packages.pytorch-lightning.dist
  • python310Packages.pytorch-metric-learning
  • python310Packages.pytorch-metric-learning.dist
  • python310Packages.pytorch-pfn-extras
  • python310Packages.pytorch-pfn-extras.dist
  • python310Packages.rising
  • python310Packages.rising.dist
  • python310Packages.sentence-transformers
  • python310Packages.sentence-transformers.dist
  • python310Packages.spacy-loggers
  • python310Packages.spacy-loggers.dist
  • python310Packages.stanza
  • python310Packages.stanza.dist
  • python310Packages.tables
  • python310Packages.tables.dist
  • python310Packages.tensorboardx
  • python310Packages.tensorboardx.dist
  • python310Packages.test-tube
  • python310Packages.test-tube.dist
  • python310Packages.torch (python310Packages.torchWithoutCuda ,python310Packages.torchWithoutRocm)
  • python310Packages.torch-tb-profiler
  • python310Packages.torch-tb-profiler.dist
  • python310Packages.torch.dev (python310Packages.torchWithoutCuda.dev ,python310Packages.torchWithoutRocm.dev)
  • python310Packages.torch.dist (python310Packages.torchWithoutCuda.dist ,python310Packages.torchWithoutRocm.dist)
  • python310Packages.torch.lib (python310Packages.torchWithoutCuda.lib ,python310Packages.torchWithoutRocm.lib)
  • python310Packages.torchWithCuda
  • python310Packages.torchWithCuda.dev
  • python310Packages.torchWithCuda.dist
  • python310Packages.torchWithCuda.lib
  • python310Packages.torchWithRocm
  • python310Packages.torchWithRocm.dev
  • python310Packages.torchWithRocm.dist
  • python310Packages.torchWithRocm.lib
  • python310Packages.torchgpipe
  • python310Packages.torchgpipe.dist
  • python310Packages.torchlibrosa
  • python310Packages.torchlibrosa.dist
  • python310Packages.torchmetrics
  • python310Packages.torchmetrics.dist
  • python310Packages.torchvision
  • python310Packages.torchvision.dist
  • python310Packages.trainer
  • python310Packages.trainer.dist
  • python310Packages.ttach
  • python310Packages.ttach.dist
  • python310Packages.wandb
  • python310Packages.wandb.dist
  • python310Packages.zcs
  • python310Packages.zcs.dist
  • python311Packages.openai-triton
  • python311Packages.openai-triton.dist
  • tts
  • tts.dist

@SomeoneSerge
Copy link
Contributor Author

Failed derivations

@SomeoneSerge
Copy link
Contributor Author

❯ patchelf --print-rpath /nix/store/d6n4mdxssvf596n1rvmvmll0dxqixykw-python3.10-triton-2.0.0/lib/python3.10/site-packages/triton/_C/libtriton.so
/nix/store/rg9b3w1rqm7b5cwr9g8d0z6jii1g462n-zlib-1.2.13/lib:/nix/store/q75826qw95k82qkmqnj3haw63zp73w2g-ncurses-6.4/lib:/nix/store/8bmp6r3a0xfha3wj36phlc47clh9w81l-glibc-2.35-224/lib:/nix/store/yiflcg7zmirny3654g8l8f85sz958gqk-gcc-11.3.0-lib/lib

CC @katanallama can you give this another try?

@katanallama
Copy link
Member

❯ patchelf --print-rpath /nix/store/d6n4mdxssvf596n1rvmvmll0dxqixykw-python3.10-triton-2.0.0/lib/python3.10/site-packages/triton/_C/libtriton.so
/nix/store/rg9b3w1rqm7b5cwr9g8d0z6jii1g462n-zlib-1.2.13/lib:/nix/store/q75826qw95k82qkmqnj3haw63zp73w2g-ncurses-6.4/lib:/nix/store/8bmp6r3a0xfha3wj36phlc47clh9w81l-glibc-2.35-224/lib:/nix/store/yiflcg7zmirny3654g8l8f85sz958gqk-gcc-11.3.0-lib/lib

CC @katanallama can you give this another try?

Can confirm that now matches.

patchelf --print-rpath /nix/store/d6n4mdxssvf596n1rvmvmll0dxqixykw-python3.10-triton-2.0.0/lib/python3.10/site-packages/triton/_C/libtriton.so
/nix/store/rg9b3w1rqm7b5cwr9g8d0z6jii1g462n-zlib-1.2.13/lib:/nix/store/q75826qw95k82qkmqnj3haw63zp73w2g-ncurses-6.4/lib:/nix/store/8bmp6r3a0xfha3wj36phlc47clh9w81l-glibc-2.35-224/lib:/nix/store/yiflcg7zmirny3654g8l8f85sz958gqk-gcc-11.3.0-lib/lib

Though now torch.compile fails with a different error.

@SomeoneSerge
Copy link
Contributor Author

@katanallama yes, the offending line is https://github.com/openai/triton/blob/3239c93a934d3e8d431da00d9076e7f9b6d7f69d/python/triton/compiler.py#L1513

I think I'm just going to patch it for now

@SomeoneSerge

This comment was marked as outdated.

@katanallama
Copy link
Member

Looking at https://github.com/openai/triton/blob/bd5c2117f62c73a9e922d5e93353a39ab3ac269b/python/triton/compiler.py#L1368, you can hack around with

CUDA_PATH=/run/opengl-driver/lib python torch-compile-tutorial-01.py

The next issue is that triton's build script setuptools (?) spoils ptxas: it cleared the runpath and dropped the +x flag.

I believe

chmod +x "$out/${python.sitePackages}/triton/third_party/cuda/bin/ptxas"
fixes the ptxas issue as it's still executable for me.

@samuela
Copy link
Member

samuela commented Apr 6, 2023

Ok, merging is currently blocked on https://discourse.nixos.org/t/prs-ready-for-review/3032/2037. If we fail to find someone with the right hardware in the next few days, I vote that we go ahead and merge.

@SomeoneSerge
Copy link
Contributor Author

I suggest that we merge tomorrow. Even if we break rocm, we'll just get feedback faster and fix things. The release is not an issue since we can always backport

@samuela
Copy link
Member

samuela commented Apr 7, 2023

I suggest that we merge tomorrow. Even if we break rocm, we'll just get feedback faster and fix things. The release is not an issue since we can always backport

Looks like we'll need a rebase, but other than that I agree we're good to go!

@samuela samuela merged commit c5b01a1 into NixOS:master Apr 8, 2023
18 checks passed
@samuela
Copy link
Member

samuela commented Apr 8, 2023

Thanks so much for your hard work here @SomeoneSerge ! This is an important update for the whole ML ecosystem.

@SomeoneSerge SomeoneSerge mentioned this pull request Apr 9, 2023
12 tasks
@Et7f3
Copy link
Contributor

Et7f3 commented Apr 9, 2023

On Darwin:

^M[4467/5670] Building C object sleef/src/libm/CMakeFiles/dispsse_obj.dir/dispsse.c.o^M[4468/5670] Building C object sleef/src/libm/CMakeFiles/sleefpurecfma_scalar.dir/sleefsimdsp.c.o^M[4468/5670] Genera>
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/mkl/SpectralOps.cpp.o
/nix/store/pm0k4xi2gmg4zj1rajma4xnf7rvwvfv9-clang-wrapper-11.1.0/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAV>
In file included from /tmp/nix-build-python3.10-torch-2.0.0.drv-0/source/aten/src/ATen/native/mkl/SpectralOps.cpp:206:
/tmp/nix-build-python3.10-torch-2.0.0.drv-0/source/third_party/pocketfft/pocketfft_hdronly.h:156:15: error: no member named 'aligned_alloc' in the global namespace; did you mean simply 'aligned_alloc'?
  void *ptr = ::aligned_alloc(align,(size+align-1)&(~(align-1)));
              ^~~~~~~~~~~~~~~
              aligned_alloc
/tmp/nix-build-python3.10-torch-2.0.0.drv-0/source/third_party/pocketfft/pocketfft_hdronly.h:153:14: note: 'aligned_alloc' declared here
inline void *aligned_alloc(size_t align, size_t size)
             ^
1 error generated.

@samuela
Copy link
Member

samuela commented Apr 9, 2023

@Et7f3 Hmm, this looks to be a C++11 vs 17 issue:

Perhaps this is the sort of thing we should raise with upstream?

@Madouura
Copy link
Contributor

but in the meantime hydra won't be building torchWithRocm

Hydra can't cache it anyway at the moment because none of the workarounds for rocfft caching are working.

@SomeoneSerge
Copy link
Contributor Author

Hydra can't cache it anyway at the moment because none of the workarounds for rocfft caching are working

Thanks, I had no idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet