HIP: record direct atomic PSF timings
This commit is contained in:
1 parent
7a80086f63
commit
a18ebfbf1a
9 files changed
+279
-10
No files matched your search
@@ -46,6 +46,16 @@ int main() {
|
||||
std::free(cpu_hdr); std::free(gpu_hdr); psf_kernel_cache_destroy(&cache);
|
||||
return 1;
|
||||
}
|
||||
HipPsfTiming timing = {};
|
||||
if (hip_psf_sink_get_timing(sink, &timing) || timing.event_count != 3 ||
|
||||
timing.batch_count != 1 || timing.timed_batch_count != 1 ||
|
||||
timing.upload_seconds < 0.0 || timing.kernel_seconds < 0.0 ||
|
||||
timing.download_seconds < 0.0) {
|
||||
std::fputs("HIP PSF timing accounting failed\n", stderr);
|
||||
hip_psf_sink_destroy(sink);
|
||||
std::free(cpu_hdr); std::free(gpu_hdr); psf_kernel_cache_destroy(&cache);
|
||||
return 1;
|
||||
}
|
||||
double max_abs = 0.0, max_rel = 0.0;
|
||||
for (size_t i = 0; i < values; ++i) {
|
||||
const double absolute = std::fabs(cpu_hdr[i] - gpu_hdr[i]);
|
||||
|
||||
Reference in new issue
Block a user