Repository: pytorch/benchmark
Issue: Failed setup of fambench_xlmr
Root cause: External Dependency Breakage

I encountered the following error when running `python install.py`. All other model setups are fine (except attention_is_all_you_need because [www.quest.dcs.shef.ac.uk](http://www.quest.dcs.shef.ac.uk/) is down.

```
...
running setup for /scratch/sy/work/torchbenchmark/torchbenchmark/models/fambench_xlmr...FAIL
Error for /scratch/sy/work/torchbenchmark/torchbenchmark/models/fambench_xlmr:
---------------------------------------------------------------------------
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
running build_ext
cythoning fairseq/data/data_utils_fast.pyx to fairseq/data/data_utils_fast.cpp
cythoning fairseq/data/token_block_utils_fast.pyx to fairseq/data/token_block_utils_fast.cpp
building 'fairseq.libbleu' extension
creating /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/build
creating /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/build/temp.linux-x86_64-3.8
creating /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/build/temp.linux-x86_64-3.8/fairseq
creating /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/build/temp.linux-x86_64-3.8/fairseq/clib
creating /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/build/temp.linux-x86_64-3.8/fairseq/clib/libbleu
Emitting ninja build file /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/build/temp.linux-x86_64-3.8/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
Using cache found in /data/home/sy/.cache/torch/hub/pytorch_fairseq_main
[1/2] c++ -MMD -MF /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/build/temp.linux-x86_64-3.8/fairseq/clib/libbleu/module.o.d -pthread -B /scratch/sy/work/py38/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/scratch/sy/work/py38/include/python3.8 -c -c /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/fairseq/clib/libbleu/module.cpp -o /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/build/temp.linux-x86_64-3.8/fairseq/clib/libbleu/module.o -std=c++11 -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=libbleu -D_GLIBCXX_USE_CXX11_ABI=1
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
[2/2] c++ -MMD -MF /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/build/temp.linux-x86_64-3.8/fairseq/clib/libbleu/libbleu.o.d -pthread -B /scratch/sy/work/py38/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/scratch/sy/work/py38/include/python3.8 -c -c /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/fairseq/clib/libbleu/libbleu.cpp -o /data/home/sy/.cache/torch/hub/pytorch_fairseq_main/build/temp.linux-x86_64-3.8/fairseq/clib/libbleu/libbleu.o -std=c++11 -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=libbleu -D_GLIBCXX_USE_CXX11_ABI=1
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
creating build/lib.linux-x86_64-3.8
...
    self.build_extensions()
  File "/scratch/sy/work/pytorch/torch/utils/cpp_extension.py", line 765, in build_extensions
    build_ext.build_extensions(self)
  File "/scratch/sy/work/py38/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
    _build_ext.build_ext.build_extensions(self)
  File "/scratch/sy/work/py38/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/scratch/sy/work/py38/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/scratch/sy/work/py38/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
    _build_ext.build_extension(self, ext)
  File "/scratch/sy/work/py38/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 528, in build_extension
    objects = self.compiler.compile(sources,
  File "/scratch/sy/work/pytorch/torch/utils/cpp_extension.py", line 586, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/scratch/sy/work/pytorch/torch/utils/cpp_extension.py", line 1487, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "/scratch/sy/work/pytorch/torch/utils/cpp_extension.py", line 1824, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension


---------------------------------------------------------------------------

Traceback (most recent call last):
  File "install.py", line 99, in <module>
    raise RuntimeError("Failed to complete setup")
RuntimeError: Failed to complete setup
```

Can you try on the latest main branch? We fixed `attention_is_all_you_need` in https://github.com/pytorch/benchmark/pull/937, and fixed `fambench_xlmr` in https://github.com/pytorch/benchmark/pull/926

@yushangdi can you please check if the latest main branch fixes the issue?

works for me now!