mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-14 10:09:41 +00:00
[CK_BUILDER] conv bwd weight testing (#3618)
* ck-builder: restructure testing conv
In order to prepare for bwd of conv testing, this commit moves some
files and types around so that we can reuse ckt::Args for both forward
and backwards convolution.
* ck-builder: decouple fwd_ck.hpp and fwd_reference.hpp from fwd.hpp
This will allow us to more easily include fwd.hpp from backwards
definitions, which is required for initializing bwd values.
* ck-builder: fix layout of test_ckb_conv_bwd_weight_xdl_cshuffle_v3
Turns out that the supplied layout isn't actually supported...
* ck-builder: ck and reference conv integration for bwd weight
* ck-builder: ck bwd weight execution test
* ck-builder: ckt::run support for ck-tile bwd weight
* ck-builder: ck tile bwd weight execution test
* ck-builder: extra debug printing in MatchesReference
* ck-builder: make ckt::run return RunResult
This type is more convenient than std::tuple, as it will allow us to
use google test matchers with this in the future.
* ck-builder: RunResult matcher
Using EXPECT_THAT(..., SuccessfulRun()) will generate a check and a nice error
message about how and why running an algorithm failed.
* ck-builder: doc fixes
* ck-builder: add missing headers
[ROCm/composable_kernel commit: cc75948d1c]
This commit is contained in:
@@ -5,11 +5,14 @@
|
||||
|
||||
#include "testing_utils.hpp"
|
||||
|
||||
namespace ckt = ck_tile::builder::test;
|
||||
|
||||
using ck_tile::test::HipError;
|
||||
using ck_tile::test::HipSuccess;
|
||||
using ck_tile::test::InstanceMatcher;
|
||||
using ck_tile::test::InstanceSet;
|
||||
using ck_tile::test::StringEqWithDiff;
|
||||
using ck_tile::test::SuccessfulRun;
|
||||
|
||||
TEST(InstanceSet, FromFactory)
|
||||
{
|
||||
@@ -107,3 +110,17 @@ TEST(HipStatusMatcher, Basic)
|
||||
EXPECT_THAT(hipSuccess, Not(HipError(hipErrorInvalidValue)));
|
||||
EXPECT_THAT(hipErrorOutOfMemory, Not(HipError(hipErrorInvalidValue)));
|
||||
}
|
||||
|
||||
TEST(RunResultMatcher, Basic)
|
||||
{
|
||||
EXPECT_THAT(ckt::RunResult::from_runtime(0), SuccessfulRun());
|
||||
EXPECT_THAT(ckt::RunResult::not_supported("test error"), Not(SuccessfulRun()));
|
||||
}
|
||||
|
||||
TEST(RunResultMatcher, ExplainMatchResult)
|
||||
{
|
||||
testing::StringMatchResultListener listener;
|
||||
EXPECT_TRUE(!ExplainMatchResult(
|
||||
SuccessfulRun(), ckt::RunResult::not_supported("test error"), &listener));
|
||||
EXPECT_THAT(listener.str(), StringEqWithDiff("run failed: test error"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user