From 41e753d4b09ed01a76a6bcb8953c8fed200760e0 Mon Sep 17 00:00:00 2001 From: Victor Anisimov Date: Tue, 15 Feb 2022 15:38:29 -0600 Subject: [PATCH 1/2] Use const qualifier for device prop in prepmodel5, cyclesPacked, and cyclesTiled functions --- src/cuttGpuModel.cpp | 6 +++--- src/cuttGpuModel.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cuttGpuModel.cpp b/src/cuttGpuModel.cpp index df4bbcf..01e347d 100755 --- a/src/cuttGpuModel.cpp +++ b/src/cuttGpuModel.cpp @@ -795,7 +795,7 @@ struct GpuModelProp { } }; -void prepmodel5(hipDeviceProp_t& prop, GpuModelProp& gpuModelProp, +void prepmodel5(const hipDeviceProp_t& prop, GpuModelProp& gpuModelProp, int nthread, int numActiveBlock, float mlp, int gld_req, int gst_req, int gld_tran, int gst_tran, int sld_req, int sst_req, int sld_tran, int sst_tran, @@ -841,7 +841,7 @@ void prepmodel5(hipDeviceProp_t& prop, GpuModelProp& gpuModelProp, MWP = std::min(MWP*mlp, std::min(MWP_peak_BW, (double)active_warps_per_SM)); } -double cyclesPacked(const bool isSplit, const size_t sizeofType, hipDeviceProp_t& prop, +double cyclesPacked(const bool isSplit, const size_t sizeofType, const hipDeviceProp_t& prop, int nthread, int numActiveBlock, float mlp, int gld_req, int gst_req, int gld_tran, int gst_tran, int sld_req, int sst_req, int sld_tran, int sst_tran, int num_iter, int cl_full, int cl_part) { @@ -863,7 +863,7 @@ double cyclesPacked(const bool isSplit, const size_t sizeofType, hipDeviceProp_t return cycles; } -double cyclesTiled(const bool isCopy, const size_t sizeofType, hipDeviceProp_t& prop, +double cyclesTiled(const bool isCopy, const size_t sizeofType, const hipDeviceProp_t& prop, int nthread, int numActiveBlock, float mlp, int gld_req, int gst_req, int gld_tran, int gst_tran, int sld_req, int sst_req, int sld_tran, int sst_tran, int num_iter, int cl_full, int cl_part) { diff --git a/src/cuttGpuModel.h b/src/cuttGpuModel.h index 6fda23d..338b9db 100755 --- a/src/cuttGpuModel.h +++ b/src/cuttGpuModel.h @@ -73,16 +73,16 @@ void countTiledGlTransactions(const bool leadVolSame, std::vector& hostMbar, const int sizeMbar, int& num_iter, float& mlp, int& gld_tran, int& gst_tran, int& gld_req, int& gst_req, int& cl_full, int& cl_part); -double cyclesPacked(const bool isSplit, const size_t sizeofType, hipDeviceProp_t& prop, +double cyclesPacked(const bool isSplit, const size_t sizeofType, const hipDeviceProp_t& prop, int nthread, int numActiveBlock, float mlp, int gld_req, int gst_req, int gld_tran, int gst_tran, int sld_req, int sst_req, int sld_tran, int sst_tran, int num_iter, int cl_full, int cl_part); -double cyclesTiled(const bool isCopy, const size_t sizeofType, hipDeviceProp_t& prop, +double cyclesTiled(const bool isCopy, const size_t sizeofType, const hipDeviceProp_t& prop, int nthread, int numActiveBlock, float mlp, int gld_req, int gst_req, int gld_tran, int gst_tran, int sld_req, int sst_req, int sld_tran, int sst_tran, int num_iter, int cl_full, int cl_part); bool testCounters(const int warpSize, const int accWidth, const int cacheWidth); -#endif // CUTTGPUMODEL_H \ No newline at end of file +#endif // CUTTGPUMODEL_H From fc090d4d2b07db138ba33b8cccb68ae658c43f97 Mon Sep 17 00:00:00 2001 From: Victor Anisimov Date: Fri, 4 Mar 2022 10:16:47 -0600 Subject: [PATCH 2/2] Enable Test4 and restore the original cuTT tensor sizes --- src/cutt_test.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/cutt_test.cpp b/src/cutt_test.cpp index f642057..f277393 100644 --- a/src/cutt_test.cpp +++ b/src/cutt_test.cpp @@ -53,7 +53,7 @@ cuttTimer* timerDouble; long long int* dataIn = NULL; long long int* dataOut = NULL; -int dataSize = 20000000; +int dataSize = 200000000; TensorTester* tester = NULL; bool test1(); @@ -107,7 +107,7 @@ int main(int argc, char *argv[]) { if(passed){passed = test1(); if(!passed) printf("Test 1 failed\n");} if(passed){passed = test2(); if(!passed) printf("Test 2 failed\n");} if(passed){passed = test3(); if(!passed) printf("Test 3 failed\n");} - //if(passed){passed = test4(); if(!passed) printf("Test 4 failed\n");} + if(passed){passed = test4(); if(!passed) printf("Test 4 failed\n");} //if(passed){passed = test5(); if(!passed) printf("Test 5 failed\n");} if(passed){ @@ -267,9 +267,9 @@ bool test3() { int rank = 3; std::vector dim(rank); std::vector permutation(rank); - dim[0] = 651; - dim[1] = 299; - dim[2] = 44; + dim[0] = 1305; + dim[1] = 599; + dim[2] = 88; permutation[0] = 0; permutation[1] = 2; permutation[2] = 1; @@ -282,9 +282,9 @@ bool test3() { std::vector dim(rank); std::vector permutation(rank); dim[0] = 24; - dim[1] = 170; - dim[2] = 32; - dim[3] = 97; + dim[1] = 330; + dim[2] = 64; + dim[3] = 147; permutation[0] = 1; permutation[1] = 0; permutation[2] = 2; @@ -333,10 +333,10 @@ bool test3() { std::vector dim(5); std::vector permutation(5); dim[0] = 5; - dim[1] = 32; - dim[2] = 45; - dim[3] = 63; - dim[4] = 37; + dim[1] = 42; + dim[2] = 75; + dim[3] = 86; + dim[4] = 57; permutation[0] = 2 - 1; permutation[1] = 4 - 1; permutation[2] = 5 - 1;