From 4341e779ea379e7bc77f1b369f64281de583a039 Mon Sep 17 00:00:00 2001 From: Malcolm Roberts Date: Mon, 27 Jun 2022 12:15:47 -0600 Subject: [PATCH] Revert "Allow build_CS_3D_BLOCK_RC to also have composite sub-schemes. " This reverts commit ba137301da83fddaa9c6faaa5c4a1f9222cbcc2b. --- clients/tests/accuracy_test_adhoc.cpp | 3 --- library/src/assignment_policy.cpp | 8 -------- library/src/tree_node_3D.cpp | 15 +++++++++------ 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/clients/tests/accuracy_test_adhoc.cpp b/clients/tests/accuracy_test_adhoc.cpp index f6d90309..45444d8c 100644 --- a/clients/tests/accuracy_test_adhoc.cpp +++ b/clients/tests/accuracy_test_adhoc.cpp @@ -36,9 +36,6 @@ std::vector> adhoc_sizes = { // SBRC 192 with special param {192, 192, 192}, {192, 84, 84}, - - // Failure with build_CS_3D_BLOCK_RC - {680, 128, 128}, }; const static std::vector> stride_range = {{1}}; diff --git a/library/src/assignment_policy.cpp b/library/src/assignment_policy.cpp index 76cbffa3..c14df068 100644 --- a/library/src/assignment_policy.cpp +++ b/library/src/assignment_policy.cpp @@ -1103,14 +1103,6 @@ void AssignmentPolicy::PadPlan(ExecPlan& execPlan) // SBCR plans combine higher dimensions in ways that confuse padding if(u.node.scheme == CS_KERNEL_STOCKHAM_BLOCK_CR) return; - // transpose kernels don't handle arbitrary strides, - // and with 4 or more lengths either choice of - // padding dim will trigger incorrect behaviour - if((u.node.scheme == CS_KERNEL_TRANSPOSE - || u.node.scheme == CS_KERNEL_TRANSPOSE_XY_Z - || u.node.scheme == CS_KERNEL_TRANSPOSE_Z_XY) - && u.node.length.size() > 3) - return; } // Ensure that if we're forced to pad along one dimension diff --git a/library/src/tree_node_3D.cpp b/library/src/tree_node_3D.cpp index c0aabafa..77fbe4eb 100644 --- a/library/src/tree_node_3D.cpp +++ b/library/src/tree_node_3D.cpp @@ -473,6 +473,13 @@ void BLOCKRC3DNode::AssignParams_internal() node->oDist = node->outStride[2] * node->length[0]; break; } + case CS_KERNEL_STOCKHAM: + { + node->outStride = node->inStride; + node->oDist = node->iDist; + node->AssignParams(); + break; + } case CS_KERNEL_TRANSPOSE_XY_Z: { node->outStride.push_back(1); @@ -490,12 +497,8 @@ void BLOCKRC3DNode::AssignParams_internal() break; } default: - { - node->outStride = node->inStride; - node->oDist = node->iDist; - node->AssignParams(); - break; - } + // build_CS_3D_BLOCK_RC should not have created any other node types + throw std::runtime_error("Scheme Assertion Failed, unexpected node scheme."); } prev_outStride = node->outStride; prev_oDist = node->oDist;