blob: e79e6fc7012a92fc7e85bce413e6cccd5579113e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
Fix libc++ error: no matching function for call to object of type 'const std::less<void>'.
libstdc++ compiles due too loose standard following, allowing to compare some structs without a comparator.
Upstream bug: https://github.com/ROCm/rocm-systems/issues/3307
--- a/runtime/hsa-runtime/core/inc/amd_gpu_agent.h
+++ b/runtime/hsa-runtime/core/inc/amd_gpu_agent.h
@@ -575,8 +575,14 @@ class GpuAgent : public GpuAgentInt {
// @brief Current short duration scratch memory size.
size_t scratch_used_large_;
+ struct HsaSignalLess {
+ bool operator()(const hsa_signal_t& lhs, const hsa_signal_t& rhs) const {
+ return lhs.handle < rhs.handle;
+ }
+ };
+
// @brief Notifications for scratch release.
- std::map<hsa_signal_t, hsa_signal_value_t> scratch_notifiers_;
+ std::map<hsa_signal_t, hsa_signal_value_t, HsaSignalLess> scratch_notifiers_;
// @brief Default scratch size per queue.
size_t queue_scratch_len_;
|