mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-20 06:49:15 +00:00
layernorm and groupnorm backward data (#1083)
* rename folder * Add type string * Remove typo * Add deviceOp to backward x * Add comment to describe the behavior of backward normalization * Add kernel function, prepare to implement * implement generic kernel * Check vector size * Add sweep once pipeline for small reduce size * Fix bug of KRaw_ error * Fix bug of dx stride * sanity check for mean and rstd * backward x for groupnorm * Add bwd x instance * add layernorm 2d bwd gamma beta instances * Change save mean var type from f32 to f16 in f16 mode * Change the example to f16 * Add groupnorm bwd gamma beta instance * Add groupnorm bwd x instance * Fix naming * Add layernorm bwd x ckprofiler * Add groupnorm bwd x profiler * clang format * Rename bwd x to bwd data * Fix bug of verification in profiler * Add test of layernorm and groupnorm bwd data * Add missing cmake * Add layernorm2d bwd data * rename fwd example * Add groupnorm client example * Fix typo. replace Invarient with Invariant * Add checking before running the best instance
This commit is contained in:
@@ -47,8 +47,8 @@ class TestGroupnorm : public ::testing::Test
|
||||
};
|
||||
|
||||
using KernelTypes = ::testing::Types<
|
||||
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType>
|
||||
std::tuple<F16, F16, F16, F32, F16, F32>>;
|
||||
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType>
|
||||
std::tuple<F16, F16, F16, F32, F16, F16>>;
|
||||
|
||||
TYPED_TEST_SUITE(TestGroupnorm, KernelTypes);
|
||||
TYPED_TEST(TestGroupnorm, Test_FP16) { this->Run(); }
|
||||
|
||||
@@ -45,7 +45,7 @@ class TestGroupnorm : public ::testing::Test
|
||||
};
|
||||
|
||||
using KernelTypes = ::testing::Types<
|
||||
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType>
|
||||
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType>
|
||||
std::tuple<F32, F32, F32, F32, F32, F32>>;
|
||||
|
||||
TYPED_TEST_SUITE(TestGroupnorm, KernelTypes);
|
||||
|
||||
@@ -41,8 +41,8 @@ class TestLayernorm2d : public ::testing::Test
|
||||
};
|
||||
|
||||
using KernelTypes = ::testing::Types<
|
||||
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType>
|
||||
std::tuple<F16, F16, F16, F32, F16, F32>>;
|
||||
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType>
|
||||
std::tuple<F16, F16, F16, F32, F16, F16>>;
|
||||
|
||||
TYPED_TEST_SUITE(TestLayernorm2d, KernelTypes);
|
||||
TYPED_TEST(TestLayernorm2d, Test_FP16) { this->Run(); }
|
||||
|
||||
@@ -41,8 +41,8 @@ class TestLayernorm4d : public ::testing::Test
|
||||
};
|
||||
|
||||
using KernelTypes = ::testing::Types<
|
||||
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType>
|
||||
std::tuple<F16, F16, F16, F32, F16, F32>>;
|
||||
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType>
|
||||
std::tuple<F16, F16, F16, F32, F16, F16>>;
|
||||
|
||||
TYPED_TEST_SUITE(TestLayernorm4d, KernelTypes);
|
||||
TYPED_TEST(TestLayernorm4d, Test_FP16) { this->Run(); }
|
||||
|
||||
Reference in New Issue
Block a user