forked from M-Labs/artiq
1
0
Fork 0

test: omit unavailable math functions on OR1K

This commit is contained in:
Sebastien Bourdeauducq 2020-08-12 15:01:13 +08:00
parent d8cd5023f6
commit 48008eaf5f
1 changed files with 6 additions and 0 deletions

View File

@ -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.