Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcode the numpy version #2316

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ transformers==4.38.1
MonkeyType
psutil
pyyaml
numpy
# We need to pin numpy version to the same as the torch testing environment
# which still supports python 3.8
numpy==1.21.2; python_version < '3.11'
numpy==1.26.0; python_version >= '3.11'
opencv-python
submitit
pynvml
5 changes: 4 additions & 1 deletion torchbenchmark/models/Background_Matting/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
numpy
# We need to pin numpy version to the same as the torch testing environment
# which still supports python 3.8
numpy==1.21.2; python_version < '3.11'
numpy==1.26.0; python_version >= '3.11'
opencv-python
pandas
Pillow
Expand Down
6 changes: 5 additions & 1 deletion torchbenchmark/models/hf_Whisper/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
numba
numba
# We need to pin numpy version to the same as the torch testing environment
# which still supports python 3.8
numpy==1.21.2; python_version < '3.11'
numpy==1.26.0; python_version >= '3.11'
5 changes: 4 additions & 1 deletion torchbenchmark/models/tacotron2/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
numpy
# We need to pin numpy version to the same as the torch testing environment
# which still supports python 3.8
numpy==1.21.2; python_version < '3.11'
numpy==1.26.0; python_version >= '3.11'
inflect
scipy
Unidecode
Expand Down
5 changes: 4 additions & 1 deletion torchbenchmark/util/framework/detectron2/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
git+https://github.com/facebookresearch/detectron2.git@0df2d73d0013db7de629602c23cc120219b4f2b8
omegaconf==2.3.0
numpy
# We need to pin numpy version to the same as the torch testing environment
# which still supports python 3.8
numpy==1.21.2; python_version < '3.11'
numpy==1.26.0; python_version >= '3.11'
6 changes: 6 additions & 0 deletions utils/build_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# We need to pin numpy version to the same as the torch testing environment
# which still supports python 3.8
numpy==1.21.2; python_version < '3.11'
numpy==1.26.0; python_version >= '3.11'
psutil
pyyaml
12 changes: 5 additions & 7 deletions utils/cuda_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# defines the default CUDA version to compile against
DEFAULT_CUDA_VERSION = "12.4"
REPO_ROOT = Path(__file__).parent.parent

CUDA_VERSION_MAP = {
"12.4": {
Expand All @@ -17,11 +18,9 @@
},
}
PIN_CMAKE_VERSION = "3.22.*"
# the numpy version needs to be consistent with
# https://github.com/pytorch/builder/blob/e66e48f9b1968213c6a7ce3ca8df6621435f0a9c/wheel/build_wheel.sh#L146
PIN_NUMPY_VERSION = "1.23.5"
TORCHBENCH_TORCH_NIGHTLY_PACKAGES = ["torch", "torchvision", "torchaudio"]

TORCHBENCH_TORCH_NIGHTLY_PACKAGES = ["torch", "torchvision", "torchaudio"]
BUILD_REQUIREMENTS_FILE = REPO_ROOT.joinpath("utils", "build_requirements.txt")

def _nvcc_output_match(nvcc_output, target_cuda_version):
regex = "release (.*),"
Expand Down Expand Up @@ -153,9 +152,8 @@ def install_torch_build_deps(cuda_version: str):
build_deps = ["ffmpeg"]
cmd = ["conda", "install", "-y"] + build_deps
subprocess.check_call(cmd)
# pip deps
pip_deps = [f"numpy=={PIN_NUMPY_VERSION}"]
cmd = ["pip", "install"] + pip_deps
# pip build deps
cmd = ["pip", "install", "-r"] + str(BUILD_REQUIREMENTS_FILE.resolve())
subprocess.check_call(cmd)
# conda forge deps
# ubuntu 22.04 comes with libstdcxx6 12.3.0
Expand Down
Loading