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
chenpangpang
transformers
Commits
a982c022
Unverified
Commit
a982c022
authored
Jul 18, 2023
by
Zach Mueller
Committed by
GitHub
Jul 18, 2023
Browse files
Disable ipex env var if false (#24885)
Disable ipex if in use
parent
07360b6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/transformers/training_args.py
src/transformers/training_args.py
+2
-0
No files found.
src/transformers/training_args.py
View file @
a982c022
...
@@ -1718,6 +1718,8 @@ class TrainingArguments:
...
@@ -1718,6 +1718,8 @@ class TrainingArguments:
)
)
AcceleratorState
.
_reset_state
(
reset_partial_state
=
True
)
AcceleratorState
.
_reset_state
(
reset_partial_state
=
True
)
self
.
distributed_state
=
None
self
.
distributed_state
=
None
if
not
self
.
use_ipex
and
"ACCELERATE_USE_IPEX"
not
in
os
.
environ
:
os
.
environ
[
"ACCELERATE_USE_IPEX"
]
=
"false"
if
self
.
use_cpu
:
if
self
.
use_cpu
:
self
.
distributed_state
=
PartialState
(
cpu
=
True
,
backend
=
self
.
ddp_backend
)
self
.
distributed_state
=
PartialState
(
cpu
=
True
,
backend
=
self
.
ddp_backend
)
self
.
_n_gpu
=
0
self
.
_n_gpu
=
0
...
...
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