python3Packages: remove unnecessary llvmPackages.openmp inclusions

This commit is contained in:
Gaetan Lepage
2026-07-03 21:38:53 +00:00
parent c1f04f375c
commit 08114f95db
10 changed files with 4 additions and 51 deletions
@@ -44,8 +44,6 @@ buildPythonPackage (finalAttrs: {
hash = "sha256-IfKePiU38fUd5HefaS7J1s8Mb6hVmldINemxAJY+83o=";
};
buildInputs = [ llvmPackages.openmp ];
build-system = [ setuptools ];
dependencies = [
@@ -7,7 +7,6 @@
# build-system
setuptools,
setuptools-scm,
llvmPackages,
# dependencies
frozendict,
@@ -47,10 +46,6 @@ buildPythonPackage (finalAttrs: {
setuptools-scm
];
buildInputs = lib.optionals stdenv.cc.isClang [
llvmPackages.openmp
];
dependencies = [
frozendict
loguru
@@ -62,12 +62,6 @@ buildPythonPackage (finalAttrs: {
"test_variance"
];
propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
# Otherwise, torch will fail to include `omp.h`:
# torch._inductor.exc.InductorError: CppCompileError: C++ compile error OpenMP support not found
llvmPackages.openmp
];
meta = {
description = "Modular framework for neural networks with Euclidean symmetry";
homepage = "https://github.com/e3nn/e3nn";
@@ -40,12 +40,6 @@ buildPythonPackage (finalAttrs: {
pythonImportsCheck = [ "hoptorch" ];
checkInputs = lib.optionals stdenv.hostPlatform.isDarwin [
# torch._inductor.exc.InductorError: CppCompileError: C++ compile error
# fatal error: 'omp.h' file not found
llvmPackages.openmp
];
nativeCheckInputs = [
pytestCheckHook
];
@@ -59,11 +59,6 @@ buildPythonPackage (finalAttrs: {
];
dontUseCmakeConfigure = true;
checkInputs = lib.optionals stdenv.cc.isClang [
# test_async_iterator_* hangs after failing to find OMP headers
llvmPackages.openmp
];
pythonRelaxDeps = [
"av"
"diffusers"
@@ -53,8 +53,6 @@ buildPythonPackage rec {
transformers
];
checkInputs = lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ];
disabledTests = [
# on CPU, these expect artifacts from previous GPU run
"test_load_cuda_params_to_cpu"
@@ -389,7 +389,7 @@ buildPythonPackage.override { inherit stdenv; } (finalAttrs: {
# Otherwise, torch compile will fail at runtime if openmp is not available
# torch._inductor.exc.InductorError: CppCompileError: C++ compile error
# fatal error: 'omp.h' file not found
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
+ lib.optionalString stdenv.cc.isClang ''
substituteInPlace torch/csrc/inductor/cpp_prefix.h \
--replace-fail \
"#include <omp.h>" \
@@ -77,13 +77,6 @@ buildPythonPackage (finalAttrs: {
cpuinfo
];
propagatedBuildInputs = lib.optionals isDarwin [
# Otherwise, torch will fail to include `omp.h`:
# torch._inductor.exc.InductorError: CppCompileError: C++ compile error
# OpenMP support not found.
llvmPackages.openmp
];
dependencies = [
torch
];
@@ -4,9 +4,6 @@
buildPythonPackage,
fetchFromGitHub,
# buildInputs
llvmPackages,
# build-system
setuptools,
@@ -89,13 +86,9 @@ buildPythonPackage.override { inherit (torch) stdenv; } (finalAttrs: {
cudaPackages.cuda_nvcc
];
buildInputs =
lib.optionals cudaSupport [
cudaPackages.cuda_cudart
]
++ lib.optionals torch.stdenv.cc.isClang [
llvmPackages.openmp
];
buildInputs = lib.optionals cudaSupport [
cudaPackages.cuda_cudart
];
dependencies = [
torch
@@ -22,7 +22,6 @@
pytest-xdist,
pytestCheckHook,
writableTmpDirAsHomeHook,
llvmPackages,
}:
buildPythonPackage (finalAttrs: {
@@ -66,12 +65,6 @@ buildPythonPackage (finalAttrs: {
writableTmpDirAsHomeHook
];
checkInputs = lib.optionals stdenv.cc.isClang [
# torch._inductor.exc.InductorError: CppCompileError: C++ compile error
# fatal error: 'omp.h' file not found
llvmPackages.openmp
];
disabledTests = [
# Require internet access
"test_dataset_s66x8"