dynamic runtime loading

This commit is contained in:
Evgeny
2018-12-20 20:21:37 -06:00
parent 7bf1219daf
commit 9dd17cd351
8 changed files with 107 additions and 6383 deletions
+6 -2
View File
@@ -52,8 +52,12 @@ class Timer {
inline void init(const hsa_system_get_info_fn_t& get_info_fn) {
hsa_system_get_info_fn = get_info_fn;
timestamp_t timestamp_hz = 0;
HSART_CALL(get_info_fn(HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY, &timestamp_hz));
timestamp_rate_ = (freq_t)1000000000 / (freq_t)timestamp_hz;
if (get_info_fn == NULL) {
timestamp_rate_ = 0;
} else {
HSART_CALL(get_info_fn(HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY, &timestamp_hz));
timestamp_rate_ = (freq_t)1000000000 / (freq_t)timestamp_hz;
}
}
// Returns HSA runtime timestamp rate
-6365
View File
File diff suppressed because it is too large Load Diff