Skip to content

[TorchAcc] Add USE_TORCH_XLA=0 flag for native swift scripts #1221

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

Merged
merged 2 commits into from
Jun 25, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# 80GB GPU memory
# Note: TorchAcc is currently only available internally.

# MASTER_ADDR=127.0.0.1 \

export USE_TORCH_XLA=0

NPROC_PER_NODE=2 \
CUDA_VISIBLE_DEVICES=0,1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# 80GB GPU memory
# Note: TorchAcc is currently only available internally.

# MASTER_ADDR=127.0.0.1 \
# MASTER_PORT=12356 \
export USE_TORCH_XLA=0

NPROC_PER_NODE=2 \
CUDA_VISIBLE_DEVICES=0,1 \
swift sft \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 80GB GPU memory
# Note: TorchAcc is currently only available internally.

# MASTER_ADDR=127.0.0.1 \
export USE_TORCH_XLA=0

NPROC_PER_NODE=2 \
CUDA_VISIBLE_DEVICES=0,1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# 80GB GPU memory
# Note: TorchAcc is currently only available internally.
export USE_TORCHACC=1
export TORCHACC_TRIM_GRAPH=1
export XLA_IR_SHAPE_CACHE_SIZE=100000000
export XLA_ALLOCATOR_FRACTION=0.95
export XLA_EXPERIMENTAL=nonzero:masked_select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 80GB GPU memory
# Note: TorchAcc is currently only available internally.

# MASTER_ADDR=127.0.0.1 \
export USE_TORCH_XLA=0

NPROC_PER_NODE=2 \
CUDA_VISIBLE_DEVICES=0,1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 80GB GPU memory
# Note: TorchAcc is currently only available internally.

# MASTER_ADDR=127.0.0.1 \
export USE_TORCH_XLA=0

NPROC_PER_NODE=2 \
CUDA_VISIBLE_DEVICES=0,1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 80GB GPU memory
# Note: TorchAcc is currently only available internally.

# MASTER_ADDR=127.0.0.1 \
export USE_TORCH_XLA=0

NPROC_PER_NODE=2 \
CUDA_VISIBLE_DEVICES=0,1,2,3 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# 80GB GPU memory
# Note: TorchAcc is currently only available internally.

# MASTER_ADDR=127.0.0.1 \
export USE_TORCH_XLA=0

NPROC_PER_NODE=1 \
CUDA_VISIBLE_DEVICES=7 \
NPROC_PER_NODE=2 \
CUDA_VISIBLE_DEVICES=0,1,2,3 \
swift sft \
--model_id_or_path qwen/Qwen-72B-Chat \
--dataset codefuse-python-en \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 80GB GPU memory
# Note: TorchAcc is currently only available internally.

# MASTER_ADDR=127.0.0.1 \
export USE_TORCH_XLA=0

NPROC_PER_NODE=2 \
CUDA_VISIBLE_DEVICES=0,1,2,3 \
Expand Down
Loading