!26937 fix pytest mark decorator for platform_x86_cpu

Merge pull request !26937 from liangyongxiong/tests
This commit is contained in:
i-robot 2021-12-02 06:44:27 +00:00 committed by Gitee
commit 9a5814b6a4
6 changed files with 5 additions and 12 deletions

View File

@ -72,7 +72,6 @@ def test_switch_layer():
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.platform_x86_gpu_training
@pytest.mark.platform_x86_cpu_training
@pytest.mark.env_onecard
def test_cell_in_list():
"""

View File

@ -46,9 +46,3 @@ def test_train_with_Ascend():
@pytest.mark.env_onecard
def test_train_with_GPU():
test_train("GPU")
@pytest.mark.level0
@pytest.mark.platform_x86_cpu_training
@pytest.mark.env_onecard
def test_train_with_CPU():
test_train("CPU")

View File

@ -63,7 +63,7 @@ class GradSec(nn.Cell):
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.platform_x86_gpu_training
@pytest.mark.platform_x86_cpu_training
@pytest.mark.platform_x86_cpu
@pytest.mark.env_onecard
def test_sit_high_order_grad_params():
context.set_context(mode=context.GRAPH_MODE)

View File

@ -93,7 +93,7 @@ class WithLossCellLocal(nn.Cell):
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.platform_x86_gpu_training
@pytest.mark.platform_x86_cpu_training
@pytest.mark.platform_x86_cpu
@pytest.mark.env_onecard
def test_high_grad_train():
x_pure = np.random.randint(-10, 100, 32)

View File

@ -22,7 +22,7 @@ def test_train(device_type):
test_lenet()
@pytest.mark.level0
@pytest.mark.platform_x86_cpu_training
@pytest.mark.platform_x86_cpu
@pytest.mark.env_onecard
def test_train_with_CPU():
test_train("CPU")

View File

@ -120,14 +120,14 @@ def test_tensor_copy_slices_gpu_pynative():
test_tensor_copy_slices()
@pytest.mark.level0
@pytest.mark.platform_x86_cpu_training
@pytest.mark.platform_x86_cpu
@pytest.mark.env_onecard
def test_tensor_copy_slices_cpu_graph():
context.set_context(mode=context.GRAPH_MODE, device_target="CPU")
test_tensor_copy_slices()
@pytest.mark.level0
@pytest.mark.platform_x86_cpu_training
@pytest.mark.platform_x86_cpu
@pytest.mark.env_onecard
def test_tensor_copy_slices_cpu_pynative():
context.set_context(mode=context.PYNATIVE_MODE, device_target="CPU")