From 0eac8299d470a277d5331aec850a41fb4f543ae6 Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein <669761+bottler@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:24:07 -0700 Subject: [PATCH] MKL version fix in CI (#1820) Summary: Fix for "undefined symbol: iJIT_NotifyEvent" build issue, Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1820 Differential Revision: D58685326 --- packaging/build_conda.py | 6 ++++++ packaging/pytorch3d/meta.yaml | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packaging/build_conda.py b/packaging/build_conda.py index 3ef730b2..da01967e 100644 --- a/packaging/build_conda.py +++ b/packaging/build_conda.py @@ -80,6 +80,12 @@ def setup_cuda(): def setup_conda_pytorch_constraint() -> List[str]: pytorch_constraint = f"- pytorch=={PYTORCH_VERSION}" os.environ["CONDA_PYTORCH_CONSTRAINT"] = pytorch_constraint + if pytorch_major_minor < (2, 2): + os.environ["CONDA_PYTORCH_MKL_CONSTRAINT"] = "- mkl!=2024.1.0" + os.environ["SETUPTOOLS_CONSTRAINT"] = "- setuptools<70" + else: + os.environ["CONDA_PYTORCH_MKL_CONSTRAINT"] = "" + os.environ["SETUPTOOLS_CONSTRAINT"] = "- setuptools" os.environ["CONDA_PYTORCH_BUILD_CONSTRAINT"] = pytorch_constraint os.environ["PYTORCH_VERSION_NODOT"] = PYTORCH_VERSION.replace(".", "") diff --git a/packaging/pytorch3d/meta.yaml b/packaging/pytorch3d/meta.yaml index 8604127d..fb7482ec 100644 --- a/packaging/pytorch3d/meta.yaml +++ b/packaging/pytorch3d/meta.yaml @@ -12,8 +12,9 @@ requirements: host: - python - - setuptools + {{ environ.get('SETUPTOOLS_CONSTRAINT') }} {{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT') }} + {{ environ.get('CONDA_PYTORCH_MKL_CONSTRAINT') }} {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }} {{ environ.get('CONDA_CPUONLY_FEATURE') }}