Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
cc26cd81
Commit
cc26cd81
authored
Nov 27, 2023
by
panning
Browse files
merge v0.16.0
parents
f78f29f5
fbb4cc54
Changes
370
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
71 additions
and
472 deletions
+71
-472
packaging/post_build_script.sh
packaging/post_build_script.sh
+2
-0
packaging/pre_build_script.sh
packaging/pre_build_script.sh
+50
-0
packaging/torchvision/conda_build_config.yaml
packaging/torchvision/conda_build_config.yaml
+1
-1
packaging/torchvision/meta.yaml
packaging/torchvision/meta.yaml
+5
-4
packaging/vs2017/activate.bat
packaging/vs2017/activate.bat
+0
-44
packaging/vs2017/conda_build_config.yaml
packaging/vs2017/conda_build_config.yaml
+0
-23
packaging/vs2017/install_activate.bat
packaging/vs2017/install_activate.bat
+0
-29
packaging/vs2017/install_runtime.bat
packaging/vs2017/install_runtime.bat
+0
-49
packaging/vs2017/meta.yaml
packaging/vs2017/meta.yaml
+0
-24
packaging/vs2019/conda_build_config.yaml
packaging/vs2019/conda_build_config.yaml
+1
-1
packaging/vs2019/install_runtime.bat
packaging/vs2019/install_runtime.bat
+0
-49
packaging/wheel/relocate.py
packaging/wheel/relocate.py
+2
-12
packaging/windows/internal/cuda_install.bat
packaging/windows/internal/cuda_install.bat
+0
-143
packaging/windows/internal/driver_update.bat
packaging/windows/internal/driver_update.bat
+0
-25
packaging/windows/internal/vc_env_helper.bat
packaging/windows/internal/vc_env_helper.bat
+6
-2
packaging/windows/internal/vc_install_helper.sh
packaging/windows/internal/vc_install_helper.sh
+0
-16
packaging/windows/internal/vs2017_install.ps1
packaging/windows/internal/vs2017_install.ps1
+0
-25
packaging/windows/internal/vs2019_install.ps1
packaging/windows/internal/vs2019_install.ps1
+0
-21
pyproject.toml
pyproject.toml
+1
-1
pytest.ini
pytest.ini
+3
-3
No files found.
Too many changes to show.
To preserve performance only
370 of 370+
files are displayed.
Plain diff
Email patch
packaging/post_build_script.sh
0 → 100644
View file @
cc26cd81
#!/bin/bash
LD_LIBRARY_PATH
=
"/usr/local/lib:
$CUDA_HOME
/lib64:
$LD_LIBRARY_PATH
"
python packaging/wheel/relocate.py
packaging/pre_build_script.sh
0 → 100644
View file @
cc26cd81
#!/bin/bash
if
[[
"
$(
uname
)
"
==
Darwin
]]
;
then
# Uninstall Conflicting jpeg brew formulae
jpeg_packages
=
$(
brew list |
grep
jpeg
)
echo
"Existing Jpeg-related Brew libraries"
echo
$jpeg_packages
for
pkg
in
$jpeg_packages
;
do
brew uninstall
--ignore-dependencies
--force
$pkg
||
true
done
conda
install
-yq
wget
fi
if
[[
"
$(
uname
)
"
==
Darwin
||
"
$OSTYPE
"
==
"msys"
]]
;
then
# Install libpng from Anaconda (defaults)
conda
install
libpng
-yq
conda
install
-yq
ffmpeg
=
4.2 libjpeg-turbo
-c
pytorch
# Copy binaries to be included in the wheel distribution
if
[[
"
$OSTYPE
"
==
"msys"
]]
;
then
python_exec
=
"
$(
which python
)
"
bin_path
=
$(
dirname
$python_exec
)
cp
"
$bin_path
/Library/bin/libjpeg.dll"
torchvision
fi
else
if
[[
"
$ARCH
"
==
"aarch64"
]]
;
then
conda
install
libpng
-yq
conda
install
-yq
ffmpeg
=
4.2 libjpeg-turbo
-c
pytorch-nightly
fi
# Install native CentOS libJPEG, freetype and GnuTLS
yum
install
-y
libjpeg-turbo-devel freetype gnutls
# Download all the dependencies required to compile image and video_reader
# extensions
mkdir
-p
ext_libraries
pushd
ext_libraries
popd
export
PATH
=
"
$(
pwd
)
/ext_libraries/bin:
$PATH
"
pip
install
auditwheel
# Point to custom libraries
export
LD_LIBRARY_PATH
=
$(
pwd
)
/ext_libraries/lib:
$LD_LIBRARY_PATH
export
TORCHVISION_INCLUDE
=
$(
pwd
)
/ext_libraries/include
export
TORCHVISION_LIBRARY
=
$(
pwd
)
/ext_libraries/lib
fi
pip
install
numpy pyyaml future ninja
pip
install
--upgrade
setuptools
packaging/torchvision/conda_build_config.yaml
View file @
cc26cd81
...
@@ -7,7 +7,7 @@ c_compiler:
...
@@ -7,7 +7,7 @@ c_compiler:
cxx_compiler
:
cxx_compiler
:
-
vs2017
# [win]
-
vs2017
# [win]
python
:
python
:
-
3.
7
-
3.
8
# This differs from target_platform in that it determines what subdir the compiler
# This differs from target_platform in that it determines what subdir the compiler
# will target, not what subdir the compiler package will be itself.
# will target, not what subdir the compiler package will be itself.
# For example, we need a win-64 vs2008_win-32 package, so that we compile win-32
# For example, we need a win-64 vs2008_win-32 package, so that we compile win-32
...
...
packaging/torchvision/meta.yaml
View file @
cc26cd81
...
@@ -10,7 +10,7 @@ requirements:
...
@@ -10,7 +10,7 @@ requirements:
build
:
build
:
-
{{
compiler('c')
}}
# [win]
-
{{
compiler('c')
}}
# [win]
-
libpng
-
libpng
-
jpeg
-
lib
jpeg
-turbo
# NOTE: The only ffmpeg version that we build is actually 4.2
# NOTE: The only ffmpeg version that we build is actually 4.2
-
ffmpeg >=4.2
# [not win]
-
ffmpeg >=4.2
# [not win]
...
@@ -23,11 +23,12 @@ requirements:
...
@@ -23,11 +23,12 @@ requirements:
run
:
run
:
-
python
-
python
-
defaults::numpy >=1.11
-
defaults::numpy >=1.11
# [py <= 310]
-
numpy >=1.23.5
# [py >= 311]
-
requests
-
requests
-
libpng
-
libpng
-
ffmpeg >=4.2
# [not win]
-
ffmpeg >=4.2
# [not win]
-
jpeg
-
lib
jpeg
-turbo
-
pillow >=5.3.0, !=8.3.*
-
pillow >=5.3.0, !=8.3.*
-
pytorch-mutex 1.0 {{ build_variant }}
# [not osx ]
-
pytorch-mutex 1.0 {{ build_variant }}
# [not osx ]
{{
environ.get('CONDA_PYTORCH_CONSTRAINT')
}}
{{
environ.get('CONDA_PYTORCH_CONSTRAINT')
}}
...
@@ -61,7 +62,7 @@ test:
...
@@ -61,7 +62,7 @@ test:
requires
:
requires
:
-
pytest
-
pytest
-
scipy
-
scipy
-
jpeg
-
lib
jpeg
-turbo
-
ca-certificates
-
ca-certificates
...
...
packaging/vs2017/activate.bat
deleted
100644 → 0
View file @
f78f29f5
:: Set env vars that tell distutils to use the compiler that we put on path
SET
DISTUTILS_USE_SDK
=
1
SET
MSSdk
=
1
SET
"VS_VERSION=15.0"
SET
"VS_MAJOR=15"
SET
"VS_YEAR=2017"
set
"MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"
set
"MSYS2_ENV_CONV_EXCL=CL"
:: For Python 3.5+, ensure that we link with the dynamic runtime. See
:: http://stevedower.id.au/blog/building-for-python-3-5-part-two/ for more info
set
"PY_VCRUNTIME_REDIST=
%PREFIX%
\\bin\\vcruntime140.dll"
for
/f
"usebackq tokens=*"
%%i
in
(
`"
%ProgramFiles
(x86)
%
\Microsoft Visual Studio\Installer\vswhere.exe" -legacy -products * -version [15
^,
16
^)
-property installationPath`
)
do
(
if
exist
"
%%i
"
if
exist
"
%%i
\VC\Auxiliary\Build\vcvarsall.bat"
(
set
"VSINSTALLDIR=
%%i
\"
goto
:vswhere
)
)
:vswhere
:: Shorten PATH to avoid the `input line too long` error.
SET
MyPath
=
%PATH%
setlocal
EnableDelayedExpansion
SET
TempPath
=
"
%MyPath
:;="
;
"
%
"
SET
var
=
FOR
%%a
IN
(
%TempPath%
)
DO
(
IF
EXIST
%%~sa
(
SET
"var=
!var!
;
%%~sa
"
)
)
set
"TempPath=
!
var:~1
!
"
endlocal
&
set
"PATH=
%TempPath%
"
:: Shorten current directory too
FOR
%%A
IN
(
.
)
DO
CD
"
%%~sA
"
:: other things added by install_activate.bat at package build time
packaging/vs2017/conda_build_config.yaml
deleted
100644 → 0
View file @
f78f29f5
blas_impl
:
-
mkl
# [x86_64]
c_compiler
:
-
vs2017
# [win]
cxx_compiler
:
-
vs2017
# [win]
python
:
-
3.7
# This differs from target_platform in that it determines what subdir the compiler
# will target, not what subdir the compiler package will be itself.
# For example, we need a win-64 vs2008_win-32 package, so that we compile win-32
# code on win-64 miniconda.
cross_compiler_target_platform
:
-
win-64
# [win]
target_platform
:
-
win-64
# [win]
vc
:
-
14
zip_keys
:
-
# [win]
-
vc
# [win]
-
c_compiler
# [win]
-
cxx_compiler
# [win]
packaging/vs2017/install_activate.bat
deleted
100644 → 0
View file @
f78f29f5
set
YEAR
=
2017
set
VER
=
15
mkdir
"
%PREFIX%
\etc\conda\activate.d"
COPY
"
%RECIPE_DIR%
\activate.bat"
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
IF
"
%cross_compiler_target_platform%
"
==
"win-64"
(
set
"target_platform=amd64"
echo
SET
"CMAKE_GENERATOR=Visual Studio
%VER%
%YEAR%
Win64"
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
echo
pushd
"
%%VSINSTALLDIR%%
"
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
IF
"
%VSDEVCMD_ARGS%
"
==
""
(
echo
CALL
"VC\Auxiliary\Build\vcvarsall.bat"
x64
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
echo
popd
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
echo
pushd
"
%%VSINSTALLDIR%%
"
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
echo
CALL
"VC\Auxiliary\Build\vcvarsall.bat"
x86_amd64
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
)
ELSE
(
echo
CALL
"VC\Auxiliary\Build\vcvarsall.bat"
x64
%VSDEVCMD_ARGS%
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
echo
popd
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
echo
pushd
"
%%VSINSTALLDIR%%
"
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
echo
CALL
"VC\Auxiliary\Build\vcvarsall.bat"
x86_amd64
%VSDEVCMD_ARGS%
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
)
echo
popd
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
)
else
(
set
"target_platform=x86"
echo
SET
"CMAKE_GENERATOR=Visual Studio
%VER%
%YEAR%
"
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
echo
pushd
"
%%VSINSTALLDIR%%
"
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
echo
CALL
"VC\Auxiliary\Build\vcvars32.bat"
>>
"
%PREFIX%
\etc\conda\activate.d\vs
%YEAR%
_compiler_vars.bat"
echo
popd
)
packaging/vs2017/install_runtime.bat
deleted
100644 → 0
View file @
f78f29f5
set
VC_PATH
=
x86
if
"
%ARCH%
"
==
"64"
(
set
VC_PATH
=
x64
)
set
MSC_VER
=
2017
rem :: This should always be present for VC installed with VS. Not sure about VC installed with Visual C++ Build Tools 2015
rem FOR /F "usebackq tokens=3*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\Software\Microsoft\DevDiv\VC\Servicing\14.0\IDE.x64" /v UpdateVersion`) DO (
rem set SP=%%A
rem )
rem if not "%SP%" == "%PKG_VERSION%" (
rem echo "Version detected from registry: %SP%"
rem echo "does not match version of package being built (%PKG_VERSION%)"
rem echo "Do you have current updates for VS 2015 installed?"
rem exit 1
rem )
REM ========== REQUIRES Win 10 SDK be installed, or files otherwise copied to location below!
robocopy
"C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\
%VC_PATH%
"
"
%LIBRARY_BIN%
"
*
.dll
/E
robocopy
"C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\
%VC_PATH%
"
"
%PREFIX%
"
*
.dll
/E
if
%ERRORLEVEL%
GEQ
8
exit
1
REM ========== This one comes from visual studio 2017
set
"VC_VER=141"
for
/f
"usebackq tokens=*"
%%i
in
(
`"
%ProgramFiles
(x86)
%
\Microsoft Visual Studio\Installer\vswhere.exe" -legacy -products * -version [15
^,
16
^)
-property installationPath`
)
do
(
if
exist
"
%%i
"
if
exist
"
%%i
\VC\Auxiliary\Build\vcvarsall.bat"
(
set
"VS15VCVARSALL=
%%i
\VC\Auxiliary\Build\vcvarsall.bat"
goto
:eof
)
)
@setlocal
call
"
%VS1
5VARSALL
%
"
x64
set
"REDIST_ROOT=
%VCToolsRedistDir%%
VC_PATH
%
"
robocopy
"
%REDIST_ROOT%
\Microsoft.VC
%VC_VER%
.CRT"
"
%LIBRARY_BIN%
"
*
.dll
/E
if
%ERRORLEVEL%
LSS
8
exit
0
robocopy
"
%REDIST_ROOT%
\Microsoft.VC
%VC_VER%
.CRT"
"
%PREFIX%
"
*
.dll
/E
if
%ERRORLEVEL%
LSS
8
exit
0
robocopy
"
%REDIST_ROOT%
\Microsoft.VC
%VC_VER%
.OpenMP"
"
%LIBRARY_BIN%
"
*
.dll
/E
if
%ERRORLEVEL%
LSS
8
exit
0
robocopy
"
%REDIST_ROOT%
\Microsoft.VC
%VC_VER%
.OpenMP"
"
%PREFIX%
"
*
.dll
/E
if
%ERRORLEVEL%
LSS
8
exit
0
@endlocal
packaging/vs2017/meta.yaml
deleted
100644 → 0
View file @
f78f29f5
{
%
set vcver="14.1" %
}
{
%
set vcfeature="14" %
}
{
%
set vsyear="2017" %
}
{
%
set fullver="15.4.27004.2010" %
}
package
:
name
:
vs{{ vsyear }}
version
:
{{
fullver
}}
build
:
skip
:
True [not win]
script_env
:
-
VSDEVCMD_ARGS
# [win]
outputs
:
-
name
:
vs{{ vsyear }}_{{ cross_compiler_target_platform }}
script
:
install_activate.bat
track_features
:
# VS 2017 is binary-compatible with VS 2015/vc14. Tools are "v141".
strong
:
-
vc{{ vcfeature }}
about
:
summary
:
Activation and version verification of MSVC {{ vcver }} (VS {{ vsyear }}) compiler
license
:
BSD 3-clause
packaging/vs2019/conda_build_config.yaml
View file @
cc26cd81
...
@@ -5,7 +5,7 @@ c_compiler:
...
@@ -5,7 +5,7 @@ c_compiler:
cxx_compiler
:
cxx_compiler
:
-
vs2019
# [win]
-
vs2019
# [win]
python
:
python
:
-
3.
7
-
3.
8
# This differs from target_platform in that it determines what subdir the compiler
# This differs from target_platform in that it determines what subdir the compiler
# will target, not what subdir the compiler package will be itself.
# will target, not what subdir the compiler package will be itself.
# For example, we need a win-64 vs2008_win-32 package, so that we compile win-32
# For example, we need a win-64 vs2008_win-32 package, so that we compile win-32
...
...
packaging/vs2019/install_runtime.bat
deleted
100644 → 0
View file @
f78f29f5
set
VC_PATH
=
x86
if
"
%ARCH%
"
==
"64"
(
set
VC_PATH
=
x64
)
set
MSC_VER
=
2019
rem :: This should always be present for VC installed with VS. Not sure about VC installed with Visual C++ Build Tools 2015
rem FOR /F "usebackq tokens=3*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\Software\Microsoft\DevDiv\VC\Servicing\14.0\IDE.x64" /v UpdateVersion`) DO (
rem set SP=%%A
rem )
rem if not "%SP%" == "%PKG_VERSION%" (
rem echo "Version detected from registry: %SP%"
rem echo "does not match version of package being built (%PKG_VERSION%)"
rem echo "Do you have current updates for VS 2015 installed?"
rem exit 1
rem )
REM ========== REQUIRES Win 10 SDK be installed, or files otherwise copied to location below!
robocopy
"C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\
%VC_PATH%
"
"
%LIBRARY_BIN%
"
*
.dll
/E
robocopy
"C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\
%VC_PATH%
"
"
%PREFIX%
"
*
.dll
/E
if
%ERRORLEVEL%
GEQ
8
exit
1
REM ========== This one comes from visual studio 2019
set
"VC_VER=142"
for
/f
"usebackq tokens=*"
%%i
in
(
`"
%ProgramFiles
(x86)
%
\Microsoft Visual Studio\Installer\vswhere.exe" -legacy -products * -version [16
^,
17
^)
-property installationPath`
)
do
(
if
exist
"
%%i
"
if
exist
"
%%i
\VC\Auxiliary\Build\vcvarsall.bat"
(
set
"VS15VCVARSALL=
%%i
\VC\Auxiliary\Build\vcvarsall.bat"
goto
:eof
)
)
@setlocal
call
"
%VS1
5VARSALL
%
"
x64
set
"REDIST_ROOT=
%VCToolsRedistDir%%
VC_PATH
%
"
robocopy
"
%REDIST_ROOT%
\Microsoft.VC
%VC_VER%
.CRT"
"
%LIBRARY_BIN%
"
*
.dll
/E
if
%ERRORLEVEL%
LSS
8
exit
0
robocopy
"
%REDIST_ROOT%
\Microsoft.VC
%VC_VER%
.CRT"
"
%PREFIX%
"
*
.dll
/E
if
%ERRORLEVEL%
LSS
8
exit
0
robocopy
"
%REDIST_ROOT%
\Microsoft.VC
%VC_VER%
.OpenMP"
"
%LIBRARY_BIN%
"
*
.dll
/E
if
%ERRORLEVEL%
LSS
8
exit
0
robocopy
"
%REDIST_ROOT%
\Microsoft.VC
%VC_VER%
.OpenMP"
"
%PREFIX%
"
*
.dll
/E
if
%ERRORLEVEL%
LSS
8
exit
0
@endlocal
packaging/wheel/relocate.py
View file @
cc26cd81
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
import
glob
import
glob
import
hashlib
import
hashlib
import
io
# Standard library imports
# Standard library imports
import
os
import
os
...
@@ -65,21 +64,12 @@ PLATFORM_ARCH = platform.machine()
...
@@ -65,21 +64,12 @@ PLATFORM_ARCH = platform.machine()
PYTHON_VERSION
=
sys
.
version_info
PYTHON_VERSION
=
sys
.
version_info
def
read_chunks
(
file
,
size
=
io
.
DEFAULT_BUFFER_SIZE
):
"""Yield pieces of data from a file-like object until EOF."""
while
True
:
chunk
=
file
.
read
(
size
)
if
not
chunk
:
break
yield
chunk
def
rehash
(
path
,
blocksize
=
1
<<
20
):
def
rehash
(
path
,
blocksize
=
1
<<
20
):
"""Return (hash, length) for path using hashlib.sha256()"""
"""Return (hash, length) for path using hashlib.sha256()"""
h
=
hashlib
.
sha256
()
h
=
hashlib
.
sha256
()
length
=
0
length
=
0
with
open
(
path
,
"rb"
)
as
f
:
with
open
(
path
,
"rb"
)
as
f
:
for
block
in
read_chunks
(
f
,
size
=
blocksize
):
while
block
:
=
f
.
read
(
blocksize
):
length
+=
len
(
block
)
length
+=
len
(
block
)
h
.
update
(
block
)
h
.
update
(
block
)
digest
=
"sha256="
+
urlsafe_b64encode
(
h
.
digest
()).
decode
(
"latin1"
).
rstrip
(
"="
)
digest
=
"sha256="
+
urlsafe_b64encode
(
h
.
digest
()).
decode
(
"latin1"
).
rstrip
(
"="
)
...
@@ -191,7 +181,7 @@ def relocate_elf_library(patchelf, output_dir, output_library, binary):
...
@@ -191,7 +181,7 @@ def relocate_elf_library(patchelf, output_dir, output_library, binary):
print
(
"Copying dependencies to wheel directory"
)
print
(
"Copying dependencies to wheel directory"
)
new_libraries_path
=
osp
.
join
(
output_dir
,
"torchvision.libs"
)
new_libraries_path
=
osp
.
join
(
output_dir
,
"torchvision.libs"
)
os
.
makedirs
(
new_libraries_path
)
os
.
makedirs
(
new_libraries_path
,
exist_ok
=
True
)
new_names
=
{
binary
:
binary_path
}
new_names
=
{
binary
:
binary_path
}
...
...
packaging/windows/internal/cuda_install.bat
deleted
100644 → 0
View file @
f78f29f5
@echo
on
if
"
%CU_VERSION%
"
==
"cpu"
(
echo
Skipping
for
CPU
builds
exit
/b
0
)
set
SRC_DIR
=
%~dp0
\..
if
not
exist
"
%SRC_DIR%
\temp_build"
mkdir
"
%SRC_DIR%
\temp_build"
rem in unit test workflow, we get CUDA_VERSION, for example 11.1
if
defined
CUDA_VERSION
(
set
CUDA_VER
=
%CUDA
_VERSION:.
=
%
)
else
(
set
CUDA_VER
=
%CU
_VERSION:cu
=
%
)
set
/a
CUDA_VER
=
%CU
_VERSION:cu
=
%
set
CUDA_VER_MAJOR
=
%CUDA
_VER:
~
0
,-
1
%
set
CUDA_VER_MINOR
=
%CUDA
_VER:
~-
1
,
1
%
set
CUDA_VERSION_STR
=
%CUDA_VER_MAJOR%
.
%CUDA_VER_MINOR%
set
CUDNN_FOLDER
=
"cuda"
set
CUDNN_LIB_FOLDER
=
"lib\x64"
if
%CUDA_VER%
EQU
116
goto
cuda116
if
%CUDA_VER%
EQU
117
goto
cuda117
echo
CUDA
%CUDA_VERSION_STR%
is
not
supported
exit
/b
1
:cuda
116
set
CUDA_INSTALL_EXE
=
cuda_11
.6.0_511.23_windows.exe
if
not
exist
"
%SRC_DIR%
\temp_build\
%CUDA_INSTALL_EXE%
"
(
curl
-k -L
"https://ossci-windows.s3.amazonaws.com/
%CUDA_INSTALL_EXE%
"
--output
"
%SRC_DIR%
\temp_build\
%CUDA_INSTALL_EXE%
"
if
errorlevel
1
exit
/b
1
set
"CUDA_SETUP_FILE=
%SRC_DIR%
\temp_build\
%CUDA_INSTALL_EXE%
"
set
"ARGS=thrust_11.6 nvcc_11.6 cuobjdump_11.6 nvprune_11.6 nvprof_11.6 cupti_11.6 cublas_11.6 cublas_dev_11.6 cudart_11.6 cufft_11.6 cufft_dev_11.6 curand_11.6 curand_dev_11.6 cusolver_11.6 cusolver_dev_11.6 cusparse_11.6 cusparse_dev_11.6 npp_11.6 npp_dev_11.6 nvjpeg_11.6 nvjpeg_dev_11.6 nvrtc_11.6 nvrtc_dev_11.6 nvml_dev_11.6"
)
set
CUDNN_INSTALL_ZIP
=
cudnn
-windows-x
86
_64
-
8
.3.2.44_cuda11.5
-archive
.zip
set
CUDNN_FOLDER
=
cudnn
-windows-x
86
_64
-
8
.3.2.44_cuda11.5
-archive
set
CUDNN_LIB_FOLDER
=
"lib"
if
not
exist
"
%SRC_DIR%
\temp_build\
%CUDNN_INSTALL_ZIP%
"
(
curl
-k -L
"http://s3.amazonaws.com/ossci-windows/
%CUDNN_INSTALL_ZIP%
"
--output
"
%SRC_DIR%
\temp_build\
%CUDNN_INSTALL_ZIP%
"
if
errorlevel
1
exit
/b
1
set
"CUDNN_SETUP_FILE=
%SRC_DIR%
\temp_build\
%CUDNN_INSTALL_ZIP%
"
rem Make sure windows path contains zlib dll
curl
-k -L
"http://s3.amazonaws.com/ossci-windows/zlib123dllx64.zip"
--output
"
%SRC_DIR%
\temp_build\zlib123dllx64.zip"
7
z
x
"
%SRC_DIR%
\temp_build\zlib123dllx64.zip"
-o
"
%SRC_DIR%
\temp_build\zlib"
xcopy
/Y
"
%SRC_DIR%
\temp_build\zlib\dll_x64\*.dll"
"C:\Windows\System32"
)
goto
cuda_common
:cuda
117
set
CUDA_INSTALL_EXE
=
cuda_11
.7.0_516.01_windows.exe
if
not
exist
"
%SRC_DIR%
\temp_build\
%CUDA_INSTALL_EXE%
"
(
curl
-k -L
"https://ossci-windows.s3.amazonaws.com/
%CUDA_INSTALL_EXE%
"
--output
"
%SRC_DIR%
\temp_build\
%CUDA_INSTALL_EXE%
"
if
errorlevel
1
exit
/b
1
set
"CUDA_SETUP_FILE=
%SRC_DIR%
\temp_build\
%CUDA_INSTALL_EXE%
"
set
"ARGS=thrust_11.7 nvcc_11.7 cuobjdump_11.7 nvprune_11.7 nvprof_11.7 cupti_11.7 cublas_11.7 cublas_dev_11.7 cudart_11.7 cufft_11.7 cufft_dev_11.7 curand_11.7 curand_dev_11.7 cusolver_11.7 cusolver_dev_11.7 cusparse_11.7 cusparse_dev_11.7 npp_11.7 npp_dev_11.7 nvjpeg_11.7 nvjpeg_dev_11.7 nvrtc_11.7 nvrtc_dev_11.7 nvml_dev_11.7"
)
set
CUDNN_INSTALL_ZIP
=
cudnn
-windows-x
86
_64
-
8
.3.2.44_cuda11.5
-archive
.zip
set
CUDNN_FOLDER
=
cudnn
-windows-x
86
_64
-
8
.3.2.44_cuda11.5
-archive
set
CUDNN_LIB_FOLDER
=
"lib"
if
not
exist
"
%SRC_DIR%
\temp_build\
%CUDNN_INSTALL_ZIP%
"
(
curl
-k -L
"http://s3.amazonaws.com/ossci-windows/
%CUDNN_INSTALL_ZIP%
"
--output
"
%SRC_DIR%
\temp_build\
%CUDNN_INSTALL_ZIP%
"
if
errorlevel
1
exit
/b
1
set
"CUDNN_SETUP_FILE=
%SRC_DIR%
\temp_build\
%CUDNN_INSTALL_ZIP%
"
rem Make sure windows path contains zlib dll
curl
-k -L
"http://s3.amazonaws.com/ossci-windows/zlib123dllx64.zip"
--output
"
%SRC_DIR%
\temp_build\zlib123dllx64.zip"
7
z
x
"
%SRC_DIR%
\temp_build\zlib123dllx64.zip"
-o
"
%SRC_DIR%
\temp_build\zlib"
xcopy
/Y
"
%SRC_DIR%
\temp_build\zlib\dll_x64\*.dll"
"C:\Windows\System32"
)
goto
cuda_common
:cuda
_common
if
not
exist
"
%SRC_DIR%
\temp_build\NvToolsExt.7z"
(
curl
-k -L
https
://www.dropbox.com/s/9mcolalfdj4n979/NvToolsExt.7z
?
dl
=
1
--output
"
%SRC_DIR%
\temp_build\NvToolsExt.7z"
if
errorlevel
1
exit
/b
1
)
echo
Installing
CUDA
toolkit
...
7
z
x
%CUDA_SETUP_FILE%
-o
"
%SRC_DIR%
\temp_build\cuda"
pushd
"
%SRC_DIR%
\temp_build\cuda"
sc
config
wuauserv
start
=
disabled
sc
stop
wuauserv
sc
query
wuauserv
start
/wait
setup
.exe
-s
%ARGS%
-loglevel
:6
-log
:
"
%cd%
/cuda_install_logs"
echo
%errorlevel%
popd
echo
Installing
VS
integration
...
rem It's for VS 2019
if
"
%CUDA_VER_MAJOR%
"
==
"10"
(
xcopy
/Y
"
%SRC_DIR%
\temp_build\cuda\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*"
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations"
)
if
"
%CUDA_VER_MAJOR%
"
==
"11"
(
xcopy
/Y
"
%SRC_DIR%
\temp_build\cuda\visual_studio_integration\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*"
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations"
)
echo
Installing
NvToolsExt
...
7
z
x
%SRC_DIR%
\temp_build\NvToolsExt.7z
-o
"
%SRC_DIR%
\temp_build\NvToolsExt"
mkdir
"
%ProgramFiles%
\NVIDIA Corporation\NvToolsExt\bin\x64"
mkdir
"
%ProgramFiles%
\NVIDIA Corporation\NvToolsExt\include"
mkdir
"
%ProgramFiles%
\NVIDIA Corporation\NvToolsExt\lib\x64"
xcopy
/Y
"
%SRC_DIR%
\temp_build\NvToolsExt\bin\x64\*.*"
"
%ProgramFiles%
\NVIDIA Corporation\NvToolsExt\bin\x64"
xcopy
/Y
"
%SRC_DIR%
\temp_build\NvToolsExt\include\*.*"
"
%ProgramFiles%
\NVIDIA Corporation\NvToolsExt\include"
xcopy
/Y
"
%SRC_DIR%
\temp_build\NvToolsExt\lib\x64\*.*"
"
%ProgramFiles%
\NVIDIA Corporation\NvToolsExt\lib\x64"
echo
Setting
up
environment
...
set
"PATH=
%ProgramFiles%
\NVIDIA GPU Computing Toolkit\CUDA\v
%CUDA_VERSION_STR%
\bin;
%ProgramFiles%
\NVIDIA GPU Computing Toolkit\CUDA\v
%CUDA_VERSION_STR%
\libnvvp;
%PATH%
"
set
"CUDA_PATH=
%ProgramFiles%
\NVIDIA GPU Computing Toolkit\CUDA\v
%CUDA_VERSION_STR%
"
set
"CUDA_PATH_V
%CUDA_VER_MAJOR%
_
%CUDA_VER_MINOR%
=
%ProgramFiles%
\NVIDIA GPU Computing Toolkit\CUDA\v
%CUDA_VERSION_STR%
"
set
"NVTOOLSEXT_PATH=
%ProgramFiles%
\NVIDIA Corporation\NvToolsExt\bin\x64"
if
not
exist
"
%ProgramFiles%
\NVIDIA GPU Computing Toolkit\CUDA\v
%CUDA_VERSION_STR%
\bin\nvcc.exe"
(
echo
CUDA
%CUDA_VERSION_STR%
installed
failed
.
echo
---------
RunDll32
.exe
.log
type
"
%SRC_DIR%
\temp_build\cuda\cuda_install_logs\LOG.RunDll32.exe.log"
echo
---------
setup
.exe
.log
-------
type
"
%SRC_DIR%
\temp_build\cuda\cuda_install_logs\LOG.setup.exe.log"
exit
/b
1
)
echo
Installing
cuDNN
...
7
z
x
%CUDNN_SETUP_FILE%
-o
"
%SRC_DIR%
\temp_build\cudnn"
xcopy
/Y
"
%SRC_DIR%
\temp_build\cudnn\
%CUDNN_FOLDER%
\bin\*.*"
"
%ProgramFiles%
\NVIDIA GPU Computing Toolkit\CUDA\v
%CUDA_VERSION_STR%
\bin"
xcopy
/Y
"
%SRC_DIR%
\temp_build\cudnn\
%CUDNN_FOLDER%
\
%CUDNN_LIB_FOLDER%
\*.*"
"
%ProgramFiles%
\NVIDIA GPU Computing Toolkit\CUDA\v
%CUDA_VERSION_STR%
\lib\x64"
xcopy
/Y
"
%SRC_DIR%
\temp_build\cudnn\
%CUDNN_FOLDER%
\include\*.*"
"
%ProgramFiles%
\NVIDIA GPU Computing Toolkit\CUDA\v
%CUDA_VERSION_STR%
\include"
echo
Cleaning
temp
files
rd
/s /q
"
%SRC_DIR%
\temp_build"
||
ver
>
nul
packaging/windows/internal/driver_update.bat
deleted
100644 → 0
View file @
f78f29f5
set
"DRIVER_DOWNLOAD_LINK=https://ossci-windows.s3.amazonaws.com/461.09-data-center-tesla-desktop-winserver-2019-2016-international.exe"
curl
--retry
3
-kL
%DRIVER_DOWNLOAD_LINK%
--output
461
.09
-data-center-tesla-desktop-winserver
-
2019
-
2016
-international
.exe
if
errorlevel
1
exit
/b
1
start
/wait
461
.09
-data-center-tesla-desktop-winserver
-
2019
-
2016
-international
.exe
-s -noreboot
if
errorlevel
1
exit
/b
1
del
461
.09
-data-center-tesla-desktop-winserver
-
2019
-
2016
-international
.exe
||
ver
>
NUL
setlocal
EnableDelayedExpansion
set
NVIDIA_GPU_EXISTS
=
0
for
/F
"delims="
%%i
in
(
'wmic path win32_VideoController get name'
)
do
(
set
GPUS
=
%%i
if
not
"x
!
GPUS:NVIDIA=
!
"
==
"x
!GPUS!
"
(
SET
NVIDIA_GPU_EXISTS
=
1
goto
gpu_check_end
)
)
:gpu
_check_end
endlocal
&
set
NVIDIA_GPU_EXISTS
=
%NVIDIA_GPU_EXISTS%
if
"
%NVIDIA_GPU_EXISTS%
"
==
"0"
(
echo
"CUDA Driver installation Failed"
exit
/b
1
)
packaging/windows/internal/vc_env_helper.bat
View file @
cc26cd81
@echo
on
@echo
on
set
VC_VERSION_LOWER
=
16
set
VC_VERSION_LOWER
=
17
set
VC_VERSION_UPPER
=
17
set
VC_VERSION_UPPER
=
18
if
"
%VC_YEAR%
"
==
"2019"
(
set
VC_VERSION_LOWER
=
16
set
VC_VERSION_UPPER
=
17
)
if
"
%VC_YEAR%
"
==
"2017"
(
if
"
%VC_YEAR%
"
==
"2017"
(
set
VC_VERSION_LOWER
=
15
set
VC_VERSION_LOWER
=
15
set
VC_VERSION_UPPER
=
16
set
VC_VERSION_UPPER
=
16
...
...
packaging/windows/internal/vc_install_helper.sh
deleted
100644 → 0
View file @
f78f29f5
#!/bin/bash
set
-ex
if
[[
"
$CU_VERSION
"
==
"cu92"
]]
;
then
export
VC_YEAR
=
2017
export
VSDEVCMD_ARGS
=
"-vcvars_ver=14.13"
powershell packaging/windows/internal/vs2017_install.ps1
elif
[[
"
$CU_VERSION
"
==
"cu100"
]]
;
then
export
VC_YEAR
=
2017
export
VSDEVCMD_ARGS
=
""
powershell packaging/windows/internal/vs2017_install.ps1
else
export
VC_YEAR
=
2019
export
VSDEVCMD_ARGS
=
""
fi
packaging/windows/internal/vs2017_install.ps1
deleted
100644 → 0
View file @
f78f29f5
$VS_DOWNLOAD_LINK
=
"https://aka.ms/vs/15/release/vs_buildtools.exe"
$VS_INSTALL_ARGS
=
@(
"--nocache"
,
"--quiet"
,
"--wait"
,
"--add Microsoft.VisualStudio.Workload.VCTools"
,
"--add Microsoft.VisualStudio.Component.VC.Tools.14.13"
,
"--add Microsoft.Component.MSBuild"
,
"--add Microsoft.VisualStudio.Component.Roslyn.Compiler"
,
"--add Microsoft.VisualStudio.Component.TextTemplating"
,
"--add Microsoft.VisualStudio.Component.VC.CoreIde"
,
"--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest"
,
"--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core"
,
"--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
,
"--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81"
)
curl.exe
--retry
3
-kL
$VS_DOWNLOAD_LINK
--output
vs_installer.exe
if
(
$LASTEXITCODE
-ne
0
)
{
echo
"Download of the VS 2017 installer failed"
exit
1
}
$process
=
Start-Process
"
${PWD}
\vs_installer.exe"
-ArgumentList
$VS_INSTALL_ARGS
-NoNewWindow
-Wait
-PassThru
Remove-Item
-Path
vs_installer.exe
-Force
$exitCode
=
$process
.
ExitCode
if
((
$exitCode
-ne
0
)
-and
(
$exitCode
-ne
3010
))
{
echo
"VS 2017 installer exited with code
$exitCode
, which should be one of [0, 3010]."
exit
1
}
packaging/windows/internal/vs2019_install.ps1
deleted
100644 → 0
View file @
f78f29f5
$VS_DOWNLOAD_LINK
=
"https://aka.ms/vs/16/release/vs_buildtools.exe"
$VS_INSTALL_ARGS
=
@(
"--nocache"
,
"--quiet"
,
"--wait"
,
"--add Microsoft.VisualStudio.Workload.VCTools"
,
"--add Microsoft.Component.MSBuild"
,
"--add Microsoft.VisualStudio.Component.Roslyn.Compiler"
,
"--add Microsoft.VisualStudio.Component.VC.CoreBuildTools"
,
"--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest"
,
"--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
)
curl.exe
--retry
3
-kL
$VS_DOWNLOAD_LINK
--output
vs_installer.exe
if
(
$LASTEXITCODE
-ne
0
)
{
echo
"Download of the VS 2019 installer failed"
exit
1
}
$process
=
Start-Process
"
${PWD}
\vs_installer.exe"
-ArgumentList
$VS_INSTALL_ARGS
-NoNewWindow
-Wait
-PassThru
Remove-Item
-Path
vs_installer.exe
-Force
$exitCode
=
$process
.
ExitCode
if
((
$exitCode
-ne
0
)
-and
(
$exitCode
-ne
3010
))
{
echo
"VS 2019 installer exited with code
$exitCode
, which should be one of [0, 3010]."
exit
1
}
pyproject.toml
View file @
cc26cd81
...
@@ -5,7 +5,7 @@ first_party_detection = false
...
@@ -5,7 +5,7 @@ first_party_detection = false
[tool.black]
[tool.black]
line-length
=
120
line-length
=
120
target-version
=
["py3
7
"]
target-version
=
["py3
8
"]
[tool.ufmt]
[tool.ufmt]
...
...
pytest.ini
View file @
cc26cd81
[pytest]
[pytest]
addopts
=
addopts
=
# show
summary of all tests that did not pass
# show
tests that (f)ailed, (E)rror, or (X)passed in the summary
-r
a
-r
fEX
# Make tracebacks shorter
# Make tracebacks shorter
--tb
=
native
--tb
=
short
# enable all warnings
# enable all warnings
-Wd
-Wd
--ignore
=
test/test_datasets_download.py
--ignore
=
test/test_datasets_download.py
...
...
Prev
1
…
3
4
5
6
7
8
9
10
11
…
19
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment