"vscode:/vscode.git/clone" did not exist on "bfe4aa2af51040d0050ed57c81b98cf030ce071e"
Commit fd87d533 authored by Astha Rai's avatar Astha Rai
Browse files

added example file to check kernel

parent 1c02848d
...@@ -3,4 +3,5 @@ if(DTYPES MATCHES "fp16" OR NOT DEFINED DTYPES) ...@@ -3,4 +3,5 @@ if(DTYPES MATCHES "fp16" OR NOT DEFINED DTYPES)
add_example_executable(example_elementwise_permute_4D_fp16_2d elementwise_permute_4D_fp16_2d.cpp) add_example_executable(example_elementwise_permute_4D_fp16_2d elementwise_permute_4D_fp16_2d.cpp)
add_example_executable(example_elementwise_permute_5D elementwise_permute_5D.cpp) add_example_executable(example_elementwise_permute_5D elementwise_permute_5D.cpp)
add_example_executable(example_elementwise_permute_5D_2d elementwise_permute_5D_2d.cpp) add_example_executable(example_elementwise_permute_5D_2d elementwise_permute_5D_2d.cpp)
add_example_executable(example_elementwise_permute_5D_3d elementwise_permute_5D_3d.cpp)
endif() endif()
...@@ -54,8 +54,8 @@ int main() ...@@ -54,8 +54,8 @@ int main()
//const int W = 1024; //const int W = 1024;
const int N = 16; const int N = 16;
const int C = 8; const int C = 8;
const int H = 8; const int H = 32;
const int W = 8; const int W = 64;
/**const int N = 120; /**const int N = 120;
const int H = 32; const int H = 32;
const int W = 64; const int W = 64;
...@@ -110,13 +110,13 @@ int main() ...@@ -110,13 +110,13 @@ int main()
float gb_per_sec = num_btype / 1.E6 / ave_time; float gb_per_sec = num_btype / 1.E6 / ave_time;
LogRangeAsType<float>(std::cout << "A : ", a.mData, ",") << std::endl; //LogRangeAsType<float>(std::cout << "A : ", a.mData, ",") << std::endl;
//LogRangeAsType<float>(std::cout << "B : ", b.mData, ",") << std::endl;
std::cout << "Perf: " << ave_time << " ms, " << tflops << " TFlops, " << gb_per_sec << " GB/s" std::cout << "Perf: " << ave_time << " ms, " << tflops << " TFlops, " << gb_per_sec << " GB/s"
<< std::endl; << std::endl;
bool pass = true; bool pass = true;
//LogRangeAsType<float>(std::cout << "B : ", b.mData, ",") << std::endl;
if(do_verification) if(do_verification)
{ {
b_device_buf.FromDevice(b.mData.data()); b_device_buf.FromDevice(b.mData.data());
...@@ -127,6 +127,7 @@ int main() ...@@ -127,6 +127,7 @@ int main()
host_b, a, nchw, PassThrough{}); host_b, a, nchw, PassThrough{});
//LogRangeAsType<float>(std::cout << "Host_b : ", host_b.mData, ",") << std::endl; //LogRangeAsType<float>(std::cout << "Host_b : ", host_b.mData, ",") << std::endl;
LogRangeAsType<float>(std::cout << "B : ", b.mData, ",") << std::endl;
// LogRangeAsType<float>(std::cout << "Host b : ", host_b.mData, ",") << std::endl; // LogRangeAsType<float>(std::cout << "Host b : ", host_b.mData, ",") << std::endl;
pass &= pass &=
ck::utils::check_err(b.mData, host_b.mData, "Error: Incorrect results b", 1e-3, 1e-3); ck::utils::check_err(b.mData, host_b.mData, "Error: Incorrect results b", 1e-3, 1e-3);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment