Browse Source

!301 add custom op st to ci

Merge pull request !301 from dengwentao/ci_st
tags/v0.2.0-alpha
mindspore-ci-bot Gitee 6 years ago
parent
commit
7595c91730
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      tests/st/ops/custom_ops_tbe/cus_square.py
  2. +2
    -1
      tests/st/ops/custom_ops_tbe/test_square.py

+ 1
- 1
tests/st/ops/custom_ops_tbe/cus_square.py View File

@@ -24,7 +24,7 @@ class CusSquare(PrimitiveWithInfer):
def __init__(self):
"""init CusSquare"""
self.init_prim_io_names(inputs=['x'], outputs=['y'])
from .square_impl import CusSquare
from square_impl import CusSquare

def vm_impl(self, x):
x = x.asnumpy()


+ 2
- 1
tests/st/ops/custom_ops_tbe/test_square.py View File

@@ -16,7 +16,7 @@ import numpy as np
import mindspore.nn as nn
import mindspore.context as context
from mindspore import Tensor
from .cus_square import CusSquare
from cus_square import CusSquare
import pytest
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend")

@@ -32,6 +32,7 @@ class Net(nn.Cell):

@pytest.mark.level0
@pytest.mark.platform_x86_ascend_training
@pytest.mark.platform_arm_ascend_training
@pytest.mark.env_onecard
def test_net():
x = np.array([1.0, 4.0, 9.0]).astype(np.float32)


Loading…
Cancel
Save