mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-27 04:08:27 +08:00
test: omit unavailable math functions on OR1K
This commit is contained in:
parent
d8cd5023f6
commit
48008eaf5f
@ -1,6 +1,7 @@
|
|||||||
from artiq.experiment import *
|
from artiq.experiment import *
|
||||||
import numpy
|
import numpy
|
||||||
from artiq.test.hardware_testbench import ExperimentCase
|
from artiq.test.hardware_testbench import ExperimentCase
|
||||||
|
from artiq.compiler.targets import CortexA9Target
|
||||||
from artiq.compiler import math_fns
|
from artiq.compiler import math_fns
|
||||||
|
|
||||||
|
|
||||||
@ -88,6 +89,11 @@ class CompareHostDeviceTest(ExperimentCase):
|
|||||||
names = [
|
names = [
|
||||||
a for a, _ in math_fns.unary_fp_intrinsics + math_fns.unary_fp_runtime_calls
|
a for a, _ in math_fns.unary_fp_intrinsics + math_fns.unary_fp_runtime_calls
|
||||||
]
|
]
|
||||||
|
exp = self.create(_RunOnDevice)
|
||||||
|
if exp.core.target_cls != CortexA9Target:
|
||||||
|
names.remove("exp2")
|
||||||
|
names.remove("log2")
|
||||||
|
names.remove("trunc")
|
||||||
for name in names:
|
for name in names:
|
||||||
op = "numpy.{}(a)".format(name)
|
op = "numpy.{}(a)".format(name)
|
||||||
# Avoid 0.5, as numpy.rint's rounding mode currently doesn't match.
|
# Avoid 0.5, as numpy.rint's rounding mode currently doesn't match.
|
||||||
|
Loading…
Reference in New Issue
Block a user