bug fix and tune implicit gemm

This commit is contained in:
Chao Liu
2019-01-16 23:24:49 -06:00
parent caf4d7e6f5
commit 216e3da609
6 changed files with 35 additions and 15 deletions

View File

@@ -389,7 +389,7 @@ int main()
#if 0
in_nchw.GenerateTensorValue(GeneratorTensor_1{}, num_thread);
wei_kcsr.GenerateTensorValue(GeneratorTensor_1{}, num_thread);
#elif 1
#elif 0
in_nchw.GenerateTensorValue(GeneratorTensor_2{-5, 5}, num_thread);
wei_kcsr.GenerateTensorValue(GeneratorTensor_2{-5, 5}, num_thread);
#endif
@@ -413,7 +413,7 @@ int main()
#endif
}
#if 1
#if 0
host_winograd_3x3_convolution(in_nchw, wei_kcsr, out_nkhw_host);
check_error(out_nkhw_host, out_nkhw_device);
#elif 0

View File

@@ -38,7 +38,7 @@ void device_implicit_gemm_convolution_nchw_kcsr(
constexpr unsigned WoPerThread = 2;
constexpr unsigned BlockSize = 16;
#elif 1
#elif 0
constexpr unsigned NPerBlock = 2;
constexpr unsigned KPerBlock = 32;
constexpr unsigned CPerBlock = 4;
@@ -51,19 +51,19 @@ void device_implicit_gemm_convolution_nchw_kcsr(
constexpr unsigned WoPerThread = 2;
constexpr unsigned BlockSize = 128;
#elif 0
constexpr unsigned NPerBlock = 2;
#elif 1
constexpr unsigned NPerBlock = 1;
constexpr unsigned KPerBlock = 64;
constexpr unsigned CPerBlock = 4;
constexpr unsigned HoPerBlock = 2;
constexpr unsigned HoPerBlock = 4;
constexpr unsigned WoPerBlock = 32;
constexpr unsigned KPerThread = 4;
constexpr unsigned KPerThread = 8;
constexpr unsigned CPerThread = 2;
constexpr unsigned HoPerThread = 2;
constexpr unsigned WoPerThread = 2;
constexpr unsigned WoPerThread = 4;
constexpr unsigned BlockSize = 256;
constexpr unsigned BlockSize = 128;
#endif
constexpr unsigned GridSize =