Closed sneccc closed 1 year ago
Hi,
Sorry I'm only replying now - can you:
(1) Retry with -v
to have more logs (pip install -v git+https://github.com/facebookresearch/xformers@1d31a3a#egg=xformers
)
(2) Format your post so that the log is readable
(3) Report what your setup is (which nvcc
, pytorch version ..)
So following my overly long and convoluted deep dive in one of the other issues today, I managed to get it to compile/install on an RTX 3090 rented in the cloud.
Can't remember the issue off hand to link it directly here, but it seemed to work without errors in the end.
Edit: This one:
hey @0xdevalias, can you upload the whl ? It would be nice to have it precompiled for https://github.com/TheLastBen/fast-stable-diffusion/tree/main/precompiled
Hi @cpietsch
We now have github actions that recompile xformers regularly (see here: https://github.com/facebookresearch/xformers/actions/runs/3543179717). Cc @AbdBarho A single wheel will support all main architectures
❓ Questions and Help
Hello, I tried to compile xformers on a rented gpu from vast.ai with
%pip install git+https://github.com/facebookresearch/xformers@1d31a3a#egg=xformers
and got this big error:Collecting xformers Cloning https://github.com/facebookresearch/xformers (to revision 1d31a3a) to /tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac Running command git clone -q https://github.com/facebookresearch/xformers /tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac WARNING: Did not find branch or tag '1d31a3a', assuming revision or ref. Running command git checkout -q 1d31a3a Resolved https://github.com/facebookresearch/xformers to commit 1d31a3a Running command git submodule update --init --recursive -q Requirement already satisfied: torch>=1.12 in /opt/conda/lib/python3.9/site-packages (from xformers) (1.13.0) Requirement already satisfied: numpy in /opt/conda/lib/python3.9/site-packages (from xformers) (1.22.3) Requirement already satisfied: pyre-extensions==0.0.23 in /opt/conda/lib/python3.9/site-packages (from xformers) (0.0.23) Requirement already satisfied: typing-inspect in /opt/conda/lib/python3.9/site-packages (from pyre-extensions==0.0.23->xformers) (0.8.0) Requirement already satisfied: typing-extensions in /opt/conda/lib/python3.9/site-packages (from pyre-extensions==0.0.23->xformers) (4.4.0) Requirement already satisfied: mypy-extensions>=0.3.0 in /opt/conda/lib/python3.9/site-packages (from typing-inspect->pyre-extensions==0.0.23->xformers) (0.4.3) Building wheels for collected packages: xformers Building wheel for xformers (setup.py) ... error ERROR: Command errored out with exit status 1: command: /opt/conda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac/setup.py'"'"'; file='"'"'/tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-k4lvks8u cwd: /tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac/ Complete output (197 lines): /opt/conda/lib/python3.9/site-packages/setuptools/dist.py:516: UserWarning: Normalizing '0.0.14.dev' to '0.0.14.dev0' warnings.warn(tmpl.format(**locals())) running bdist_wheel /opt/conda/lib/python3.9/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) running build running build_py creating build creating build/lib.linux-x86_64-3.9 creating build/lib.linux-x86_64-3.9/experimental copying experimental/init.py -> build/lib.linux-x86_64-3.9/experimental copying experimental/setup.py -> build/lib.linux-x86_64-3.9/experimental creating build/lib.linux-x86_64-3.9/xformers copying xformers/test.py -> build/lib.linux-x86_64-3.9/xformers copying xformers/utils.py -> build/lib.linux-x86_64-3.9/xformers copying xformers/init.py -> build/lib.linux-x86_64-3.9/xformers copying xformers/ops.py -> build/lib.linux-x86_64-3.9/xformers creating build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/init.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/garbage_pad_ragged_acts.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/seq_kv_cache.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/test_utils.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/triton_v2_matmul.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/triton_v2_qk_dotprod.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/triton_v2_ragged_qk_dotprod.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference creating build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/init.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_blocksparse_transformers.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_causal_blocksparse.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_core.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_encoder.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_mlp.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_multi_head_dispatch.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_nvfuser.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_nystrom_utils.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_pytorch_transformer.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_revnet.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_sddmm.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_blocksparse.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_dropout.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_fused_linear.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_layernorm.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_softmax.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_stride_sum.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_vit_timm.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_mem_eff_attention.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/utils.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks creating build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/init.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/activations.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/patch_embedding.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/reversible.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/input_projection.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/multi_head_dispatch.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/residual.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/simplicial_embedding.py -> build/lib.linux-x86_64-3.9/xformers/components creating build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/init.py -> build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/block_configs.py -> build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/block_factory.py -> build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/hydra_helper.py -> build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/model_factory.py -> build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/weight_init.py -> build/lib.linux-x86_64-3.9/xformers/factory creating build/lib.linux-x86_64-3.9/xformers/helpers copying xformers/helpers/init.py -> build/lib.linux-x86_64-3.9/xformers/helpers copying xformers/helpers/hierarchical_configs.py -> build/lib.linux-x86_64-3.9/xformers/helpers copying xformers/helpers/timm_sparse_attention.py -> build/lib.linux-x86_64-3.9/xformers/helpers copying xformers/helpers/test_utils.py -> build/lib.linux-x86_64-3.9/xformers/helpers creating build/lib.linux-x86_64-3.9/xformers/sparse copying xformers/sparse/init.py -> build/lib.linux-x86_64-3.9/xformers/sparse copying xformers/sparse/_csr_ops.py -> build/lib.linux-x86_64-3.9/xformers/sparse copying xformers/sparse/csr_tensor.py -> build/lib.linux-x86_64-3.9/xformers/sparse copying xformers/sparse/utils.py -> build/lib.linux-x86_64-3.9/xformers/sparse copying xformers/sparse/blocksparse_tensor.py -> build/lib.linux-x86_64-3.9/xformers/sparse creating build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/init.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/dropout.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/fused_linear_layer.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_activations.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_dropout.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_fused_matmul_bw.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_fused_matmul_fw.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_layer_norm.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_softmax.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_sum.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/sum_strided.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/layer_norm.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/softmax.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/utils.py -> build/lib.linux-x86_64-3.9/xformers/triton creating build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/init.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/batch_fetch_results.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/batch_submit.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/run_grid_search.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/run_tasks.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/run_with_submitit.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA creating build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA/code copying xformers/benchmarks/LRA/code/init.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA/code copying xformers/benchmarks/LRA/code/dataset.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA/code copying xformers/benchmarks/LRA/code/model_wrapper.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA/code creating build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/_sputnik_sparse.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/attention_mask.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/attention_patterns.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/base.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/compositional.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/fourier_mix.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/global_tokens.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/lambda_layer.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/linformer.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/local.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/pooling.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/random.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/sparsity_config.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/utils.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/visual.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/init.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/blocksparse.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/core.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/favor.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/nystrom.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/ortho.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/scaled_dot_product.py -> build/lib.linux-x86_64-3.9/xformers/components/attention creating build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/init.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/base.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/conv_mlp.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/mlp.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/fused_mlp.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/mixture_of_experts.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward creating build/lib.linux-x86_64-3.9/xformers/components/nvfuser copying xformers/components/nvfuser/init.py -> build/lib.linux-x86_64-3.9/xformers/components/nvfuser copying xformers/components/nvfuser/bias_act_dropout.py -> build/lib.linux-x86_64-3.9/xformers/components/nvfuser copying xformers/components/nvfuser/bias_dropout_res.py -> build/lib.linux-x86_64-3.9/xformers/components/nvfuser copying xformers/components/nvfuser/bias_dropout_res_layernorm.py -> build/lib.linux-x86_64-3.9/xformers/components/nvfuser copying xformers/components/nvfuser/utils.py -> build/lib.linux-x86_64-3.9/xformers/components/nvfuser creating build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/init.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/base.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/param.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/rotary.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/sine.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/vocab.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding creating build/lib.linux-x86_64-3.9/xformers/components/attention/feature_maps copying xformers/components/attention/feature_maps/init.py -> build/lib.linux-x86_64-3.9/xformers/components/attention/feature_maps copying xformers/components/attention/feature_maps/base.py -> build/lib.linux-x86_64-3.9/xformers/components/attention/feature_maps copying xformers/components/attention/feature_maps/softmax.py -> build/lib.linux-x86_64-3.9/xformers/components/attention/feature_maps running build_ext Traceback (most recent call last): File "", line 1, in
File "/tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac/setup.py", line 232, in
setuptools.setup(
File "/opt/conda/lib/python3.9/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(*attrs)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/opt/conda/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/conda/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/conda/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/opt/conda/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 485, in build_extensions
compiler_name, compiler_version = self._check_abi()
File "/opt/conda/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 869, in _checkabi
, version = get_compiler_abi_compatibility_and_version(compiler)
File "/opt/conda/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 336, in get_compiler_abi_compatibility_and_version
if not check_compiler_ok_for_platform(compiler):
File "/opt/conda/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 290, in check_compiler_ok_for_platform
which = subprocess.check_output(['which', compiler], stderr=subprocess.STDOUT)
File "/opt/conda/lib/python3.9/subprocess.py", line 424, in check_output
return run(popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/opt/conda/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['which', 'g++']' returned non-zero exit status 1.
ERROR: Failed building wheel for xformers Running setup.py clean for xformers Failed to build xformers Installing collected packages: xformers Running setup.py install for xformers ... error ERROR: Command errored out with exit status 1: command: /opt/conda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac/setup.py'"'"'; file='"'"'/tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-z3j91_je/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/include/python3.9/xformers cwd: /tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac/ Complete output (201 lines): /opt/conda/lib/python3.9/site-packages/setuptools/dist.py:516: UserWarning: Normalizing '0.0.14.dev' to '0.0.14.dev0' warnings.warn(tmpl.format(**locals())) running install /opt/conda/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build/lib.linux-x86_64-3.9 creating build/lib.linux-x86_64-3.9/experimental copying experimental/init.py -> build/lib.linux-x86_64-3.9/experimental copying experimental/setup.py -> build/lib.linux-x86_64-3.9/experimental creating build/lib.linux-x86_64-3.9/xformers copying xformers/test.py -> build/lib.linux-x86_64-3.9/xformers copying xformers/utils.py -> build/lib.linux-x86_64-3.9/xformers copying xformers/init.py -> build/lib.linux-x86_64-3.9/xformers copying xformers/ops.py -> build/lib.linux-x86_64-3.9/xformers creating build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/init.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/garbage_pad_ragged_acts.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/seq_kv_cache.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/test_utils.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/triton_v2_matmul.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/triton_v2_qk_dotprod.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference copying experimental/ragged_inference/triton_v2_ragged_qk_dotprod.py -> build/lib.linux-x86_64-3.9/experimental/ragged_inference creating build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/init.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_blocksparse_transformers.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_causal_blocksparse.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_core.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_encoder.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_mlp.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_multi_head_dispatch.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_nvfuser.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_nystrom_utils.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_pytorch_transformer.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_revnet.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_sddmm.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_blocksparse.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_dropout.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_fused_linear.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_layernorm.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_softmax.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_triton_stride_sum.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_vit_timm.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/benchmark_mem_eff_attention.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks copying xformers/benchmarks/utils.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks creating build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/init.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/activations.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/patch_embedding.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/reversible.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/input_projection.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/multi_head_dispatch.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/residual.py -> build/lib.linux-x86_64-3.9/xformers/components copying xformers/components/simplicial_embedding.py -> build/lib.linux-x86_64-3.9/xformers/components creating build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/init.py -> build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/block_configs.py -> build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/block_factory.py -> build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/hydra_helper.py -> build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/model_factory.py -> build/lib.linux-x86_64-3.9/xformers/factory copying xformers/factory/weight_init.py -> build/lib.linux-x86_64-3.9/xformers/factory creating build/lib.linux-x86_64-3.9/xformers/helpers copying xformers/helpers/init.py -> build/lib.linux-x86_64-3.9/xformers/helpers copying xformers/helpers/hierarchical_configs.py -> build/lib.linux-x86_64-3.9/xformers/helpers copying xformers/helpers/timm_sparse_attention.py -> build/lib.linux-x86_64-3.9/xformers/helpers copying xformers/helpers/test_utils.py -> build/lib.linux-x86_64-3.9/xformers/helpers creating build/lib.linux-x86_64-3.9/xformers/sparse copying xformers/sparse/init.py -> build/lib.linux-x86_64-3.9/xformers/sparse copying xformers/sparse/_csr_ops.py -> build/lib.linux-x86_64-3.9/xformers/sparse copying xformers/sparse/csr_tensor.py -> build/lib.linux-x86_64-3.9/xformers/sparse copying xformers/sparse/utils.py -> build/lib.linux-x86_64-3.9/xformers/sparse copying xformers/sparse/blocksparse_tensor.py -> build/lib.linux-x86_64-3.9/xformers/sparse creating build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/init.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/dropout.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/fused_linear_layer.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_activations.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_dropout.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_fused_matmul_bw.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_fused_matmul_fw.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_layer_norm.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_softmax.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/k_sum.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/sum_strided.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/layer_norm.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/softmax.py -> build/lib.linux-x86_64-3.9/xformers/triton copying xformers/triton/utils.py -> build/lib.linux-x86_64-3.9/xformers/triton creating build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/init.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/batch_fetch_results.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/batch_submit.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/run_grid_search.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/run_tasks.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA copying xformers/benchmarks/LRA/run_with_submitit.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA creating build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA/code copying xformers/benchmarks/LRA/code/init.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA/code copying xformers/benchmarks/LRA/code/dataset.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA/code copying xformers/benchmarks/LRA/code/model_wrapper.py -> build/lib.linux-x86_64-3.9/xformers/benchmarks/LRA/code creating build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/_sputnik_sparse.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/attention_mask.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/attention_patterns.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/base.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/compositional.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/fourier_mix.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/global_tokens.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/lambda_layer.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/linformer.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/local.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/pooling.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/random.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/sparsity_config.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/utils.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/visual.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/init.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/blocksparse.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/core.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/favor.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/nystrom.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/ortho.py -> build/lib.linux-x86_64-3.9/xformers/components/attention copying xformers/components/attention/scaled_dot_product.py -> build/lib.linux-x86_64-3.9/xformers/components/attention creating build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/init.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/base.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/conv_mlp.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/mlp.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/fused_mlp.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward copying xformers/components/feedforward/mixture_of_experts.py -> build/lib.linux-x86_64-3.9/xformers/components/feedforward creating build/lib.linux-x86_64-3.9/xformers/components/nvfuser copying xformers/components/nvfuser/init.py -> build/lib.linux-x86_64-3.9/xformers/components/nvfuser copying xformers/components/nvfuser/bias_act_dropout.py -> build/lib.linux-x86_64-3.9/xformers/components/nvfuser copying xformers/components/nvfuser/bias_dropout_res.py -> build/lib.linux-x86_64-3.9/xformers/components/nvfuser copying xformers/components/nvfuser/bias_dropout_res_layernorm.py -> build/lib.linux-x86_64-3.9/xformers/components/nvfuser copying xformers/components/nvfuser/utils.py -> build/lib.linux-x86_64-3.9/xformers/components/nvfuser creating build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/init.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/base.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/param.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/rotary.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/sine.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding copying xformers/components/positional_embedding/vocab.py -> build/lib.linux-x86_64-3.9/xformers/components/positional_embedding creating build/lib.linux-x86_64-3.9/xformers/components/attention/feature_maps copying xformers/components/attention/feature_maps/init.py -> build/lib.linux-x86_64-3.9/xformers/components/attention/feature_maps copying xformers/components/attention/feature_maps/base.py -> build/lib.linux-x86_64-3.9/xformers/components/attention/feature_maps copying xformers/components/attention/feature_maps/softmax.py -> build/lib.linux-x86_64-3.9/xformers/components/attention/feature_maps running build_ext /opt/conda/lib/python3.9/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) Traceback (most recent call last): File "", line 1, in
File "/tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac/setup.py", line 232, in
setuptools.setup(
File "/opt/conda/lib/python3.9/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(*attrs)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/opt/conda/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.9/site-packages/setuptools/command/install.py", line 68, in run
return orig.install.run(self)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/command/install.py", line 664, in run
self.run_command('build')
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/conda/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/conda/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/opt/conda/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/opt/conda/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 485, in build_extensions
compiler_name, compiler_version = self._check_abi()
File "/opt/conda/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 869, in _checkabi
, version = get_compiler_abi_compatibility_and_version(compiler)
File "/opt/conda/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 336, in get_compiler_abi_compatibility_and_version
if not check_compiler_ok_for_platform(compiler):
File "/opt/conda/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 290, in check_compiler_ok_for_platform
which = subprocess.check_output(['which', compiler], stderr=subprocess.STDOUT)
File "/opt/conda/lib/python3.9/subprocess.py", line 424, in check_output
return run(popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/opt/conda/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['which', 'g++']' returned non-zero exit status 1.
ERROR: Command errored out with exit status 1: /opt/conda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac/setup.py'"'"'; file='"'"'/tmp/pip-install-4johb3uw/xformers_dc146cf4bc794911bea15571bff769ac/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-z3j91_je/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/include/python3.9/xformers Check the logs for full command output.