From f970dca68c906b2c9f77fda2ffcec627100c0ab5 Mon Sep 17 00:00:00 2001 From: jpekkila Date: Mon, 17 Jun 2019 18:32:23 +0300 Subject: [PATCH] Disabled a power-of-two error check as this may be too strict. See test_dims in autotest.cc which dimensions are guaranteed to work with reductions. Other dimensions may also work but are not yet extensively tested --- config/astaroth.conf | 6 +++--- src/core/kernels/kernels.cuh | 6 +++--- src/standalone/renderer.cc | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/astaroth.conf b/config/astaroth.conf index 5100bf6..e10f461 100644 --- a/config/astaroth.conf +++ b/config/astaroth.conf @@ -6,8 +6,8 @@ * ============================================================================= */ AC_nx = 192 -AC_ny = 120 -AC_nz = 7 +AC_ny = 128 +AC_nz = 8 AC_dsx = 0.04908738521 AC_dsy = 0.04908738521 @@ -18,7 +18,7 @@ AC_dsz = 0.04908738521 * Run-time params * ============================================================================= */ -AC_max_steps = 1001 +AC_max_steps = 1001 AC_save_steps = 10 AC_bin_steps = 1000 AC_bin_save_t = 1e666 diff --git a/src/core/kernels/kernels.cuh b/src/core/kernels/kernels.cuh index d05c7a7..9dda790 100644 --- a/src/core/kernels/kernels.cuh +++ b/src/core/kernels/kernels.cuh @@ -1025,9 +1025,9 @@ reduce_vec(const cudaStream_t stream, // NOTE! Also does not work properly with non-power of two mesh dimension // Issue is with "smem[BLOCK_SIZE];". If you init smem to NANs, you can // see that uninitialized smem values are used in the comparison - ERRCHK_ALWAYS(is_power_of_two(nx)); - ERRCHK_ALWAYS(is_power_of_two(ny)); - ERRCHK_ALWAYS(is_power_of_two(nz)); + //ERRCHK_ALWAYS(is_power_of_two(nx)); + //ERRCHK_ALWAYS(is_power_of_two(ny)); + //ERRCHK_ALWAYS(is_power_of_two(nz)); if (rtype == RTYPE_MAX || rtype == RTYPE_MIN) { kernel_reduce_1of3_vec<<>>(vtxbuf0, vtxbuf1, vtxbuf2, scratchpad); diff --git a/src/standalone/renderer.cc b/src/standalone/renderer.cc index 0dac03a..7f5f3e7 100644 --- a/src/standalone/renderer.cc +++ b/src/standalone/renderer.cc @@ -153,8 +153,8 @@ draw_vertex_buffer(const AcMesh& mesh, const VertexBufferHandle& vertex_buffer, const float max = float(model_reduce_scal(mesh, RTYPE_MAX, vertex_buffer)); const float min = float(model_reduce_scal(mesh, RTYPE_MIN, vertex_buffer)); */ - const float max = 1.f;//float(acReduceScal(RTYPE_MAX, vertex_buffer)); - const float min = 0.f;//float(acReduceScal(RTYPE_MIN, vertex_buffer)); + const float max = float(acReduceScal(RTYPE_MAX, vertex_buffer)); + const float min = float(acReduceScal(RTYPE_MIN, vertex_buffer)); const float range = fabsf(max - min); const float mid = max - .5f * range;