SWDEV-269879 - Adding function that recommends optimal thread count
Change-Id: I42eb94a058c1b7f9253182e16ff1c3389a836d61
This commit is contained in:
@@ -573,10 +573,13 @@ void HipMemcpyWithStreamMultiThreadtests::TestkindHtoH(void) {
|
||||
|
||||
|
||||
void HipMemcpyWithStreamMultiThreadtests::TestwithMultiThreaded(ops op) {
|
||||
int n = min(THREADS * std::thread::hardware_concurrency(), MAX_THREADS);
|
||||
size_t thread_count = getHostThreadCount();
|
||||
if (thread_count == 0) {
|
||||
failed("Thread Count is 0");
|
||||
}
|
||||
std::vector<joinable_thread> threads;
|
||||
|
||||
for (uint32_t i = 0; i < n; i++) {
|
||||
for (uint32_t i = 0; i < thread_count; i++) {
|
||||
threads.emplace_back(std::thread{[&] {
|
||||
switch ( op ) {
|
||||
case ops::TestwithOnestream:
|
||||
|
||||
Reference in New Issue
Block a user