Skip to content

Commit e44c8d7

Browse files
committed
More API
1 parent 7267040 commit e44c8d7

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

lib/mpsgraphs/core.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ function MPSGraphDevice(device::MTLDevice)
2727
MPSGraphDevice(obj)
2828
end
2929

30+
# @objcwrapper MPSGraphExecutionDescriptor <: MPSGraphObject
31+
3032
function MPSGraphExecutionDescriptor()
3133
MPSGraphExecutionDescriptor(@objc [MPSGraphExecutionDescriptor new]::id{MPSGraphExecutionDescriptor})
3234
end
35+
36+
# @objcwrapper MPSGraphCompilationDescriptor <: MPSGraphObject
37+
38+
function MPSGraphCompilationDescriptor()
39+
MPSGraphCompilationDescriptor(@objc [MPSGraphCompilationDescriptor new]::id{MPSGraphCompilationDescriptor})
40+
end

lib/mpsgraphs/operations.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,13 @@ function identityWithTensor(graph::MPSGraph, tensor::MPSGraphTensor, name = "ide
6464
name:name::id{NSString}]::id{MPSGraphTensor}
6565
MPSGraphTensor(obj)
6666
end
67+
68+
"""
69+
dump_graph(graph::MPSGraph)
70+
71+
Dumps the `graph`.
72+
73+
!!! warning
74+
This function is undocumented from Apple so it may stop working at any time.
75+
"""
76+
dump_graph(graph::MPSGraph) = @objc [graph::id{MPSGraph} dump]::Nothing

0 commit comments

Comments
 (0)