Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/FBGEMM.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbgemmConv.cc')
-rw-r--r--src/FbgemmConv.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/FbgemmConv.cc b/src/FbgemmConv.cc
index 5db63f6..be54693 100644
--- a/src/FbgemmConv.cc
+++ b/src/FbgemmConv.cc
@@ -58,6 +58,13 @@ int fbgemmConv(
static_assert(
SPATIAL_DIM == 2 || SPATIAL_DIM == 3,
"Only 2D and 3D convolutions are supported");
+
+ if (!packed_weights.isPackingCompliant(conv_p)) {
+ throw std::logic_error(
+ "[FBGEMM_CONV_ERROR] Prepacked weights can't be used"
+ " with these convolution parameters!");
+ }
+
switch (ConvFastPath<SPATIAL_DIM, ACC_T>(conv_p)) {
case optimized_conv_t::depthwise: {
// 2D and 3D depthwise fast path