update network testcase
This commit is contained in:
parent
21ce969674
commit
a29ddb9443
|
@ -18,7 +18,7 @@ import pytest
|
|||
from tests.st.model_zoo_tests import utils
|
||||
|
||||
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
|
|
@ -18,7 +18,7 @@ import pytest
|
|||
from tests.st.model_zoo_tests import utils
|
||||
|
||||
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.env_single
|
||||
|
|
|
@ -18,7 +18,7 @@ import pytest
|
|||
from tests.st.model_zoo_tests import utils
|
||||
|
||||
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
|
|
@ -50,7 +50,7 @@ def test_resnet50_cifar10_ascend():
|
|||
assert sum(loss_list) / len(loss_list) < 0.70
|
||||
|
||||
|
||||
@pytest.mark.level0
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.env_single
|
||||
|
|
|
@ -145,7 +145,7 @@ class TimeMonitor(Callback):
|
|||
self.per_step_mseconds_list.append(epoch_mseconds / self.data_size)
|
||||
|
||||
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
@ -217,7 +217,7 @@ def test_transformer():
|
|||
assert per_step_mseconds <= expect_per_step_mseconds + 10
|
||||
|
||||
|
||||
@pytest.mark.level0
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
|
|
@ -84,7 +84,8 @@ class TimeMonitor(Callback):
|
|||
|
||||
DATA_DIR = "/home/workspace/mindspore_dataset/coco/coco2017/mindrecord_train/yolov3"
|
||||
|
||||
@pytest.mark.level1
|
||||
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_single
|
||||
|
|
|
@ -245,7 +245,7 @@ def test_bert_precision(enable_graph_kernel=False):
|
|||
assert np.allclose(loss_scale, expect_loss_scale, 0, 0)
|
||||
|
||||
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
@ -253,6 +253,10 @@ def test_bert_precision_graph_kernel_off():
|
|||
test_bert_precision(enable_graph_kernel=False)
|
||||
|
||||
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
def test_bert_precision_graph_kernel_on():
|
||||
test_bert_precision(enable_graph_kernel=True)
|
||||
|
||||
|
|
|
@ -69,7 +69,8 @@ def model_fine_tune(train_net, fix_weight_layer):
|
|||
if fix_weight_layer in para.name:
|
||||
para.requires_grad = False
|
||||
|
||||
@pytest.mark.level0
|
||||
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
|
|
@ -23,7 +23,7 @@ def test_train(device_type):
|
|||
test_lenet()
|
||||
|
||||
@security_off_wrap
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
def test_train_with_Ascend():
|
||||
|
|
|
@ -68,7 +68,7 @@ class AlexNet(nn.Cell):
|
|||
return x
|
||||
|
||||
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_gpu_training
|
||||
@pytest.mark.env_onecard
|
||||
def test_trainTensor(num_classes=10, epoch=15, batch_size=32):
|
||||
|
@ -89,7 +89,7 @@ def test_trainTensor(num_classes=10, epoch=15, batch_size=32):
|
|||
assert losses[-1] < 0.01
|
||||
|
||||
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_gpu_training
|
||||
@pytest.mark.env_onecard
|
||||
def test_train_tensor_memory_opt(num_classes=10, epoch=15, batch_size=32):
|
||||
|
|
|
@ -216,7 +216,7 @@ def create_dataset(data_path, batch_size=32, repeat_size=1,
|
|||
return mnist_ds
|
||||
|
||||
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_gpu_training
|
||||
@pytest.mark.env_onecard
|
||||
def test_train_and_eval_lenet():
|
||||
|
|
|
@ -31,14 +31,14 @@ def test_train_and_eval():
|
|||
test_train_and_eval_lenet()
|
||||
|
||||
@security_off_wrap
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_gpu_training
|
||||
@pytest.mark.env_onecard
|
||||
def test_train_with_GPU():
|
||||
test_train("GPU")
|
||||
|
||||
@security_off_wrap
|
||||
@pytest.mark.level0
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_gpu_training
|
||||
@pytest.mark.env_onecard
|
||||
def test_train_and_eval_with_GPU():
|
||||
|
|
|
@ -328,7 +328,7 @@ def resnet50(num_classes):
|
|||
return ResNet(ResidualBlock, [3, 4, 6, 3], num_classes)
|
||||
|
||||
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_gpu_training
|
||||
@pytest.mark.env_onecard
|
||||
def test_trainTensor(num_classes=10, epoch=8, batch_size=1):
|
||||
|
@ -352,7 +352,7 @@ def test_trainTensor(num_classes=10, epoch=8, batch_size=1):
|
|||
assert (losses[-1].asnumpy() < 1)
|
||||
|
||||
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_gpu_training
|
||||
@pytest.mark.env_onecard
|
||||
def test_train_tensor_memory_opt(num_classes=10, epoch=8, batch_size=1):
|
||||
|
@ -406,7 +406,7 @@ def test_trainTensor_big_batchSize(num_classes=10, epoch=8, batch_size=338):
|
|||
assert (losses[-1].asnumpy() < 1)
|
||||
|
||||
|
||||
@pytest.mark.level0
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_x86_gpu_training
|
||||
@pytest.mark.env_onecard
|
||||
def test_trainTensor_amp(num_classes=10, epoch=18, batch_size=16):
|
||||
|
|
|
@ -205,7 +205,7 @@ def create_dataset(data_path, batch_size=32, repeat_size=1,
|
|||
return mnist_ds
|
||||
|
||||
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.level2
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
|
Loading…
Reference in New Issue