(func, args, ref_shape, is_trace, sym=False)
| 295 | raise NotImplementedError("nargs {}".format(nargs)) |
| 296 | |
| 297 | def run_test(func, args, ref_shape, is_trace, sym=False): |
| 298 | args = [tensor(t, dtype="float32") for t in args] |
| 299 | if is_trace: |
| 300 | func = trace(symbolic=sym)(func) |
| 301 | for _ in range(3): |
| 302 | out = func(*args) |
| 303 | assert out.numpy().shape == ref_shape |
| 304 | else: |
| 305 | out = func(*args) |
| 306 | assert out.numpy().shape == ref_shape, out.numpy().shape |
| 307 | |
| 308 | inps = [ |
| 309 | np.array([]).astype("float32"), |
no test coverage detected