Add scheduling, machine info, caching strategies and devices (#9)
Reviewed-on: Rubydragon/MetagraphOptimization.jl#9 Co-authored-by: Anton Reinhard <anton.reinhard@proton.me> Co-committed-by: Anton Reinhard <anton.reinhard@proton.me>
This commit is contained in:
@ -87,3 +87,19 @@ Return the memory footprint of the node in Byte. Used in [`mem(graph::DAG)`](@re
|
||||
function mem(node::Node)
|
||||
return Base.summarysize(node, exclude = Union{Node, Operation})
|
||||
end
|
||||
|
||||
"""
|
||||
unroll_symbol_vector(vec::Vector{Symbol})
|
||||
|
||||
Return the given vector as single String without quotation marks or brackets.
|
||||
"""
|
||||
function unroll_symbol_vector(vec::Vector)
|
||||
result = ""
|
||||
for s in vec
|
||||
if (result != "")
|
||||
result *= ", "
|
||||
end
|
||||
result *= "$s"
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
Reference in New Issue
Block a user