Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ string fraction(const float x) {
}

void benchmark_device(const Device_Info& device_info) {
const uint N = 4096u*4096u; // kernel range: N*M*sizeof(float) = 1GB memory allocation
const uint M = 16u; // coalescence size
const uint target_memory_mb = min(1024u, device_info.max_global_buffer); // use 1GB or device limit, whichever is smaller
const uint N = (target_memory_mb*1048576u)/(M*sizeof(float)); // calculate N based on available memory
const uint N_kernel = 256u; // iterations for kernel calls
const uint N_memory = 16u; // iterations for PCIe memory transfers

Expand Down Expand Up @@ -197,4 +198,4 @@ int main(int argc, char* argv[]) {
println("'-----------------------------------------------------------------------------'");
#endif // Linux
return 0;
}
}