forked from mindspore-Ecosystem/mindspore
!29813 PyNative 8P performance
Merge pull request !29813 from caifubi/master-pynative-perfmance-testcase
This commit is contained in:
commit
07823a918f
|
@ -444,7 +444,7 @@ def test_pynative_resnet50():
|
|||
def test_pynative_resnet50_with_env(queue, device_id, device_num):
|
||||
os.system("mkdir " + str(device_id))
|
||||
os.chdir(str(device_id))
|
||||
context.set_context(mode=context.PYNATIVE_MODE, device_target="Ascend", device_id=device_id)
|
||||
context.set_context(mode=context.PYNATIVE_MODE, device_target="Ascend", device_id=device_id, runtime_num_threads=20)
|
||||
os.environ['MINDSPORE_HCCL_CONFIG_PATH'] = MINDSPORE_HCCL_CONFIG_PATH
|
||||
os.environ['RANK_ID'] = str(device_id)
|
||||
os.environ['RANK_SIZE'] = str(device_num)
|
||||
|
|
|
@ -379,7 +379,7 @@ class GradWrap(Cell):
|
|||
|
||||
|
||||
def test_pynative_resnet50():
|
||||
context.set_context(mode=context.PYNATIVE_MODE, device_target="GPU")
|
||||
context.set_context(mode=context.PYNATIVE_MODE, device_target="GPU", runtime_num_threads=20)
|
||||
context.reset_auto_parallel_context()
|
||||
context.set_auto_parallel_context(parallel_mode=ParallelMode.DATA_PARALLEL, gradients_mean=False, device_num=8)
|
||||
init()
|
||||
|
|
Loading…
Reference in New Issue