Browse Source

close graph kernel ci ascend testcases

pull/12158/head
looop5 5 years ago
parent
commit
03bd3b02dc
16 changed files with 7 additions and 92 deletions
  1. +7
    -12
      tests/st/networks/models/bert/bert_precision/test_bert_tdt_lossscale.py
  2. +0
    -5
      tests/st/ops/graph_kernel/test_clip_by_norm_no_div_sum.py
  3. +0
    -4
      tests/st/ops/graph_kernel/test_cse.py
  4. +0
    -4
      tests/st/ops/graph_kernel/test_fuse.py
  5. +0
    -8
      tests/st/ops/graph_kernel/test_fused_adam.py
  6. +0
    -8
      tests/st/ops/graph_kernel/test_gelu.py
  7. +0
    -5
      tests/st/ops/graph_kernel/test_lamb.py
  8. +0
    -8
      tests/st/ops/graph_kernel/test_layernorm.py
  9. +0
    -8
      tests/st/ops/graph_kernel/test_logsoftmax.py
  10. +0
    -4
      tests/st/ops/graph_kernel/test_maximum_grad.py
  11. +0
    -4
      tests/st/ops/graph_kernel/test_minimum_grad.py
  12. +0
    -4
      tests/st/ops/graph_kernel/test_reduce_mean.py
  13. +0
    -4
      tests/st/ops/graph_kernel/test_simplify.py
  14. +0
    -5
      tests/st/ops/graph_kernel/test_sqrt_grad.py
  15. +0
    -4
      tests/st/ops/graph_kernel/test_tanh_grad.py
  16. +0
    -5
      tests/st/ops/graph_kernel/test_tile.py

+ 7
- 12
tests/st/networks/models/bert/bert_precision/test_bert_tdt_lossscale.py View File

@@ -174,8 +174,8 @@ class TimeMonitor(Callback):
self.per_step_mseconds_list.append(epoch_mseconds / self.data_size)


def test_bert_percision(enable_graph_kernel=False):
"""test bert percision"""
def test_bert_precision(enable_graph_kernel=False):
"""test bert precision"""
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", reserve_class_name_in_scope=False)
if enable_graph_kernel:
context.set_context(enable_graph_kernel=True)
@@ -245,18 +245,13 @@ def test_bert_percision(enable_graph_kernel=False):
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_bert_percision_graph_kernel_off():
test_bert_percision(enable_graph_kernel=False)
def test_bert_precision_graph_kernel_off():
test_bert_precision(enable_graph_kernel=False)


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_bert_percision_graph_kernel_on():
test_bert_percision(enable_graph_kernel=True)
def test_bert_precision_graph_kernel_on():
test_bert_precision(enable_graph_kernel=True)


if __name__ == '__main__':
test_bert_percision(enable_graph_kernel=False)
test_bert_percision(enable_graph_kernel=True)
test_bert_precision(enable_graph_kernel=False)

+ 0
- 5
tests/st/ops/graph_kernel/test_clip_by_norm_no_div_sum.py View File

@@ -13,7 +13,6 @@
# limitations under the License.
# ============================================================================
import numpy as np
import pytest
import mindspore.context as context
import mindspore.nn as nn
from mindspore import Tensor
@@ -60,10 +59,6 @@ def test_clip_by_norm_no_div_sum(shape0, shape1, shape2, shape3, dtype):
assert np.allclose(expect_np, output_np, 0.0001, 0.0001)


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_clip_by_norm_no_div_sum_ascend():
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend")
test_clip_by_norm_no_div_sum((1, 1), (1,), (1, 1), (1,), np.float32)

+ 0
- 4
tests/st/ops/graph_kernel/test_cse.py View File

@@ -54,10 +54,6 @@ def test_basic_gpu():
test_basic()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_basic_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_basic()

+ 0
- 4
tests/st/ops/graph_kernel/test_fuse.py View File

@@ -70,10 +70,6 @@ def test_basic_gpu():
test_basic()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_basic_ascend():
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend")
test_basic()

+ 0
- 8
tests/st/ops/graph_kernel/test_fused_adam.py View File

@@ -135,10 +135,6 @@ def test_adam_gpu():
test_adam()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_adam_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_adam()
@@ -152,10 +148,6 @@ def test_adam_weight_decay_gpu():
test_adam_weight_decay()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_adam_weight_decay_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_adam_weight_decay()

+ 0
- 8
tests/st/ops/graph_kernel/test_gelu.py View File

@@ -85,10 +85,6 @@ def test_gelu_gpu():
test_gelu()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_gelu_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_gelu()
@@ -102,10 +98,6 @@ def test_gelu_grad_gpu():
test_gelu_grad()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_gelu_grad_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_gelu_grad()

+ 0
- 5
tests/st/ops/graph_kernel/test_lamb.py View File

@@ -13,7 +13,6 @@
# limitations under the License.
# ============================================================================

import pytest
import numpy as np
import mindspore.context as context
from mindspore import Tensor, Parameter
@@ -135,10 +134,6 @@ def test_graph_kernel_lamb_gpu():
test_graph_kernel_lamb()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_graph_kernel_lamb_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_graph_kernel_lamb()

+ 0
- 8
tests/st/ops/graph_kernel/test_layernorm.py View File

@@ -144,10 +144,6 @@ def test_basic_gpu():
test_basic()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_basic_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_basic()
@@ -161,10 +157,6 @@ def test_layernormgrad_gpu():
test_layernormgrad()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_layernormgrad_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_layernormgrad()

+ 0
- 8
tests/st/ops/graph_kernel/test_logsoftmax.py View File

@@ -107,19 +107,11 @@ def test_logsoftmaxgrad_gpu():
test_logsoftmaxgrad()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_logsoftmax_asend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_logsoftmax()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_logsoftmaxgrad_asend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_logsoftmaxgrad()

+ 0
- 4
tests/st/ops/graph_kernel/test_maximum_grad.py View File

@@ -51,10 +51,6 @@ def test_maximum_grad_gpu():
test_maximum_grad()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_maximum_grad_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_maximum_grad()

+ 0
- 4
tests/st/ops/graph_kernel/test_minimum_grad.py View File

@@ -51,10 +51,6 @@ def test_basic_gpu():
test_minimum_grad()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_basic_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_minimum_grad()

+ 0
- 4
tests/st/ops/graph_kernel/test_reduce_mean.py View File

@@ -48,10 +48,6 @@ def test_reduce_mean_gpu():
test_reduce_mean()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_reduce_mean_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_reduce_mean()

+ 0
- 4
tests/st/ops/graph_kernel/test_simplify.py View File

@@ -76,10 +76,6 @@ def test_basic_gpu():
test_basic()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_basic_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_basic()

+ 0
- 5
tests/st/ops/graph_kernel/test_sqrt_grad.py View File

@@ -13,7 +13,6 @@
# limitations under the License.
# ============================================================================
import numpy as np
import pytest
import mindspore.context as context
import mindspore.nn as nn
from mindspore import Tensor
@@ -56,10 +55,6 @@ def test_sqrt_grad(shape_x, shape_dout, dtype):
assert np.allclose(expect_np, output_np, rtol, atol)


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_sqrt_grad_ascend():
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend")
test_sqrt_grad((16, 16), (16, 16), np.float16)


+ 0
- 4
tests/st/ops/graph_kernel/test_tanh_grad.py View File

@@ -49,10 +49,6 @@ def test_tanh_grad_gpu():
test_tanh_grad()


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_tanh_grad_ascend():
context.set_context(mode=context.GRAPH_MODE, enable_graph_kernel=True, device_target="Ascend")
test_tanh_grad()

+ 0
- 5
tests/st/ops/graph_kernel/test_tile.py View File

@@ -13,7 +13,6 @@
# limitations under the License.
# ============================================================================
import numpy as np
import pytest
import mindspore.context as context
import mindspore.nn as nn
from mindspore import Tensor
@@ -49,10 +48,6 @@ def test_tile(shape, dtype, multiples):
assert np.allclose(expect_np, output_np, 0.0001, 0.0001)


@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_tile_ascend():
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend")
test_tile((24, 1), np.float16, (2, 2, 2))


Loading…
Cancel
Save