mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-26 16:04:58 +00:00
Testing all fwd convolution specializations. (#259)
* UniforFill with integer values.
* Log tested instance type string.
* Add UT for all convolution specializations.
* debugging conv
* Fix dangling reference bug.
* Small refinements.
* Fix call to error checking function.
* Small refinements to tests.
* Configure error tolerance
* Change problem size.
* Remove OddC case from types that do not support it.
* Add helper traits for AccumulatorDataType.
* Print first 5 errs in check_err for integral types.
* Rename FillUniform to FillUniformDistribution
* Refactor
* Do not use typed tests.
* Instead use plain fixture class with templatized member functions.
* Initialize tensors with integer values.
* Refine test instances.
* Properly set accumulator data type.
* Add another "big" instance.
* Refactor convolution tests.
* Revert "debugging conv"
This reverts commit b109516455.
* Add pragma once + format + small refinement.
* Fix some unwanted changes.
* Clang-format
* Fix profile_convnd to use renamed tensor initializer.
* Add instances for ConvFWDND kernel case 2D
* Helpers to get ConvNDFwd 2D instances.
* Refactoring.
* Remove "small block" instance as it was generating compiler errors.
* Remove default template parameters values.
* Refine and fix test.
* Fix problem with default template parameter types.
* Adjust error thresholds for floating point values test.
* Use integer values initialization for instances test.
* Add tests for ConvNDFwd 2D case.
* Remove AccumulatorDataType type trait.
* Update unit-tests.
* Remove operator<< overload.
* Unlock conv1d/3d nd fwd instances.
* Enable skipping calculating reference using flag.
* Fix number of channels for first ResNet50 layer.
* Clang-format.
Co-authored-by: Adam Osewski <aosewski@amd.com>
Co-authored-by: Chao Liu <chao.liu2@amd.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -150,9 +151,12 @@ void profile_convnd_instances_impl(const ck::utils::conv::ConvParams& params,
|
||||
ck::tensor_operation::element_wise::PassThrough,
|
||||
ck::tensor_operation::element_wise::PassThrough,
|
||||
ck::tensor_operation::element_wise::PassThrough,
|
||||
ck::utils::FillUniform<int>,
|
||||
ck::utils::FillUniform<int>>>(
|
||||
params, true, ck::utils::FillUniform<int>{}, ck::utils::FillUniform<int>{});
|
||||
ck::utils::FillUniformDistributionIntegerValue<int>,
|
||||
ck::utils::FillUniformDistributionIntegerValue<int>>>(
|
||||
params,
|
||||
true,
|
||||
ck::utils::FillUniformDistributionIntegerValue<int>{},
|
||||
ck::utils::FillUniformDistributionIntegerValue<int>{});
|
||||
break;
|
||||
case 2:
|
||||
conv_instance = std::make_unique<
|
||||
@@ -165,12 +169,12 @@ void profile_convnd_instances_impl(const ck::utils::conv::ConvParams& params,
|
||||
ck::tensor_operation::element_wise::PassThrough,
|
||||
ck::tensor_operation::element_wise::PassThrough,
|
||||
ck::tensor_operation::element_wise::PassThrough,
|
||||
ck::utils::FillUniform<InDataType>,
|
||||
ck::utils::FillUniform<WeiDataType>>>(
|
||||
ck::utils::FillUniformDistribution<InDataType>,
|
||||
ck::utils::FillUniformDistribution<WeiDataType>>>(
|
||||
params,
|
||||
true,
|
||||
ck::utils::FillUniform<InDataType>{},
|
||||
ck::utils::FillUniform<WeiDataType>{});
|
||||
ck::utils::FillUniformDistribution<InDataType>{},
|
||||
ck::utils::FillUniformDistribution<WeiDataType>{});
|
||||
break;
|
||||
default: throw std::runtime_error("Unsupported init method!");
|
||||
}
|
||||
@@ -181,8 +185,10 @@ void profile_convnd_instances_impl(const ck::utils::conv::ConvParams& params,
|
||||
_1,
|
||||
_2,
|
||||
_3);
|
||||
OpInstanceRunEngine<InDataType, WeiDataType, OutDataType> run_engine(*conv_instance,
|
||||
reference_conv_fwd_fun);
|
||||
|
||||
OpInstanceRunEngine<InDataType, WeiDataType, OutDataType> run_engine(
|
||||
*conv_instance, reference_conv_fwd_fun, do_verification);
|
||||
|
||||
auto best_conf = run_engine.Profile(
|
||||
conv::ConvolutionFwdInstances<InDataType, WeiDataType, OutDataType>::template Get<NDim>(),
|
||||
time_kernel,
|
||||
|
||||
Reference in New Issue
Block a user