Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
c0bc1882
Unverified
Commit
c0bc1882
authored
Mar 10, 2020
by
Yao Wang
Committed by
GitHub
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "[topi][relay] add operation tan to TVM (#4938)" (#5017)
This reverts commit
d992468d
.
parent
a9cfe415
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
3 additions
and
155 deletions
+3
-155
docs/frontend/tensorflow.rst
+0
-1
include/tvm/tir/op.h
+0
-1
python/tvm/relay/frontend/mxnet.py
+0
-1
python/tvm/relay/frontend/tensorflow.py
+0
-1
python/tvm/relay/frontend/tflite.py
+0
-8
python/tvm/relay/op/_tensor.py
+0
-2
python/tvm/relay/op/_tensor_grad.py
+0
-7
python/tvm/relay/op/tensor.py
+0
-15
python/tvm/te/__init__.py
+1
-1
python/tvm/tir/__init__.py
+1
-1
python/tvm/tir/op.py
+0
-16
src/relay/op/tensor/unary.cc
+0
-11
src/target/intrin_rule.cc
+0
-3
src/target/llvm/intrin_rule_llvm.cc
+0
-14
src/target/llvm/intrin_rule_nvptx.cc
+0
-3
src/target/llvm/intrin_rule_rocm.cc
+0
-3
src/target/source/intrin_rule_cuda.cc
+0
-19
src/tir/ir/expr.cc
+1
-1
tests/python/frontend/tensorflow/test_forward.py
+0
-10
tests/python/frontend/tflite/test_forward.py
+0
-8
tests/python/relay/test_op_grad_level1.py
+0
-1
tests/python/relay/test_op_level1.py
+0
-1
tests/python/unittest/test_testing.py
+0
-1
topi/include/topi/elemwise.h
+0
-1
topi/python/topi/math.py
+0
-17
topi/src/topi.cc
+0
-5
topi/tests/python/test_topi_basic.py
+0
-1
topi/tests/python/test_topi_math.py
+0
-2
No files found.
docs/frontend/tensorflow.rst
View file @
c0bc1882
...
...
@@ -135,7 +135,6 @@ Supported Ops
- ConcatV2
- Conv2D
- Cos
- Tan
- CropAndResize
- DecodeJpeg
- DepthwiseConv2dNative
...
...
include/tvm/tir/op.h
View file @
c0bc1882
...
...
@@ -515,7 +515,6 @@ TVM_DECLARE_INTRIN_UNARY(sqrt);
TVM_DECLARE_INTRIN_UNARY
(
rsqrt
);
TVM_DECLARE_INTRIN_UNARY
(
log
);
TVM_DECLARE_INTRIN_UNARY
(
popcount
);
TVM_DECLARE_INTRIN_UNARY
(
tan
);
TVM_DECLARE_INTRIN_UNARY
(
cos
);
TVM_DECLARE_INTRIN_UNARY
(
sin
);
TVM_DECLARE_INTRIN_UNARY
(
atan
);
...
...
python/tvm/relay/frontend/mxnet.py
View file @
c0bc1882
...
...
@@ -1696,7 +1696,6 @@ _identity_list = [
"ones_like"
,
"where"
,
"gather_nd"
,
"tan"
,
"cos"
,
"sin"
]
...
...
python/tvm/relay/frontend/tensorflow.py
View file @
c0bc1882
...
...
@@ -1572,7 +1572,6 @@ _convert_map = {
'LessEqual'
:
_broadcast
(
'less_equal'
),
'Log'
:
AttrCvt
(
'log'
),
'Log1p'
:
_log1p
(),
'Tan'
:
AttrCvt
(
'tan'
),
'Cos'
:
AttrCvt
(
'cos'
),
'Sin'
:
AttrCvt
(
'sin'
),
'LogicalAnd'
:
_logical
(
'logical_and'
),
...
...
python/tvm/relay/frontend/tflite.py
View file @
c0bc1882
...
...
@@ -68,7 +68,6 @@ class OperatorConverter(object):
'LOG'
:
self
.
convert_log
,
'SIN'
:
self
.
convert_sin
,
'COS'
:
self
.
convert_cos
,
'TAN'
:
self
.
convert_tan
,
'SQRT'
:
self
.
convert_sqrt
,
'RSQRT'
:
self
.
convert_rsqrt
,
'NEG'
:
self
.
convert_neg
,
...
...
@@ -658,13 +657,6 @@ class OperatorConverter(object):
'TFlite quantized SIN operator is not supported yet.'
)
return
self
.
_convert_unary_elemwise
(
_op
.
sin
,
op
)
def
convert_tan
(
self
,
op
):
"""Convert TFLite TAN"""
if
self
.
is_quantized
(
op
):
raise
tvm
.
error
.
OpNotImplemented
(
'TFlite quantized TAN operator is not supported yet.'
)
return
self
.
_convert_unary_elemwise
(
_op
.
tan
,
op
)
def
convert_cos
(
self
,
op
):
"""Convert TFLite COS"""
if
self
.
is_quantized
(
op
):
...
...
python/tvm/relay/op/_tensor.py
View file @
c0bc1882
...
...
@@ -27,7 +27,6 @@ from ...hybrid import script
register_broadcast_schedule
(
"log"
)
register_broadcast_schedule
(
"tan"
)
register_broadcast_schedule
(
"cos"
)
register_broadcast_schedule
(
"sin"
)
register_broadcast_schedule
(
"atan"
)
...
...
@@ -215,4 +214,3 @@ register_shape_func("minimum", False, broadcast_shape_func)
register_shape_func
(
"sqrt"
,
False
,
elemwise_shape_func
)
register_shape_func
(
"negative"
,
False
,
elemwise_shape_func
)
register_shape_func
(
"exp"
,
False
,
elemwise_shape_func
)
register_shape_func
(
"tan"
,
False
,
elemwise_shape_func
)
python/tvm/relay/op/_tensor_grad.py
View file @
c0bc1882
...
...
@@ -61,13 +61,6 @@ def log_grad(orig, grad):
return
[
grad
*
ones_like
(
x
)
/
x
]
@register_gradient
(
"tan"
)
def
tan_grad
(
orig
,
grad
):
"""Returns [grad / (cos^2(x))]"""
x
=
orig
.
args
[
0
]
return
[
grad
/
(
cos
(
x
)
*
cos
(
x
))]
@register_gradient
(
"cos"
)
def
cos_grad
(
orig
,
grad
):
"""Returns [grad * (-sin(x))]"""
...
...
python/tvm/relay/op/tensor.py
View file @
c0bc1882
...
...
@@ -47,21 +47,6 @@ def log(data):
"""
return
_make
.
log
(
data
)
def
tan
(
data
):
"""Compute elementwise tan of data.
Parameters
----------
data : relay.Expr
The input data
Returns
-------
result : relay.Expr
The computed result.
"""
return
_make
.
tan
(
data
)
def
cos
(
data
):
"""Compute elementwise cos of data.
...
...
python/tvm/te/__init__.py
View file @
c0bc1882
...
...
@@ -19,7 +19,7 @@
"""
# expose all operators in tvm tir.op
from
tvm.tir
import
any
,
all
,
min_value
,
max_value
,
trace
from
tvm.tir
import
exp
,
erf
,
tanh
,
sigmoid
,
log
,
tan
,
cos
,
sin
,
atan
,
sqrt
,
rsqrt
,
floor
,
ceil
from
tvm.tir
import
exp
,
erf
,
tanh
,
sigmoid
,
log
,
cos
,
sin
,
atan
,
sqrt
,
rsqrt
,
floor
,
ceil
from
tvm.tir
import
trunc
,
abs
,
round
,
nearbyint
,
isnan
,
power
,
popcount
,
fmod
,
if_then_else
from
tvm.tir
import
div
,
indexdiv
,
indexmod
,
truncdiv
,
truncmod
,
floordiv
,
floormod
from
tvm.tir
import
comm_reducer
,
min
,
max
,
sum
...
...
python/tvm/tir/__init__.py
View file @
c0bc1882
...
...
@@ -33,7 +33,7 @@ from .stmt import IfThenElse, Evaluate, Prefetch, LoweredFunc, stmt_seq, stmt_li
from
.op
import
call_packed
,
call_pure_intrin
,
call_intrin
,
call_pure_extern
,
call_extern
from
.op
import
call_llvm_intrin
,
all
,
any
,
min_value
,
max_value
,
trace
from
.op
import
exp
,
erf
,
tanh
,
sigmoid
,
log
,
tan
,
cos
,
sin
,
atan
,
sqrt
,
rsqrt
,
floor
,
ceil
from
.op
import
exp
,
erf
,
tanh
,
sigmoid
,
log
,
cos
,
sin
,
atan
,
sqrt
,
rsqrt
,
floor
,
ceil
from
.op
import
trunc
,
abs
,
round
,
nearbyint
,
isnan
,
power
,
popcount
,
fmod
,
if_then_else
from
.op
import
div
,
indexdiv
,
indexmod
,
truncdiv
,
truncmod
,
floordiv
,
floormod
from
.op
import
comm_reducer
,
min
,
max
,
sum
...
...
python/tvm/tir/op.py
View file @
c0bc1882
...
...
@@ -393,22 +393,6 @@ def log(x):
"""
return
call_pure_intrin
(
x
.
dtype
,
"log"
,
x
)
def
tan
(
x
):
"""Take tan of input x.
Parameters
----------
x : PrimExpr
Input argument.
Returns
-------
y : PrimExpr
The result.
"""
return
call_pure_intrin
(
x
.
dtype
,
"tan"
,
x
)
def
cos
(
x
):
"""Take cos of input x.
...
...
src/relay/op/tensor/unary.cc
View file @
c0bc1882
...
...
@@ -51,17 +51,6 @@ RELAY_REGISTER_UNARY_OP("log")
.
set_attr
<
FTVMCompute
>
(
"FTVMCompute"
,
RELAY_UNARY_COMPUTE
(
topi
::
log
));
RELAY_REGISTER_UNARY_OP
(
"tan"
)
.
describe
(
R"code(Returns the tan of input array, computed element-wise.
.. math::
Y = tan(X)
)code"
TVM_ADD_FILELINE
)
.
set_support_level
(
1
)
.
set_attr
<
FTVMCompute
>
(
"FTVMCompute"
,
RELAY_UNARY_COMPUTE
(
topi
::
tan
));
RELAY_REGISTER_UNARY_OP
(
"cos"
)
.
describe
(
R"code(Returns the cos of input array, computed element-wise.
...
...
src/target/intrin_rule.cc
View file @
c0bc1882
...
...
@@ -40,9 +40,6 @@ TVM_REGISTER_GLOBAL("tvm.intrin.rule.default.log")
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.default.tanh"
)
.
set_body
(
DispatchExtern
<
FloatSuffix
>
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.default.tan"
)
.
set_body
(
DispatchExtern
<
FloatSuffix
>
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.default.cos"
)
.
set_body
(
DispatchExtern
<
FloatSuffix
>
);
...
...
src/target/llvm/intrin_rule_llvm.cc
View file @
c0bc1882
...
...
@@ -91,20 +91,6 @@ TVM_REGISTER_GLOBAL("tvm.intrin.rule.llvm.pow")
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.llvm.popcount"
)
.
set_body
(
DispatchLLVMPureIntrin
<::
llvm
::
Intrinsic
::
ctpop
,
1
>
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.llvm.tan"
)
.
set_body
([](
const
TVMArgs
&
targs
,
TVMRetValue
*
rv
)
{
PrimExpr
e
=
targs
[
0
];
const
tir
::
CallNode
*
call
=
e
.
as
<
tir
::
CallNode
>
();
CHECK
(
call
!=
nullptr
);
const
PrimExpr
&
x
=
call
->
args
[
0
];
PrimExpr
sin_x
=
tir
::
CallNode
::
make
(
x
.
dtype
(),
"sin"
,
{
x
},
tir
::
CallNode
::
PureIntrinsic
);
PrimExpr
cos_x
=
tir
::
CallNode
::
make
(
x
.
dtype
(),
"cos"
,
{
x
},
tir
::
CallNode
::
PureIntrinsic
);
PrimExpr
tan_x
=
sin_x
/
cos_x
;
*
rv
=
tan_x
;
});
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.llvm.cos"
)
.
set_body
(
DispatchLLVMPureIntrin
<::
llvm
::
Intrinsic
::
cos
,
1
>
);
...
...
src/target/llvm/intrin_rule_nvptx.cc
View file @
c0bc1882
...
...
@@ -81,9 +81,6 @@ TVM_REGISTER_GLOBAL("tvm.intrin.rule.nvptx.pow")
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.nvptx.tanh"
)
.
set_body
(
DispatchExternLibDevice
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.nvptx.tan"
)
.
set_body
(
DispatchExternLibDevice
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.nvptx.cos"
)
.
set_body
(
DispatchExternLibDevice
);
...
...
src/target/llvm/intrin_rule_rocm.cc
View file @
c0bc1882
...
...
@@ -80,9 +80,6 @@ TVM_REGISTER_GLOBAL("tvm.intrin.rule.rocm.pow")
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.tanh"
)
.
set_body
(
DispatchExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.tan"
)
.
set_body
(
DispatchExternOCML
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.rocm.cos"
)
.
set_body
(
DispatchExternOCML
);
...
...
src/target/source/intrin_rule_cuda.cc
View file @
c0bc1882
...
...
@@ -54,22 +54,6 @@ struct CUDAFastMath : public CUDAMath {
}
};
struct
CUDAFastMathTan
:
public
CUDAMath
{
std
::
string
operator
()(
DataType
t
,
std
::
string
name
)
const
{
if
(
t
.
lanes
()
==
1
&&
t
.
is_float
())
{
switch
(
t
.
bits
())
{
case
64
:
return
name
;
// `__tanf` seems to produce some values too deviant from numpy tan version.
// So, let's use just `tanf` instead.
case
32
:
return
name
+
'f'
;
case
16
:
LOG
(
FATAL
)
<<
"cuda tan unsupported for float16"
;
default
:
return
""
;
}
}
return
""
;
}
};
struct
CUDAPopcount
{
std
::
string
operator
()(
DataType
t
,
std
::
string
name
)
const
{
if
(
t
.
lanes
()
==
1
&&
t
.
is_uint
())
{
...
...
@@ -113,9 +97,6 @@ TVM_REGISTER_GLOBAL("tvm.intrin.rule.cuda.erf")
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.cuda.log"
)
.
set_body
(
DispatchExtern
<
CUDAFastMath
>
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.cuda.tan"
)
.
set_body
(
DispatchExtern
<
CUDAFastMathTan
>
);
TVM_REGISTER_GLOBAL
(
"tvm.intrin.rule.cuda.cos"
)
.
set_body
(
DispatchExtern
<
CUDAFastMath
>
);
...
...
src/tir/ir/expr.cc
View file @
c0bc1882
...
...
@@ -229,7 +229,7 @@ PrimExpr LetNode::make(Var var, PrimExpr value, PrimExpr body) {
const
char
*
CallNode
::
vectorizable_intrinsics
[]
=
{
"floor"
,
"ceil"
,
"sign"
,
"trunc"
,
"fabs"
,
"round"
,
"exp"
,
"tanh"
,
"sqrt"
,
"log"
,
"sin"
,
"cos"
,
"pow"
,
"tan"
,
tir
::
CallNode
::
shift_left
,
tir
::
CallNode
::
shift_right
,
"log"
,
"sin"
,
"cos"
,
"pow"
,
tir
::
CallNode
::
shift_left
,
tir
::
CallNode
::
shift_right
,
tir
::
CallNode
::
likely
,
tir
::
CallNode
::
popcount
};
...
...
tests/python/frontend/tensorflow/test_forward.py
View file @
c0bc1882
...
...
@@ -2624,15 +2624,6 @@ def test_forward_cos():
compare_tf_with_tvm
([
np_data
],
[
'in_data:0'
],
'cos:0'
)
def
test_forward_tan
():
"""test operator tan """
np_data
=
np
.
random
.
uniform
(
1
,
100
,
size
=
(
2
,
3
,
5
))
.
astype
(
np
.
float32
)
tf
.
reset_default_graph
()
in_data
=
tf
.
placeholder
(
tf
.
float32
,
(
2
,
3
,
5
),
name
=
"in_data"
)
tf
.
tan
(
in_data
,
name
=
"tan"
)
compare_tf_with_tvm
([
np_data
],
[
'in_data:0'
],
'tan:0'
)
def
test_forward_sin
():
"""test operator sin """
np_data
=
np
.
random
.
uniform
(
1
,
100
,
size
=
(
2
,
3
,
5
))
.
astype
(
np
.
float32
)
...
...
@@ -3036,7 +3027,6 @@ if __name__ == '__main__':
test_forward_sign
()
test_forward_log
()
test_forward_log1p
()
test_forward_tan
()
test_forward_cos
()
test_forward_sin
()
test_forward_negative
()
...
...
tests/python/frontend/tflite/test_forward.py
View file @
c0bc1882
...
...
@@ -723,13 +723,6 @@ def _test_cos(data):
""" One iteration of cos """
return
_test_unary_elemwise
(
math_ops
.
cos
,
data
)
#######################################################################
# Tan
# ---
def
_test_tan
(
data
):
""" One iteration of tan """
return
_test_unary_elemwise
(
math_ops
.
tan
,
data
)
#######################################################################
# Sqrt
# ----
...
...
@@ -779,7 +772,6 @@ def test_all_unary_elemwise():
if
package_version
.
parse
(
tf
.
VERSION
)
>=
package_version
.
parse
(
'1.14.0'
):
_test_forward_unary_elemwise
(
_test_ceil
)
_test_forward_unary_elemwise
(
_test_cos
)
_test_forward_unary_elemwise
(
_test_tan
)
#######################################################################
# Element-wise
...
...
tests/python/relay/test_op_grad_level1.py
View file @
c0bc1882
...
...
@@ -64,7 +64,6 @@ def test_unary_op():
(
relay
.
nn
.
relu
,
lambda
x
:
np
.
where
(
x
<
0
,
np
.
zeros_like
(
x
),
np
.
ones_like
(
x
))),
(
tvm
.
relay
.
cos
,
lambda
x
:
-
1.0
*
np
.
sin
(
x
)),
(
tvm
.
relay
.
sin
,
lambda
x
:
np
.
cos
(
x
)),
(
tvm
.
relay
.
tan
,
lambda
x
:
1.0
/
(
np
.
cos
(
x
)
**
2
)),
(
tvm
.
relay
.
atan
,
lambda
x
:
1
/
(
1
+
np
.
power
(
x
,
2.0
)))]:
check_single_op
(
opfunc
,
ref
)
...
...
tests/python/relay/test_op_level1.py
View file @
c0bc1882
...
...
@@ -76,7 +76,6 @@ def test_unary_op():
(
relay
.
nn
.
relu
,
relu
),
(
tvm
.
relay
.
cos
,
np
.
cos
),
(
tvm
.
relay
.
sin
,
np
.
sin
),
(
tvm
.
relay
.
tan
,
np
.
tan
),
(
tvm
.
relay
.
atan
,
np
.
arctan
)]:
for
dtype
in
[
'float16'
,
'float32'
]:
check_single_op
(
opfunc
,
ref
,
dtype
)
...
...
tests/python/unittest/test_testing.py
View file @
c0bc1882
...
...
@@ -31,7 +31,6 @@ def test_check_numerical_grads():
lambda
x
:
(
np
.
sign
(
np
.
sin
(
1
/
x
)),
np
.
zeros_like
(
x
)),
lambda
x
:
(
x
*
np
.
sin
(
1
/
x
),
np
.
sin
(
1
/
x
)
-
np
.
cos
(
1
/
x
)
/
x
),
lambda
x
:
(
np
.
sin
(
1
/
x
),
-
np
.
cos
(
1
/
x
)
/
(
x
*
x
)),
lambda
x
:
(
np
.
tan
(
x
),
1.0
/
(
np
.
cos
(
x
)
*
np
.
cos
(
x
))),
]
# Avoid values too close to 0 since singularities of our functions are there
...
...
topi/include/topi/elemwise.h
View file @
c0bc1882
...
...
@@ -55,7 +55,6 @@ TOPI_DECLARE_UNARY_OP(round);
TOPI_DECLARE_UNARY_OP
(
trunc
);
TOPI_DECLARE_UNARY_OP
(
abs
);
TOPI_DECLARE_UNARY_OP
(
cos
);
TOPI_DECLARE_UNARY_OP
(
tan
);
TOPI_DECLARE_UNARY_OP
(
sin
);
TOPI_DECLARE_UNARY_OP
(
atan
);
TOPI_DECLARE_UNARY_OP
(
isnan
);
...
...
topi/python/topi/math.py
View file @
c0bc1882
...
...
@@ -110,23 +110,6 @@ def tanh(x):
@tvm.te.tag_scope
(
tag
=
tag
.
ELEMWISE
)
def
tan
(
x
):
"""Take tan of input x.
Parameters
----------
x : tvm.te.Tensor
Input argument.
Returns
-------
y : tvm.te.Tensor
The result.
"""
return
te
.
compute
(
x
.
shape
,
lambda
*
i
:
te
.
tan
(
x
(
*
i
)))
@tvm.te.tag_scope
(
tag
=
tag
.
ELEMWISE
)
def
cos
(
x
):
"""Take cos of input x.
...
...
topi/src/topi.cc
View file @
c0bc1882
...
...
@@ -175,11 +175,6 @@ TVM_REGISTER_GLOBAL("topi.erf")
*
rv
=
erf
(
args
[
0
]);
});
TVM_REGISTER_GLOBAL
(
"topi.tan"
)
.
set_body
([](
TVMArgs
args
,
TVMRetValue
*
rv
)
{
*
rv
=
tan
(
args
[
0
]);
});
TVM_REGISTER_GLOBAL
(
"topi.cos"
)
.
set_body
([](
TVMArgs
args
,
TVMRetValue
*
rv
)
{
*
rv
=
cos
(
args
[
0
]);
...
...
topi/tests/python/test_topi_basic.py
View file @
c0bc1882
...
...
@@ -45,7 +45,6 @@ def test_ewise():
test_apply
(
topi
.
rsqrt
,
"rsqrt"
)
test_apply
(
topi
.
sin
,
"sin"
)
test_apply
(
topi
.
cos
,
"cos"
)
test_apply
(
topi
.
tan
,
"tan"
)
test_apply
(
topi
.
atan
,
"atan"
)
...
...
topi/tests/python/test_topi_math.py
View file @
c0bc1882
...
...
@@ -127,8 +127,6 @@ def test_ewise():
test_apply
(
topi
.
sqrt
,
"sqrt"
,
np
.
sqrt
,
0
,
100
)
test_apply
(
topi
.
rsqrt
,
"rsqrt"
,
lambda
x
:
np
.
ones_like
(
x
)
/
np
.
sqrt
(
x
),
0
,
100
,
skip_name_check
=
True
)
test_apply
(
topi
.
cos
,
"cos"
,
np
.
cos
,
-
2.0
*
np
.
pi
,
2.0
*
np
.
pi
)
test_apply
(
topi
.
tan
,
"tan"
,
np
.
tan
,
-
2.0
*
np
.
pi
,
2.0
*
np
.
pi
,
dtype
=
'float32'
)
test_apply
(
topi
.
tan
,
"tan"
,
np
.
tan
,
-
2.0
*
np
.
pi
,
2.0
*
np
.
pi
,
dtype
=
'float64'
)
test_apply
(
topi
.
sin
,
"sin"
,
np
.
sin
,
-
2.0
*
np
.
pi
,
2.0
*
np
.
pi
)
test_apply
(
topi
.
erf
,
"erf"
,
scipy
.
special
.
erf
,
-.
1
,
.
1
,
dtype
=
"float32"
)
test_isnan
(
-
100
,
100
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment