We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99967b7 commit d437bbcCopy full SHA for d437bbc
src/agent.jl
@@ -1,6 +1,6 @@
1
# Utilities for working with HSA agents
2
3
-mutable struct HSAAgent
+mutable struct HSAAgent <: AbstractGPUDevice
4
agent::HSA.Agent
5
6
# Cached information
@@ -26,6 +26,14 @@ const DEFAULT_AGENT = Ref{HSAAgent}()
26
const ALL_AGENTS = Vector{HSAAgent}()
27
const AGENTS = IdDict{UInt64, HSAAgent}() # Map from agent handles to HSAAgent structs
28
29
+
30
+# ToDo: This is not sufficient/general enough, doesn't handle multiple devices:
31
+Adapt.adapt_storage(::HSAAgent, x) = adapt_storage(ROCArray, x)
32
33
+# ToDo: implement Sys.total_memory(dev::ROCDevice)
34
+# ToDo: implement Sys.free_memory(dev::ROCDevice)
35
36
37
### @cfunction callbacks ###
38
39
function agent_iterate_isas_cb(isa::HSA.ISA, isas)
0 commit comments