Skip to content

openai-triton-llvm: fix aarch64 and cross-compilation#267209

Merged
wegank merged 3 commits intoNixOS:masterfrom
Madouura:pr/triton-llvm
Nov 17, 2023
Merged

openai-triton-llvm: fix aarch64 and cross-compilation#267209
wegank merged 3 commits intoNixOS:masterfrom
Madouura:pr/triton-llvm

Conversation

@Madouura
Copy link
Copy Markdown
Contributor

@Madouura Madouura commented Nov 13, 2023

Description of changes

Fixes this comment: #263048 (comment)
Unsure how to test darwin, since it won't cross-compile.
This is why we're guarding openai-triton in torch: 8bb0f732cf7638a0749a26fe37b60db1032daf55

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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.11 Release Notes (or backporting 23.05 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.

@ofborg ofborg Bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Nov 13, 2023
@github-actions github-actions Bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Nov 13, 2023
@ofborg ofborg Bot added the 8.has: package (new) This PR adds a new package label Nov 13, 2023
@ofborg ofborg Bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Nov 13, 2023
Comment thread pkgs/development/python-modules/torch/default.nix Outdated
Comment thread pkgs/by-name/op/openai-triton-llvm/package.nix Outdated
@Madouura
Copy link
Copy Markdown
Contributor Author

cc @RaitoBezarius
Since you're on the LLVM team and this is using the cross-compiling solution from LLVM 16, if you have time I'd appreciate it if you looked over openai-triton-llvm and just made sure everything is happening like it should.
I haven't done much with cross-compilation.

@RaitoBezarius
Copy link
Copy Markdown
Member

Hi there, I can only review this in December as my bandwidth is severely low due to upcoming release and various engagements. I would recommend posting in the cross compilation channel.

@Madouura
Copy link
Copy Markdown
Contributor Author

The tests do pass on aarch64-linux, so I won't worry too much about it. This can probably be merged.

Hi there, I can only review this in December as my bandwidth is severely low due to upcoming release and various engagements. I would recommend posting in the cross compilation channel.

No problem, I'll post this PR there.

Comment thread pkgs/by-name/op/openai-triton-llvm/package.nix Outdated
@Madouura
Copy link
Copy Markdown
Contributor Author

I just realized I messed up badly with the cross code.
All of those should be "out", not "dev"/"lib".

@Madouura
Copy link
Copy Markdown
Contributor Author

Madouura commented Nov 15, 2023

Good thing I caught that, I guess tests only passed because they're not in installCheck.
If it stayed, most likely llvm-config would have had bad paths.
(All this limited to cross-compiling, native aarch64 would have been fine.)

@SomeoneSerge
Copy link
Copy Markdown
Contributor

SomeoneSerge commented Nov 16, 2023

The diff LGTM, just running the builds now

❯ nix build github:Madouura/nixpkgs/pr/triton-llvm#pkgsCross.aarch64-multiplatform.python3Packages.torchWithRocm
error:
       … while evaluating the attribute 'drvPath'
...

         at /nix/store/zkjx4b3klwrsc3gk4pn3pi3j1hvqaws0-source/lib/customisation.nix:247:7:

...

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: Package ‘rocm-llvm-llvm-5.7.1’ in /nix/store/zkjx4b3klwrsc3gk4pn3pi3j1hvqaws0-source/pkgs/development/rocm-modules/5/llvm/base.nix:160 is marked as broken, refusing to evaluate.

Is this expected? (Ofborg skipping darwin for the same reason?)

@azuwis could you please test nix build github:Madouura/nixpkgs/pr/triton-llvm#python3Packages.torch on darwin?

@azuwis
Copy link
Copy Markdown
Contributor

azuwis commented Nov 16, 2023

@azuwis could you please test nix build github:Madouura/nixpkgs/pr/triton-llvm#python3Packages.torch on darwin?

nix build github:Madouura/nixpkgs/pr/triton-llvm#python3Packages.torch builds fine on aarch64-darwin.

@Madouura
Copy link
Copy Markdown
Contributor Author

Madouura commented Nov 16, 2023

@azuwis could you please test nix build github:Madouura/nixpkgs/pr/triton-llvm#python3Packages.torch on darwin?

nix build github:Madouura/nixpkgs/pr/triton-llvm#python3Packages.torch builds fine on aarch64-darwin.

Any chance you could test x86_64-darwin too?
If it works we can alter the torch commit.
AFAIK the main blocking factor should be libpfm, so if you could test with removing it too that'd be great.

@azuwis
Copy link
Copy Markdown
Contributor

azuwis commented Nov 16, 2023

Any chance you could test x86_64-darwin too? If it works we can alter the torch commit. AFAIK the main blocking factor should be libpfm, so if you could test with removing it too that'd be great.

I don't have a x86_64-darwin machine.

@Madouura
Copy link
Copy Markdown
Contributor Author

Madouura commented Nov 16, 2023

Any chance you could test x86_64-darwin too? If it works we can alter the torch commit. AFAIK the main blocking factor should be libpfm, so if you could test with removing it too that'd be great.

I don't have a x86_64-darwin machine.

For now, let's keep darwin support guarded on torch then.
Once both are confirmed I think we can enable it globally again.

@azuwis
Copy link
Copy Markdown
Contributor

azuwis commented Nov 16, 2023

@ofborg build python3Packages.torch

@Madouura
Copy link
Copy Markdown
Contributor Author

@ofborg build python3Packages.torch

Why is torch failing on aarch64-darwin with openai-triton-llvm (???) being marked broken on it?
Any torch -darwin platforms shouldn't be pulling this. Is this an ofborg bug?

@Artturin
Copy link
Copy Markdown
Member

Artturin commented Nov 16, 2023

@ofborg build python3Packages.torch

Why is torch failing on aarch64-darwin with openai-triton-llvm (???) being marked broken on it? Any torch -darwin platforms shouldn't be pulling this. Is this an ofborg bug?

On this branch python3Packages.torch evals on darwin but on master it doesn't. You can test by adding --system aarch64-darwin to any nix command.

@SomeoneSerge
Copy link
Copy Markdown
Contributor

Result of nixpkgs-review pr 267209 run on x86_64-linux 1

28 packages marked as broken and skipped:
  • piper-train
  • piper-train.dist
  • python310Packages.elegy
  • python310Packages.elegy.dist
  • python310Packages.pymanopt
  • python310Packages.pymanopt.dist
  • python310Packages.qiskit
  • python310Packages.qiskit-machine-learning
  • python310Packages.qiskit-machine-learning.dist
  • python310Packages.qiskit.dist
  • python310Packages.stytra
  • python310Packages.stytra.dist
  • python310Packages.treex
  • python310Packages.treex.dist
  • python310Packages.unstructured-inference
  • python310Packages.unstructured-inference.dist
  • python311Packages.elegy
  • python311Packages.elegy.dist
  • python311Packages.pymanopt
  • python311Packages.pymanopt.dist
  • python311Packages.qiskit
  • python311Packages.qiskit-machine-learning
  • python311Packages.qiskit-machine-learning.dist
  • python311Packages.qiskit.dist
  • python311Packages.stytra
  • python311Packages.stytra.dist
  • python311Packages.treex
  • python311Packages.treex.dist
38 packages failed to build:
  • python310Packages.ax
  • python310Packages.ax.dist
  • python310Packages.cleanlab
  • python310Packages.cleanlab.dist
  • python310Packages.dalle-mini
  • python310Packages.dalle-mini.dist
  • python310Packages.fairseq
  • python310Packages.fairseq.dist
  • python310Packages.fastai
  • python310Packages.fastai.dist
  • python310Packages.k-diffusion
  • python310Packages.k-diffusion.dist
  • python310Packages.sfepy
  • python310Packages.sfepy.dist
  • python310Packages.skrl
  • python310Packages.skrl.dist
  • python310Packages.spacy
  • python310Packages.spacy-loggers
  • python310Packages.spacy-loggers.dist
  • python310Packages.spacy-lookups-data
  • python310Packages.spacy-lookups-data.dist
  • python310Packages.spacy-transformers
  • python310Packages.spacy-transformers.dist
  • python310Packages.spacy.dist
  • python310Packages.textacy
  • python310Packages.textacy.dist
  • python310Packages.textnets
  • python310Packages.textnets.dist
  • python310Packages.tiny-cuda-nn
  • python310Packages.wandb
  • python310Packages.wandb.dist
  • python311Packages.ax
  • python311Packages.ax.dist
  • python311Packages.deepwave
  • python311Packages.deepwave.dist
  • python311Packages.sfepy
  • python311Packages.sfepy.dist
  • python311Packages.tiny-cuda-nn
486 packages built:
  • easyocr (python311Packages.easyocr)
  • easyocr.dist (python311Packages.easyocr.dist)
  • khoj
  • khoj.dist
  • libretranslate (python311Packages.libretranslate)
  • libretranslate.dist (python311Packages.libretranslate.dist)
  • openai-full
  • openai-full.dist
  • openai-triton-llvm
  • openai-triton-llvm.doc
  • openai-triton-llvm.man
  • openai-whisper (python311Packages.openai-whisper)
  • openai-whisper.dist (python311Packages.openai-whisper.dist)
  • pianotrans
  • pianotrans.dist
  • python310Packages.accelerate
  • python310Packages.accelerate.dist
  • python310Packages.apptools
  • python310Packages.apptools.dist
  • python310Packages.argos-translate-files
  • python310Packages.argos-translate-files.dist
  • python310Packages.argostranslate
  • python310Packages.argostranslate.dist
  • python310Packages.arviz
  • python310Packages.arviz.dist
  • python310Packages.atomman
  • python310Packages.atomman.dist
  • python310Packages.bambi
  • python310Packages.bambi.dist
  • python310Packages.bitsandbytes
  • python310Packages.bitsandbytes.dist
  • python310Packages.blosc2
  • python310Packages.blosc2.dist
  • python310Packages.botorch
  • python310Packages.botorch.dist
  • python310Packages.boxx
  • python310Packages.boxx.dist
  • python310Packages.bpycv
  • python310Packages.bpycv.dist
  • python310Packages.clean-fid
  • python310Packages.clean-fid.dist
  • python310Packages.clip
  • python310Packages.clip-anytorch
  • python310Packages.clip-anytorch.dist
  • python310Packages.clip.dist
  • python310Packages.compressai
  • python310Packages.compressai.dist
  • python310Packages.ctranslate2
  • python310Packages.ctranslate2.dist
  • python310Packages.dctorch
  • python310Packages.dctorch.dist
  • python310Packages.deepdish
  • python310Packages.deepdish.dist
  • python310Packages.deepwave
  • python310Packages.deepwave.dist
  • python310Packages.detectron2
  • python310Packages.detectron2.dist
  • python310Packages.easyocr
  • python310Packages.easyocr.dist
  • python310Packages.effdet
  • python310Packages.effdet.dist
  • python310Packages.envisage
  • python310Packages.envisage.dist
  • python310Packages.experiment-utilities
  • python310Packages.experiment-utilities.dist
  • python310Packages.ezyrb
  • python310Packages.ezyrb.dist
  • python310Packages.fairscale
  • python310Packages.fairscale.dist
  • python310Packages.farm-haystack
  • python310Packages.farm-haystack.dist
  • python310Packages.faster-whisper
  • python310Packages.faster-whisper.dist
  • python310Packages.ffcv
  • python310Packages.ffcv.dist
  • python310Packages.flammkuchen
  • python310Packages.flammkuchen.dist
  • python310Packages.flyingsquid
  • python310Packages.flyingsquid.dist
  • python310Packages.funsor
  • python310Packages.funsor.dist
  • python310Packages.fvcore
  • python310Packages.fvcore.dist
  • python310Packages.gpytorch
  • python310Packages.gpytorch.dist
  • python310Packages.grad-cam
  • python310Packages.grad-cam.dist
  • python310Packages.gradio
  • python310Packages.gradio.dist
  • python310Packages.guidance
  • python310Packages.guidance.dist
  • python310Packages.ignite
  • python310Packages.ignite.dist
  • python310Packages.imagededup
  • python310Packages.imagededup.dist
  • python310Packages.invisible-watermark
  • python310Packages.invisible-watermark.dist
  • python310Packages.iopath
  • python310Packages.iopath.dist
  • python310Packages.kornia
  • python310Packages.kornia.dist
  • python310Packages.layoutparser
  • python310Packages.layoutparser.dist
  • python310Packages.libretranslate
  • python310Packages.libretranslate.dist
  • python310Packages.linear_operator
  • python310Packages.linear_operator.dist
  • python310Packages.lion-pytorch
  • python310Packages.lion-pytorch.dist
  • python310Packages.manifest-ml
  • python310Packages.manifest-ml.dist
  • python310Packages.mayavi
  • python310Packages.mayavi.dist
  • python310Packages.minichain
  • python310Packages.minichain.dist
  • python310Packages.mmcv
  • python310Packages.mmcv.dist
  • python310Packages.mmengine
  • python310Packages.mmengine.dist
  • python310Packages.monai
  • python310Packages.monai.dist
  • python310Packages.monty
  • python310Packages.monty.dist
  • python310Packages.nianet
  • python310Packages.nianet.dist
  • python310Packages.numpyro
  • python310Packages.numpyro.dist
  • python310Packages.openai-triton (python310Packages.openai-triton-no-cuda)
  • python310Packages.openai-triton-cuda
  • python310Packages.openai-triton-cuda.dist
  • python310Packages.openai-triton.dist (python310Packages.openai-triton-no-cuda.dist)
  • python310Packages.openai-whisper
  • python310Packages.openai-whisper.dist
  • python310Packages.openllm
  • python310Packages.openllm.dist
  • python310Packages.optimum
  • python310Packages.optimum.dist
  • python310Packages.optuna
  • python310Packages.optuna.dist
  • python310Packages.pandas-stubs
  • python310Packages.pandas-stubs.dist
  • python310Packages.pdfplumber
  • python310Packages.pdfplumber.dist
  • python310Packages.peft
  • python310Packages.peft.dist
  • python310Packages.pgmpy
  • python310Packages.pgmpy.dist
  • python310Packages.piano-transcription-inference
  • python310Packages.piano-transcription-inference.dist
  • python310Packages.pydmd
  • python310Packages.pydmd.dist
  • python310Packages.pymatgen
  • python310Packages.pymatgen.dist
  • python310Packages.pymc
  • python310Packages.pymc.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-msssim
  • python310Packages.pytorch-msssim.dist
  • python310Packages.pytorch-pfn-extras
  • python310Packages.pytorch-pfn-extras.dist
  • python310Packages.resize-right
  • python310Packages.resize-right.dist
  • python310Packages.rising
  • python310Packages.rising.dist
  • python310Packages.rotary-embedding-torch
  • python310Packages.rotary-embedding-torch.dist
  • python310Packages.safetensors
  • python310Packages.safetensors.dist
  • python310Packages.sentence-transformers
  • python310Packages.sentence-transformers.dist
  • python310Packages.shap
  • python310Packages.shap.dist
  • python310Packages.skorch
  • python310Packages.skorch.dist
  • python310Packages.slicer
  • python310Packages.slicer.dist
  • python310Packages.snorkel
  • python310Packages.snorkel.dist
  • python310Packages.speechbrain
  • python310Packages.speechbrain.dist
  • python310Packages.stanza
  • python310Packages.stanza.dist
  • python310Packages.sumo
  • python310Packages.sumo.dist
  • python310Packages.tables
  • python310Packages.tables.dist
  • python310Packages.tensorboardx
  • python310Packages.tensorboardx.dist
  • python310Packages.test-tube
  • python310Packages.test-tube.dist
  • python310Packages.timm
  • python310Packages.timm.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.torchaudio
  • python310Packages.torchaudio.dist
  • python310Packages.torchdiffeq
  • python310Packages.torchdiffeq.dist
  • python310Packages.torchgpipe
  • python310Packages.torchgpipe.dist
  • python310Packages.torchinfo
  • python310Packages.torchinfo.dist
  • python310Packages.torchio
  • python310Packages.torchio.dist
  • python310Packages.torchlibrosa
  • python310Packages.torchlibrosa.dist
  • python310Packages.torchmetrics
  • python310Packages.torchmetrics.dist
  • python310Packages.torchsde
  • python310Packages.torchsde.dist
  • python310Packages.torchvision
  • python310Packages.torchvision.dist
  • python310Packages.transformers
  • python310Packages.transformers.dist
  • python310Packages.translatehtml
  • python310Packages.translatehtml.dist
  • python310Packages.ttach
  • python310Packages.ttach.dist
  • python310Packages.txtai
  • python310Packages.txtai.dist
  • python310Packages.vqgan-jax
  • python310Packages.vqgan-jax.dist
  • python310Packages.xformers
  • python310Packages.xformers.dist
  • python310Packages.zcs
  • python310Packages.zcs.dist
  • python311Packages.accelerate
  • python311Packages.accelerate.dist
  • python311Packages.apptools
  • python311Packages.apptools.dist
  • python311Packages.argos-translate-files
  • python311Packages.argos-translate-files.dist
  • python311Packages.argostranslate
  • python311Packages.argostranslate.dist
  • python311Packages.arviz
  • python311Packages.arviz.dist
  • python311Packages.atomman
  • python311Packages.atomman.dist
  • python311Packages.bambi
  • python311Packages.bambi.dist
  • python311Packages.bitsandbytes
  • python311Packages.bitsandbytes.dist
  • python311Packages.blosc2
  • python311Packages.blosc2.dist
  • python311Packages.botorch
  • python311Packages.botorch.dist
  • python311Packages.clean-fid
  • python311Packages.clean-fid.dist
  • python311Packages.cleanlab
  • python311Packages.cleanlab.dist
  • python311Packages.clip
  • python311Packages.clip-anytorch
  • python311Packages.clip-anytorch.dist
  • python311Packages.clip.dist
  • python311Packages.compressai
  • python311Packages.compressai.dist
  • python311Packages.ctranslate2
  • python311Packages.ctranslate2.dist
  • python311Packages.dalle-mini
  • python311Packages.dalle-mini.dist
  • python311Packages.dctorch
  • python311Packages.dctorch.dist
  • python311Packages.deepdish
  • python311Packages.deepdish.dist
  • python311Packages.detectron2
  • python311Packages.detectron2.dist
  • python311Packages.effdet
  • python311Packages.effdet.dist
  • python311Packages.envisage
  • python311Packages.envisage.dist
  • python311Packages.experiment-utilities
  • python311Packages.experiment-utilities.dist
  • python311Packages.ezyrb
  • python311Packages.ezyrb.dist
  • python311Packages.fairscale
  • python311Packages.fairscale.dist
  • python311Packages.fairseq
  • python311Packages.fairseq.dist
  • python311Packages.farm-haystack
  • python311Packages.farm-haystack.dist
  • python311Packages.fastai
  • python311Packages.fastai.dist
  • python311Packages.faster-whisper
  • python311Packages.faster-whisper.dist
  • python311Packages.ffcv
  • python311Packages.ffcv.dist
  • python311Packages.flammkuchen
  • python311Packages.flammkuchen.dist
  • python311Packages.flyingsquid
  • python311Packages.flyingsquid.dist
  • python311Packages.funsor
  • python311Packages.funsor.dist
  • python311Packages.fvcore
  • python311Packages.fvcore.dist
  • python311Packages.gpytorch
  • python311Packages.gpytorch.dist
  • python311Packages.grad-cam
  • python311Packages.grad-cam.dist
  • python311Packages.gradio
  • python311Packages.gradio.dist
  • python311Packages.guidance
  • python311Packages.guidance.dist
  • python311Packages.ignite
  • python311Packages.ignite.dist
  • python311Packages.imagededup
  • python311Packages.imagededup.dist
  • python311Packages.invisible-watermark
  • python311Packages.invisible-watermark.dist
  • python311Packages.iopath
  • python311Packages.iopath.dist
  • python311Packages.k-diffusion
  • python311Packages.k-diffusion.dist
  • python311Packages.kornia
  • python311Packages.kornia.dist
  • python311Packages.layoutparser
  • python311Packages.layoutparser.dist
  • python311Packages.linear_operator
  • python311Packages.linear_operator.dist
  • python311Packages.lion-pytorch
  • python311Packages.lion-pytorch.dist
  • python311Packages.manifest-ml
  • python311Packages.manifest-ml.dist
  • python311Packages.mmcv
  • python311Packages.mmcv.dist
  • python311Packages.mmengine
  • python311Packages.mmengine.dist
  • python311Packages.monai
  • python311Packages.monai.dist
  • python311Packages.monty
  • python311Packages.monty.dist
  • python311Packages.nianet
  • python311Packages.nianet.dist
  • python311Packages.numpyro
  • python311Packages.numpyro.dist
  • python311Packages.openai-triton (python311Packages.openai-triton-no-cuda)
  • python311Packages.openai-triton-cuda
  • python311Packages.openai-triton-cuda.dist
  • python311Packages.openai-triton.dist (python311Packages.openai-triton-no-cuda.dist)
  • python311Packages.openllm
  • python311Packages.openllm.dist
  • python311Packages.optimum
  • python311Packages.optimum.dist
  • python311Packages.optuna
  • python311Packages.optuna.dist
  • python311Packages.pandas-stubs
  • python311Packages.pandas-stubs.dist
  • python311Packages.pdfplumber
  • python311Packages.pdfplumber.dist
  • python311Packages.peft
  • python311Packages.peft.dist
  • python311Packages.pgmpy
  • python311Packages.pgmpy.dist
  • python311Packages.piano-transcription-inference
  • python311Packages.piano-transcription-inference.dist
  • python311Packages.pydmd
  • python311Packages.pydmd.dist
  • python311Packages.pymatgen
  • python311Packages.pymatgen.dist
  • python311Packages.pymc
  • python311Packages.pymc.dist
  • python311Packages.pyro-ppl
  • python311Packages.pyro-ppl.dist
  • python311Packages.pytorch-lightning
  • python311Packages.pytorch-lightning.dist
  • python311Packages.pytorch-metric-learning
  • python311Packages.pytorch-metric-learning.dist
  • python311Packages.pytorch-msssim
  • python311Packages.pytorch-msssim.dist
  • python311Packages.pytorch-pfn-extras
  • python311Packages.pytorch-pfn-extras.dist
  • python311Packages.resize-right
  • python311Packages.resize-right.dist
  • python311Packages.rising
  • python311Packages.rising.dist
  • python311Packages.rotary-embedding-torch
  • python311Packages.rotary-embedding-torch.dist
  • python311Packages.safetensors
  • python311Packages.safetensors.dist
  • python311Packages.sentence-transformers
  • python311Packages.sentence-transformers.dist
  • python311Packages.shap
  • python311Packages.shap.dist
  • python311Packages.skorch
  • python311Packages.skorch.dist
  • python311Packages.skrl
  • python311Packages.skrl.dist
  • python311Packages.slicer
  • python311Packages.slicer.dist
  • python311Packages.snorkel
  • python311Packages.snorkel.dist
  • python311Packages.spacy
  • python311Packages.spacy-loggers
  • python311Packages.spacy-loggers.dist
  • python311Packages.spacy-lookups-data
  • python311Packages.spacy-lookups-data.dist
  • python311Packages.spacy-transformers
  • python311Packages.spacy-transformers.dist
  • python311Packages.spacy.dist
  • python311Packages.speechbrain
  • python311Packages.speechbrain.dist
  • python311Packages.stanza
  • python311Packages.stanza.dist
  • python311Packages.sumo
  • python311Packages.sumo.dist
  • python311Packages.tables
  • python311Packages.tables.dist
  • python311Packages.tensorboardx
  • python311Packages.tensorboardx.dist
  • python311Packages.test-tube
  • python311Packages.test-tube.dist
  • python311Packages.textacy
  • python311Packages.textacy.dist
  • python311Packages.textnets
  • python311Packages.textnets.dist
  • python311Packages.timm
  • python311Packages.timm.dist
  • python311Packages.torch (python311Packages.torchWithoutCuda ,python311Packages.torchWithoutRocm)
  • python311Packages.torch-tb-profiler
  • python311Packages.torch-tb-profiler.dist
  • python311Packages.torch.dev (python311Packages.torchWithoutCuda.dev ,python311Packages.torchWithoutRocm.dev)
  • python311Packages.torch.dist (python311Packages.torchWithoutCuda.dist ,python311Packages.torchWithoutRocm.dist)
  • python311Packages.torch.lib (python311Packages.torchWithoutCuda.lib ,python311Packages.torchWithoutRocm.lib)
  • python311Packages.torchWithCuda
  • python311Packages.torchWithCuda.dev
  • python311Packages.torchWithCuda.dist
  • python311Packages.torchWithCuda.lib
  • python311Packages.torchWithRocm
  • python311Packages.torchWithRocm.dev
  • python311Packages.torchWithRocm.dist
  • python311Packages.torchWithRocm.lib
  • python311Packages.torchaudio
  • python311Packages.torchaudio.dist
  • python311Packages.torchdiffeq
  • python311Packages.torchdiffeq.dist
  • python311Packages.torchgpipe
  • python311Packages.torchgpipe.dist
  • python311Packages.torchinfo
  • python311Packages.torchinfo.dist
  • python311Packages.torchio
  • python311Packages.torchio.dist
  • python311Packages.torchlibrosa
  • python311Packages.torchlibrosa.dist
  • python311Packages.torchmetrics
  • python311Packages.torchmetrics.dist
  • python311Packages.torchsde
  • python311Packages.torchsde.dist
  • python311Packages.torchvision
  • python311Packages.torchvision.dist
  • python311Packages.transformers
  • python311Packages.transformers.dist
  • python311Packages.translatehtml
  • python311Packages.translatehtml.dist
  • python311Packages.ttach
  • python311Packages.ttach.dist
  • python311Packages.txtai
  • python311Packages.txtai.dist
  • python311Packages.vqgan-jax
  • python311Packages.vqgan-jax.dist
  • python311Packages.wandb
  • python311Packages.wandb.dist
  • python311Packages.xformers
  • python311Packages.xformers.dist
  • rocmPackages.mivisionx (rocmPackages.mivisionx-hip ,rocmPackages_5.mivisionx ,rocmPackages_5.mivisionx-hip)
  • rocmPackages.mivisionx-cpu (rocmPackages_5.mivisionx-cpu)
  • rocmPackages.mivisionx-opencl (rocmPackages_5.mivisionx-opencl)
  • whisper-ctranslate2
  • whisper-ctranslate2.dist
  • wyoming-faster-whisper
  • wyoming-faster-whisper.dist

@SomeoneSerge
Copy link
Copy Markdown
Contributor

Indeed, eval looks fine:

❯ nix eval github:Madouura/nixpkgs/pr/triton-llvm#legacyPackages.aarch64-darwin.python3Packages.torch.outPath
"/nix/store/rjil2kzg3jz0vqywbf8mlm7v4v2bmfw8-python3.11-torch-2.0.1"
❯ nix eval github:Madouura/nixpkgs/pr/triton-llvm#legacyPackages.x86_64-darwin.python3Packages.torch.outPath
"/nix/store/9afb5lvw0ifr9jcdn9ilv2hhlrwdil7p-python3.11-torch-2.0.1"

@Artturin why does ofborg care about whether torch evals on master?

@Artturin
Copy link
Copy Markdown
Member

Indeed, eval looks fine:

❯ nix eval github:Madouura/nixpkgs/pr/triton-llvm#legacyPackages.aarch64-darwin.python3Packages.torch.outPath
"/nix/store/rjil2kzg3jz0vqywbf8mlm7v4v2bmfw8-python3.11-torch-2.0.1"
❯ nix eval github:Madouura/nixpkgs/pr/triton-llvm#legacyPackages.x86_64-darwin.python3Packages.torch.outPath
"/nix/store/9afb5lvw0ifr9jcdn9ilv2hhlrwdil7p-python3.11-torch-2.0.1"

@Artturin why does ofborg care about whether torch evals on master?

It doesn't, I just said it because @Madouura thought it was broken on this branch too.

@SomeoneSerge
Copy link
Copy Markdown
Contributor

image

Is this about master? Because I don't see how can it be about the current branch

@Artturin
Copy link
Copy Markdown
Member

Artturin commented Nov 16, 2023

@ofborg build python311Packages.torch

@Madouura
Copy link
Copy Markdown
Contributor Author

Madouura commented Nov 17, 2023

++ lib.optionals (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "16") [
"-Wno-error=cast-function-type-strict"

We can likely fix the aarch64-darwin error by adding the following under this:

"-Wno-error=maybe-uninitialized"
"-Wno-error=stringop-overflow"

I don't really want to over-complicate this PR with these kinds of fixes though and I have no way of actually testing darwin without annoying people with ofborg access until it works.
On the bright side, the x86_64-darwin build just seems to be a timeout and not an error.

@azuwis
Copy link
Copy Markdown
Contributor

azuwis commented Nov 17, 2023

Did ofborg tried to merge master before build?

$ nix-info -m
 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.0.0, macOS 14.0`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.17.1`
 - channels(azuwis): `""`
 - channels(root): `""`
 - nixpkgs: `/etc/nix/inputs/nixpkgs`
$ nix build github:Madouura/nixpkgs/pr/triton-llvm#python311Packages.torch --print-out-paths
/nix/store/rjil2kzg3jz0vqywbf8mlm7v4v2bmfw8-python3.11-torch-2.0.1
$ nix derivation show /nix/store/rjil2kzg3jz0vqywbf8mlm7v4v2bmfw8-python3.11-torch-2.0.1 | head -n 3
{
  "/nix/store/nqb2hfsn9vd06x3nhjgyqky0gsch99ck-python3.11-torch-2.0.1.drv": {
    "args": [

But https://github.com/NixOS/nixpkgs/pull/267209/checks?check_run_id=18767769137 shows it tried to build /nix/store/wy6alr3i3883c43ir6n20w0x7112j0n9-python3.11-torch-2.0.1.drv

@wegank
Copy link
Copy Markdown
Member

wegank commented Nov 17, 2023

From the error message on aarch64-darwin:

> [4235/4948] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/mkldnn/Pooling.cpp.o
> FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/mkldnn/Pooling.cpp.o
> ...
> error: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Werror,-Wunknown-warning-option]
> error: unknown warning option '-Wno-stringop-overflow'; did you mean '-Wno-shift-overflow'? [-Werror,-Wunknown-warning-option]
> ninja: build stopped: subcommand failed.

-Wno-maybe-uninitialized and -Wno-stringop-overflow are not recognized by Clang. These lines having been added in #266995 without being tested, a fix would be to set them as stdenv.cc.isGNU-only.

(A commit named python311Packages.torch: blabla instead of python3Packages.torch: blabla would trigger ofborg builds to get the issue found, but anyway.)

The x86_64-darwin build times out at [3871/5670], it doesn't even get to where the error occurs on aarch64-darwin. I have no idea if the build will succeed.

Madouura and others added 3 commits November 17, 2023 16:43
Cross-compilation code taken/modified from LLVM 16 derivation
Guard this option against 'stdenv.isDarwin', which currently is unknown whether it works or not.
@wegank wegank merged commit 4774c53 into NixOS:master Nov 17, 2023
@Madouura Madouura deleted the pr/triton-llvm branch November 17, 2023 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: python Python is a high-level, general-purpose programming language. 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants