Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
221cb0332
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
221cb0332
Commits
4dbfd9f8
Commit
4dbfd9f8
authored
Nov 10, 2021
by
huangxinjing
Browse files
Options
Downloads
Patches
Plain Diff
Fix context from 31 to 30
parent
d0ce857c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
official/nlp/pangu_alpha/train.py
+2
-2
2 additions, 2 deletions
official/nlp/pangu_alpha/train.py
with
2 additions
and
2 deletions
official/nlp/pangu_alpha/train.py
+
2
−
2
View file @
4dbfd9f8
...
@@ -111,7 +111,7 @@ def run_train(args_opt):
...
@@ -111,7 +111,7 @@ def run_train(args_opt):
os
.
environ
[
'
HCCL_CONNECT_TIMEOUT
'
]
=
"
6000
"
os
.
environ
[
'
HCCL_CONNECT_TIMEOUT
'
]
=
"
6000
"
# Set execution mode
# Set execution mode
context
.
set_context
(
mode
=
context
.
GRAPH_MODE
,
device_target
=
args_opt
.
device_target
)
context
.
set_context
(
mode
=
context
.
GRAPH_MODE
,
device_target
=
args_opt
.
device_target
)
context
.
set_context
(
variable_memory_max_size
=
"
3
1
GB
"
)
context
.
set_context
(
variable_memory_max_size
=
"
3
0
GB
"
)
# Set parallel context
# Set parallel context
rank
=
0
rank
=
0
device_num
=
1
device_num
=
1
...
@@ -242,7 +242,7 @@ def run_train_pipeline(args_opt):
...
@@ -242,7 +242,7 @@ def run_train_pipeline(args_opt):
os
.
environ
[
'
HCCL_CONNECT_TIMEOUT
'
]
=
"
6000
"
os
.
environ
[
'
HCCL_CONNECT_TIMEOUT
'
]
=
"
6000
"
context
.
set_context
(
save_graphs
=
False
,
mode
=
context
.
GRAPH_MODE
,
device_target
=
args_opt
.
device_target
)
context
.
set_context
(
save_graphs
=
False
,
mode
=
context
.
GRAPH_MODE
,
device_target
=
args_opt
.
device_target
)
context
.
set_context
(
variable_memory_max_size
=
"
3
1
GB
"
)
context
.
set_context
(
variable_memory_max_size
=
"
3
0
GB
"
)
if
args_opt
.
distribute
==
"
true
"
:
if
args_opt
.
distribute
==
"
true
"
:
D
.
init
()
D
.
init
()
device_num
=
D
.
get_group_size
()
device_num
=
D
.
get_group_size
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment