Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
546d766
fix(miopen): add naive reference kernel instantiations for 3D INT8 fw…
amd-bartgips Jul 28, 2026
557f1ea
fix(miopen): fix test naming, shapes, and layout coverage for 3D INT8…
amd-bartgips Jul 28, 2026
a9c4b55
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-bartgips Jul 31, 2026
e91aea0
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-bartgips Jul 31, 2026
b4fa626
test(miopen): migrate 3D int8 fwd cases into unit_conv_solver_ConvDir…
amd-bartgips Aug 3, 2026
45ff34b
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-bartgips Aug 3, 2026
7fee98b
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-ahyttine Aug 11, 2026
eb6e596
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-ahyttine Aug 12, 2026
f8b7e6b
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-ahyttine Aug 13, 2026
c793bfc
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-ahyttine Aug 14, 2026
949cde8
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-ahyttine Aug 16, 2026
b6d261d
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-ahyttine Aug 19, 2026
88512e7
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-ahyttine Aug 19, 2026
7db95b1
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-ahyttine Aug 21, 2026
d913b59
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-ahyttine Aug 25, 2026
a435dd6
Merge branch 'develop' into users/bartgips/naive_conv_3d_int8
amd-ahyttine Aug 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2264,12 +2264,14 @@ DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ncdhw, float, double, float, 0)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ncdhw, float, double, float, 1)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ncdhw, half, double, half, 0)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ncdhw, ushort, double, ushort, 0)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ncdhw, int8_t, int32_t, int8_t, 0)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ncdhw, int8_t, int32_t, int32_t, 0)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ncdhw, int8_t, int32_t, float, 0)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ndhwc, float, double, float, 0)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ndhwc, float, double, float, 1)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ndhwc, half, double, half, 0)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ndhwc, ushort, double, ushort, 0)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ndhwc, int8_t, int32_t, int8_t, 0)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ndhwc, int8_t, int32_t, int32_t, 0)
DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ndhwc, int8_t, int32_t, float, 0)

Expand Down
82 changes: 82 additions & 0 deletions projects/miopen/test/gtest/test_naive_conv_3d_int8_fwd.cpp
Comment thread
averinevg marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*******************************************************************************
*
* MIT License
*
* Copyright (c) 2026 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/

// Regression test for SILOTIGER-709 / ALMIOPEN-2275:
// The naive reference kernel lacked instantiations for 3D INT8 forward convolutions with
// int8_t output (ncdhw and ndhwc layouts). This caused "named symbol not found" failures
// during MIOpenDriver verification even though the fast solver ran successfully.

#include "unit_conv_solver.hpp"

namespace {

auto GetConvTestCases()
{
using TestCase = miopen::unit_tests::ConvTestCase;

// Regression for ALMIOPEN-2275: 3D int8 forward, both NCDHW and NDHWC layouts.
// x: {N, C, D, H, W}, w: {K, C, D, H, W}, type_y=int8 (the previously missing output variant).
// C is kept small (<=64) so the test data generator (conv_tensor_gen.hpp:num_add <
// int8_max=127) doesn't overflow during input generation for the int8_t accumulator path.
using TDP = miopen::unit_tests::TensorDescriptorParams;
using CDP = miopen::unit_tests::ConvolutionDescriptorParams;
return std::vector{
// clang-format off
// NCDHW layout (default): exercises naive_conv_..._ncdhw_int8_t_int32_t_int8_t_0
TestCase{{1, 16, 5, 14, 14}, {8, 16, 1, 1, 1}, {0, 0, 0}, {1, 1, 1}, {1, 1, 1}, miopenInt8, miopenInt8, miopenInt8},
// NDHWC layout: exercises naive_conv_..._ndhwc_int8_t_int32_t_int8_t_0
TestCase{TDP{miopenInt8, miopenTensorNDHWC, {1, 16, 5, 14, 14}},
TDP{miopenInt8, miopenTensorNDHWC, {8, 16, 1, 1, 1}},
miopenInt8,
CDP{{0, 0, 0}, {1, 1, 1}, {1, 1, 1}}},
// clang-format on
};
}

const auto& GetTestParams()
{
static const auto params = [] {
auto p = miopen::unit_tests::UnitTestConvSolverParams(Gpu::All);
p.UseCpuRef();
return p;
}();
return params;
}

} // namespace

using GPU_UnitTestConvNaiveConv3dFwd_I8 = GPU_UnitTestConvSolverFwd_I8;

TEST_P(GPU_UnitTestConvNaiveConv3dFwd_I8, ConvDirectNaiveConvFwd3dInt8)
{
this->RunTest(miopen::solver::conv::ConvDirectNaiveConvFwd{});
};

INSTANTIATE_TEST_SUITE_P(Smoke,
GPU_UnitTestConvNaiveConv3dFwd_I8,
testing::Combine(testing::Values(GetTestParams()),
testing::Values(miopenConvolutionAlgoDirect),
testing::ValuesIn(GetConvTestCases())));
Loading