Skip to content
Snippets Groups Projects
Commit 64fbd5eb authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Accelerate gradient check test by using smaller arrays

parent c6e5fda1
No related branches found
No related tags found
No related merge requests found
Pipeline #20587 passed
......@@ -58,7 +58,7 @@ def test_tfmad_two_stencils():
def test_tfmad_gradient_check():
tf = pytest.importorskip('tensorflow')
a, b, out = ps.fields("a, b, out: double[21,13]")
a, b, out = ps.fields("a, b, out: double[5,6]")
print(a.shape)
cont = ps.fd.Diff(a, 0) - ps.fd.Diff(a, 1) - ps.fd.Diff(b, 0) + ps.fd.Diff(
......@@ -100,7 +100,7 @@ def test_tfmad_gradient_check():
def test_tfmad_gradient_check_torch():
torch = pytest.importorskip('torch')
a, b, out = ps.fields("a, b, out: float[21,13]")
a, b, out = ps.fields("a, b, out: float[5,7]")
cont = 2 * ps.fd.Diff(a, 0) - 1.5 * ps.fd.Diff(a, 1) \
- ps.fd.Diff(b, 0) + 3 * ps.fd.Diff(b, 1)
......@@ -136,7 +136,7 @@ def test_valid_boundary_handling_torch_native():
pytest.importorskip('tensorflow')
import tensorflow as tf
a, b, out = ps.fields("a, b, out: double[21,13]")
a, b, out = ps.fields("a, b, out: double[10,11]")
print(a.shape)
cont = 2*ps.fd.Diff(a, 0) - 1.5 * ps.fd.Diff(a, 1) - ps.fd.Diff(b, 0) + 3 * ps.fd.Diff(b, 1)
......@@ -190,7 +190,7 @@ def test_tfmad_gradient_check_torch_native(with_offsets, with_cuda):
torch = pytest.importorskip('torch')
import torch
a, b, out = ps.fields("a, b, out: float64[21,13]")
a, b, out = ps.fields("a, b, out: float64[5,7]")
if with_offsets:
cont = 2*ps.fd.Diff(a, 0) - 1.5*ps.fd.Diff(a, 1) - ps.fd.Diff(b, 0) + 3 * ps.fd.Diff(b, 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment