Skip to content

[BUG] Xformers not support NO-GIL #1345

@johnnynunez

Description

@johnnynunez
[0m�[91m+ git clone --depth=1 --recursive https://github.com/facebookresearch/xformers /opt/xformers
�[0m�[91mCloning into '/opt/xformers'...
�[0m�[91mSubmodule 'third_party/composable_kernel_tiled' (https://github.com/ROCm/composable_kernel.git) registered for path 'third_party/composable_kernel_tiled'
�[0m�[91mSubmodule 'third_party/cutlass' (https://github.com/NVIDIA/cutlass.git) registered for path 'third_party/cutlass'
�[0m�[91mSubmodule 'third_party/flash-attention' (https://github.com/Dao-AILab/flash-attention.git) registered for path 'third_party/flash-attention'
�[0m�[91mCloning into '/opt/xformers/third_party/composable_kernel_tiled'...
�[0m�[91mCloning into '/opt/xformers/third_party/cutlass'...
�[0m�[91mCloning into '/opt/xformers/third_party/flash-attention'...
�[0mSubmodule path 'third_party/composable_kernel_tiled': checked out '50fad035248b154cdfa4505cf5de7465ce146149'
Submodule path 'third_party/cutlass': checked out 'e9627ce55b42fd2599f58cd4396da9380954def0'
Submodule path 'third_party/flash-attention': checked out 'c485eeade0c3ec9ce186c3640c52c9f1ce090b81'
�[91mSubmodule 'csrc/composable_kernel' (https://github.com/ROCm/composable_kernel.git) registered for path 'third_party/flash-attention/csrc/composable_kernel'
�[0m�[91mSubmodule 'csrc/cutlass' (https://github.com/NVIDIA/cutlass.git) registered for path 'third_party/flash-attention/csrc/cutlass'
�[0m�[91mCloning into '/opt/xformers/third_party/flash-attention/csrc/composable_kernel'...
�[0m�[91mCloning into '/opt/xformers/third_party/flash-attention/csrc/cutlass'...
�[0mSubmodule path 'third_party/flash-attention/csrc/composable_kernel': checked out 'e8709c24f403173ad21a2da907d1347957e324fb'
Submodule path 'third_party/flash-attention/csrc/cutlass': checked out 'c6aeb9179c5f74a0fcdbd28527bf4b6ba8c60752'
�[91m+ cd /opt/xformers
�[0m�[91m+ [[ -z '' ]]
+ export MAX_JOBS=6
+ MAX_JOBS=6
�[0m�[91m++ uname -i
�[0m�[91m+ ARCH=aarch64
+ '[' aarch64 = aarch64 ']'
�[0m�[91m+ export NVCC_THREADS=1
+ NVCC_THREADS=1
+ export 'CUDA_NVCC_FLAGS=-Xcudafe --threads=1'
+ CUDA_NVCC_FLAGS='-Xcudafe --threads=1'
+ export MAKEFLAGS=-j2
+ MAKEFLAGS=-j2
�[0mBuilding with MAX_JOBS=6 and CMAKE_BUILD_PARALLEL_LEVEL=6
�[91m+ export CMAKE_BUILD_PARALLEL_LEVEL=6
+ CMAKE_BUILD_PARALLEL_LEVEL=6
+ export NINJAFLAGS=-j2
+ NINJAFLAGS=-j2
+ echo 'Building with MAX_JOBS=6 and CMAKE_BUILD_PARALLEL_LEVEL=6'
+ MAX_JOBS=6
+ CMAKE_BUILD_PARALLEL_LEVEL=6
+ XFORMERS_DISABLE_FLASH_ATTN=1
+ XFORMERS_MORE_DETAILS=1
+ python3 setup.py --verbose bdist_wheel --dist-dir /opt/xformers/wheels
�[0m�[91m/opt/venv/lib/python3.14t/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: BSD License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
  self._finalize_license_expression()
�[0mrunning bdist_wheel
�[91mTraceback (most recent call last):
�[0m�[91m  File "/opt/xformers/setup.py", line 782, in <module>
    setuptools.setup(
    ~~~~~~~~~~~~~~~~^
        name="xformers",
        ^^^^^^^^^^^^^^^^
    ...<33 lines>...
        options={"bdist_wheel": {"py_limited_api": "cp39"}},
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/venv/lib/python3.14t/site-packages/setuptools/__init__.py", line 115, in setup
    return distutils.core.setup(**attrs)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/opt/venv/lib/python3.14t/site-packages/setuptools/_distutils/core.py", line 186, in setup
    return run_commands(dist)
  File "/opt/venv/lib/python3.14t/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
    dist.run_commands()
    ~~~~~~~~~~~~~~~~~^^
  File "/opt/venv/lib/python3.14t/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
    self.run_command(cmd)
    ~~~~~~~~~~~~~~~~^^^^^
  File "/opt/venv/lib/python3.14t/site-packages/setuptools/dist.py", line 1102, in run_command
    super().run_command(command)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/opt/venv/lib/python3.14t/site-packages/setuptools/_distutils/dist.py", line 1020, in run_command
    cmd_obj.ensure_finalized()
    ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/opt/venv/lib/python3.14t/site-packages/setuptools/_distutils/cmd.py", line 135, in ensure_finalized
    self.finalize_options()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/opt/venv/lib/python3.14t/site-packages/setuptools/command/bdist_wheel.py", line 250, in finalize_options
    self._validate_py_limited_api()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/opt/venv/lib/python3.14t/site-packages/setuptools/command/bdist_wheel.py", line 285, in _validate_py_limited_api
    raise ValueError(
    ...<4 lines>...
    )
�[0m�[91mValueError: `py_limited_api='cp39'` not supported. `Py_LIMITED_API` is currently incompatible with `Py_GIL_DISABLED`. See https://github.com/python/cpython/issues/111506.
�[0mThe command '/bin/sh -c /tmp/xformers/install.sh || /tmp/xformers/build.sh' returned a non-zero code: 1

pylimit is not compatible python/cpython#111506

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions