mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Re-enable Windows debug libtorch
Get rid of `BUILD_FOR_SYSTEM` environment variable Pass `libtorch_config` environment variable for Windows builds Fixes https://github.com/pytorch/pytorch/issues/73068 Pull Request resolved: https://github.com/pytorch/pytorch/pull/73805 Approved by: https://github.com/seemethere
This commit is contained in:
parent
5167e9d59d
commit
bebfdca093
1
.circleci/config.yml
generated
1
.circleci/config.yml
generated
|
|
@ -436,7 +436,6 @@ binary_windows_params: &binary_windows_params
|
|||
default: "windows-xlarge-cpu-with-nvidia-cuda"
|
||||
environment:
|
||||
BUILD_ENVIRONMENT: << parameters.build_environment >>
|
||||
BUILD_FOR_SYSTEM: windows
|
||||
JOB_EXECUTOR: <<parameters.executor>>
|
||||
|
||||
promote_common: &promote_common
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ if [[ -z ${IS_GHA:-} ]]; then
|
|||
export PACKAGE_TYPE="${configs[0]}"
|
||||
export DESIRED_PYTHON="${configs[1]}"
|
||||
export DESIRED_CUDA="${configs[2]}"
|
||||
if [[ "${BUILD_FOR_SYSTEM:-}" == "windows" ]]; then
|
||||
if [[ "${OSTYPE}" == "msys" ]]; then
|
||||
export DESIRED_DEVTOOLSET=""
|
||||
export LIBTORCH_CONFIG="${configs[3]:-}"
|
||||
if [[ "$LIBTORCH_CONFIG" == 'debug' ]]; then
|
||||
|
|
@ -153,10 +153,14 @@ export DESIRED_PYTHON="${DESIRED_PYTHON:-}"
|
|||
export DESIRED_CUDA="$DESIRED_CUDA"
|
||||
export LIBTORCH_VARIANT="${LIBTORCH_VARIANT:-}"
|
||||
export BUILD_PYTHONLESS="${BUILD_PYTHONLESS:-}"
|
||||
export DESIRED_DEVTOOLSET="${DESIRED_DEVTOOLSET:-}"
|
||||
if [[ "${BUILD_FOR_SYSTEM:-}" == "windows" ]]; then
|
||||
if [[ "${OSTYPE}" == "msys" ]]; then
|
||||
export LIBTORCH_CONFIG="${LIBTORCH_CONFIG:-}"
|
||||
export DEBUG="${DEBUG:-}"
|
||||
if [[ "${LIBTORCH_CONFIG:-}" == 'debug' ]]; then
|
||||
export DEBUG=1
|
||||
fi
|
||||
export DESIRED_DEVTOOLSET=""
|
||||
else
|
||||
export DESIRED_DEVTOOLSET="${DESIRED_DEVTOOLSET:-}"
|
||||
fi
|
||||
|
||||
export DATE="$DATE"
|
||||
|
|
|
|||
|
|
@ -62,5 +62,4 @@ binary_windows_params: &binary_windows_params
|
|||
default: "windows-xlarge-cpu-with-nvidia-cuda"
|
||||
environment:
|
||||
BUILD_ENVIRONMENT: << parameters.build_environment >>
|
||||
BUILD_FOR_SYSTEM: windows
|
||||
JOB_EXECUTOR: <<parameters.executor>>
|
||||
|
|
|
|||
12
.github/generated-ciflow-ruleset.json
generated
vendored
12
.github/generated-ciflow-ruleset.json
generated
vendored
|
|
@ -64,8 +64,8 @@
|
|||
"macos-binary-libtorch-cxx11-abi",
|
||||
"macos-binary-libtorch-pre-cxx11",
|
||||
"macos-binary-wheel",
|
||||
"windows-binary-libtorch-cxx11-abi",
|
||||
"windows-binary-libtorch-pre-cxx11",
|
||||
"windows-binary-libtorch-debug",
|
||||
"windows-binary-libtorch-release",
|
||||
"windows-binary-wheel"
|
||||
],
|
||||
"ciflow/binaries_conda": [
|
||||
|
|
@ -78,8 +78,8 @@
|
|||
"linux-binary-libtorch-pre-cxx11",
|
||||
"macos-binary-libtorch-cxx11-abi",
|
||||
"macos-binary-libtorch-pre-cxx11",
|
||||
"windows-binary-libtorch-cxx11-abi",
|
||||
"windows-binary-libtorch-pre-cxx11"
|
||||
"windows-binary-libtorch-debug",
|
||||
"windows-binary-libtorch-release"
|
||||
],
|
||||
"ciflow/binaries_wheel": [
|
||||
"linux-binary-manywheel",
|
||||
|
|
@ -149,8 +149,8 @@
|
|||
"pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single-full-jit",
|
||||
"win-vs2019-cpu-py3",
|
||||
"win-vs2019-cuda11.3-py3",
|
||||
"windows-binary-libtorch-cxx11-abi",
|
||||
"windows-binary-libtorch-pre-cxx11",
|
||||
"windows-binary-libtorch-debug",
|
||||
"windows-binary-libtorch-release",
|
||||
"windows-binary-wheel"
|
||||
],
|
||||
"ciflow/docs": [
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ CONDA_CONTAINER_IMAGES = {
|
|||
|
||||
PRE_CXX11_ABI = "pre-cxx11"
|
||||
CXX11_ABI = "cxx11-abi"
|
||||
RELEASE = "release"
|
||||
DEBUG = "debug"
|
||||
|
||||
LIBTORCH_CONTAINER_IMAGES: Dict[Tuple[str, str], str] = {
|
||||
**{
|
||||
|
|
@ -140,10 +142,11 @@ def generate_libtorch_matrix(os: str, abi_version: str) -> List[Dict[str, str]]:
|
|||
gpu_arch_type, gpu_arch_version
|
||||
),
|
||||
"libtorch_variant": libtorch_variant,
|
||||
"devtoolset": abi_version,
|
||||
"libtorch_config": abi_version if os == "windows" else "",
|
||||
"devtoolset": abi_version if os != "windows" else "",
|
||||
"container_image": LIBTORCH_CONTAINER_IMAGES[
|
||||
(arch_version, abi_version)
|
||||
],
|
||||
] if os != "windows" else "",
|
||||
"package_type": "libtorch",
|
||||
"build_name": f"libtorch-{gpu_arch_type}{gpu_arch_version}-{libtorch_variant}-{abi_version}".replace(
|
||||
".", "_"
|
||||
|
|
|
|||
8
.github/scripts/generate_ci_workflows.py
vendored
8
.github/scripts/generate_ci_workflows.py
vendored
|
|
@ -985,9 +985,9 @@ WINDOWS_BINARY_BUILD_WORKFLOWS = [
|
|||
BinaryBuildWorkflow(
|
||||
os=OperatingSystem.WINDOWS,
|
||||
package_type="libtorch",
|
||||
abi_version=generate_binary_build_matrix.CXX11_ABI,
|
||||
abi_version=generate_binary_build_matrix.RELEASE,
|
||||
build_configs=generate_binary_build_matrix.generate_libtorch_matrix(
|
||||
OperatingSystem.WINDOWS, generate_binary_build_matrix.CXX11_ABI
|
||||
OperatingSystem.WINDOWS, generate_binary_build_matrix.RELEASE
|
||||
),
|
||||
ciflow_config=CIFlowConfig(
|
||||
labels={LABEL_CIFLOW_DEFAULT, LABEL_CIFLOW_BINARIES, LABEL_CIFLOW_BINARIES_LIBTORCH},
|
||||
|
|
@ -997,9 +997,9 @@ WINDOWS_BINARY_BUILD_WORKFLOWS = [
|
|||
BinaryBuildWorkflow(
|
||||
os=OperatingSystem.WINDOWS,
|
||||
package_type="libtorch",
|
||||
abi_version=generate_binary_build_matrix.PRE_CXX11_ABI,
|
||||
abi_version=generate_binary_build_matrix.DEBUG,
|
||||
build_configs=generate_binary_build_matrix.generate_libtorch_matrix(
|
||||
OperatingSystem.WINDOWS, generate_binary_build_matrix.PRE_CXX11_ABI
|
||||
OperatingSystem.WINDOWS, generate_binary_build_matrix.DEBUG
|
||||
),
|
||||
ciflow_config=CIFlowConfig(
|
||||
labels={LABEL_CIFLOW_DEFAULT, LABEL_CIFLOW_BINARIES, LABEL_CIFLOW_BINARIES_LIBTORCH},
|
||||
|
|
|
|||
5
.github/templates/upload.yml.j2
vendored
5
.github/templates/upload.yml.j2
vendored
|
|
@ -19,8 +19,13 @@
|
|||
{%- endif %}
|
||||
SKIP_ALL_TESTS: 1
|
||||
{%- if config["package_type"] == "libtorch" %}
|
||||
{%- if config["libtorch_config"] %}
|
||||
LIBTORCH_CONFIG: !{{ config["libtorch_config"] }}
|
||||
{%- endif %}
|
||||
LIBTORCH_VARIANT: !{{ config["libtorch_variant"] }}
|
||||
{%- if config["devtoolset"] %}
|
||||
DESIRED_DEVTOOLSET: !{{ config["devtoolset"] }}
|
||||
{%- endif %}
|
||||
{%- if is_windows %}
|
||||
# This is a dummy value for libtorch to work correctly with our batch scripts
|
||||
# without this value pip does not get installed for some reason
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user