Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
8dee56c8
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8dee56c8
编写于
2月 18, 2019
作者:
L
liuruilong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ios metal gpu add multi-output api
上级
3a8d22a4
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
63 addition
and
44 deletion
+63
-44
metal/MobileNetDemo/MobileNetDemo/MobileNet.swift
metal/MobileNetDemo/MobileNetDemo/MobileNet.swift
+3
-2
metal/paddle-mobile-demo/paddle-mobile-demo/Net/Genet.swift
metal/paddle-mobile-demo/paddle-mobile-demo/Net/Genet.swift
+2
-2
metal/paddle-mobile-demo/paddle-mobile-demo/Net/MobileNet.swift
...paddle-mobile-demo/paddle-mobile-demo/Net/MobileNet.swift
+2
-2
metal/paddle-mobile-demo/paddle-mobile-demo/Net/MobileNetCombined.swift
...obile-demo/paddle-mobile-demo/Net/MobileNetCombined.swift
+2
-2
metal/paddle-mobile-demo/paddle-mobile-demo/Net/MobileNetSSD.swift
...dle-mobile-demo/paddle-mobile-demo/Net/MobileNetSSD.swift
+3
-3
metal/paddle-mobile-demo/paddle-mobile-demo/Net/MobilenetSSD_AR.swift
...-mobile-demo/paddle-mobile-demo/Net/MobilenetSSD_AR.swift
+3
-3
metal/paddle-mobile-demo/paddle-mobile-demo/Net/YoloNet.swift
...l/paddle-mobile-demo/paddle-mobile-demo/Net/YoloNet.swift
+2
-2
metal/paddle-mobile-demo/paddle-mobile-demo/OCInterface/PaddleMobileGPU.h
...ile-demo/paddle-mobile-demo/OCInterface/PaddleMobileGPU.h
+4
-2
metal/paddle-mobile-demo/paddle-mobile-demo/OCInterface/PaddleMobileGPU.m
...ile-demo/paddle-mobile-demo/OCInterface/PaddleMobileGPU.m
+23
-13
metal/paddle-mobile-demo/paddle-mobile-demo/OCInterface/SuperResolutionNet.swift
...o/paddle-mobile-demo/OCInterface/SuperResolutionNet.swift
+1
-1
metal/paddle-mobile-demo/paddle-mobile-demo/ViewController.swift
...addle-mobile-demo/paddle-mobile-demo/ViewController.swift
+4
-3
metal/paddle-mobile/paddle-mobile/API/Net.swift
metal/paddle-mobile/paddle-mobile/API/Net.swift
+8
-5
metal/paddle-mobile/paddle-mobile/API/Runner.swift
metal/paddle-mobile/paddle-mobile/API/Runner.swift
+4
-2
metal/paddle-mobile/paddle-mobile/Src/Framework/Executor.swift
.../paddle-mobile/paddle-mobile/Src/Framework/Executor.swift
+2
-2
未找到文件。
metal/MobileNetDemo/MobileNetDemo/MobileNet.swift
浏览文件 @
8dee56c8
...
@@ -42,8 +42,9 @@ public class MobileNet: Net{
...
@@ -42,8 +42,9 @@ public class MobileNet: Net{
let
labels
=
PreWords
.
init
(
fileName
:
"synset"
)
let
labels
=
PreWords
.
init
(
fileName
:
"synset"
)
override
public
func
resultStr
(
res
:
ResultHolder
)
->
String
{
override
public
func
resultStr
(
res
:
[
ResultHolder
])
->
String
{
let
resPointer
=
res
.
result
let
firstRes
=
res
[
0
]
let
resPointer
=
firstRes
.
result
var
s
:
[
String
]
=
[]
var
s
:
[
String
]
=
[]
(
0
..<
res
.
capacity
)
.
map
{
resPointer
[
$0
]
}
.
top
(
r
:
5
)
.
enumerated
()
.
forEach
{
(
0
..<
res
.
capacity
)
.
map
{
resPointer
[
$0
]
}
.
top
(
r
:
5
)
.
enumerated
()
.
forEach
{
s
.
append
(
String
(
format
:
"%d: %@ (%3.2f%%)"
,
$0
+
1
,
labels
[
$1
.
0
],
$1
.
1
*
100
))
s
.
append
(
String
(
format
:
"%d: %@ (%3.2f%%)"
,
$0
+
1
,
labels
[
$1
.
0
],
$1
.
1
*
100
))
...
...
metal/paddle-mobile-demo/paddle-mobile-demo/Net/Genet.swift
浏览文件 @
8dee56c8
...
@@ -41,8 +41,8 @@ public class Genet: Net {
...
@@ -41,8 +41,8 @@ public class Genet: Net {
}
}
}
}
override
public
func
resultStr
(
res
:
ResultHolder
)
->
String
{
override
public
func
resultStr
(
res
:
[
ResultHolder
]
)
->
String
{
return
"
\(
res
.
result
[
0
]
)
... "
return
"
\(
res
[
0
]
.
result
[
0
]
)
... "
}
}
}
}
metal/paddle-mobile-demo/paddle-mobile-demo/Net/MobileNet.swift
浏览文件 @
8dee56c8
...
@@ -43,8 +43,8 @@ public class MobileNet: Net{
...
@@ -43,8 +43,8 @@ public class MobileNet: Net{
let
labels
=
PreWords
.
init
(
fileName
:
"synset"
)
let
labels
=
PreWords
.
init
(
fileName
:
"synset"
)
override
public
func
resultStr
(
res
:
ResultHolder
)
->
String
{
override
public
func
resultStr
(
res
:
[
ResultHolder
]
)
->
String
{
let
resPointer
=
res
.
result
let
resPointer
=
res
[
0
]
.
result
var
s
:
[
String
]
=
[]
var
s
:
[
String
]
=
[]
(
0
..<
res
.
capacity
)
.
map
{
resPointer
[
$0
]
}
.
top
(
r
:
5
)
.
enumerated
()
.
forEach
{
(
0
..<
res
.
capacity
)
.
map
{
resPointer
[
$0
]
}
.
top
(
r
:
5
)
.
enumerated
()
.
forEach
{
s
.
append
(
String
(
format
:
"%d: %@ (%3.2f%%)"
,
$0
+
1
,
labels
[
$1
.
0
],
$1
.
1
*
100
))
s
.
append
(
String
(
format
:
"%d: %@ (%3.2f%%)"
,
$0
+
1
,
labels
[
$1
.
0
],
$1
.
1
*
100
))
...
...
metal/paddle-mobile-demo/paddle-mobile-demo/Net/MobileNetCombined.swift
浏览文件 @
8dee56c8
...
@@ -26,8 +26,8 @@ public class MobileNetCombined: Net {
...
@@ -26,8 +26,8 @@ public class MobileNetCombined: Net {
// metalLibPath = Bundle.main.path(forResource: "PaddleMobileMetal", ofType: "metallib") ?! " can't be nil "
// metalLibPath = Bundle.main.path(forResource: "PaddleMobileMetal", ofType: "metallib") ?! " can't be nil "
}
}
override
public
func
resultStr
(
res
:
ResultHolder
)
->
String
{
override
public
func
resultStr
(
res
:
[
ResultHolder
]
)
->
String
{
return
"
\(
res
.
result
[
0
]
)
... "
return
"
\(
res
[
0
]
.
result
[
0
]
)
... "
}
}
}
}
metal/paddle-mobile-demo/paddle-mobile-demo/Net/MobileNetSSD.swift
浏览文件 @
8dee56c8
...
@@ -45,11 +45,11 @@ public class MobileNet_ssd_hand: Net {
...
@@ -45,11 +45,11 @@ public class MobileNet_ssd_hand: Net {
}
}
}
}
override
public
func
resultStr
(
res
:
ResultHolder
)
->
String
{
override
public
func
resultStr
(
res
:
[
ResultHolder
]
)
->
String
{
return
"
\(
res
)
"
return
"
\(
res
[
0
]
)
"
}
}
override
public
func
fetchResult
(
paddleMobileRes
:
GPUResultHolder
)
->
ResultHolder
{
override
public
func
fetchResult
(
paddleMobileRes
:
[
GPUResultHolder
])
->
[
ResultHolder
]
{
// guard let interRes = paddleMobileRes.intermediateResults else {
// guard let interRes = paddleMobileRes.intermediateResults else {
// fatalError(" need have inter result ")
// fatalError(" need have inter result ")
...
...
metal/paddle-mobile-demo/paddle-mobile-demo/Net/MobilenetSSD_AR.swift
浏览文件 @
8dee56c8
...
@@ -39,11 +39,11 @@ public class MobileNet_ssd_AR: Net {
...
@@ -39,11 +39,11 @@ public class MobileNet_ssd_AR: Net {
}
}
}
}
override
public
func
resultStr
(
res
:
ResultHolder
)
->
String
{
override
public
func
resultStr
(
res
:
[
ResultHolder
]
)
->
String
{
return
"
\(
res
.
result
[
0
]
)
"
return
"
\(
res
[
0
]
.
result
[
0
]
)
"
}
}
override
public
func
fetchResult
(
paddleMobileRes
:
GPUResultHolder
)
->
ResultHolder
{
override
public
func
fetchResult
(
paddleMobileRes
:
[
GPUResultHolder
])
->
[
ResultHolder
]
{
fatalError
()
fatalError
()
// guard let interRes = paddleMobileRes.intermediateResults else {
// guard let interRes = paddleMobileRes.intermediateResults else {
// fatalError(" need have inter result ")
// fatalError(" need have inter result ")
...
...
metal/paddle-mobile-demo/paddle-mobile-demo/Net/YoloNet.swift
浏览文件 @
8dee56c8
...
@@ -27,8 +27,8 @@ public class YoloNet: Net {
...
@@ -27,8 +27,8 @@ public class YoloNet: Net {
// metalLibPath = Bundle.main.path(forResource: "PaddleMobileMetal", ofType: "metallib") ?! " can't be nil "
// metalLibPath = Bundle.main.path(forResource: "PaddleMobileMetal", ofType: "metallib") ?! " can't be nil "
}
}
override
public
func
resultStr
(
res
:
ResultHolder
)
->
String
{
override
public
func
resultStr
(
res
:
[
ResultHolder
]
)
->
String
{
return
"
\(
res
.
result
[
0
]
)
... "
return
"
\(
res
[
0
]
.
result
[
0
]
)
... "
}
}
}
}
metal/paddle-mobile-demo/paddle-mobile-demo/OCInterface/PaddleMobileGPU.h
浏览文件 @
8dee56c8
...
@@ -26,6 +26,8 @@ typedef enum : NSUInteger {
...
@@ -26,6 +26,8 @@ typedef enum : NSUInteger {
@property
(
assign
,
nonatomic
)
int
outputSize
;
@property
(
assign
,
nonatomic
)
int
outputSize
;
@property
(
strong
,
nonatomic
)
NSArray
<
NSNumber
*>*
dim
;
-
(
void
)
releaseOutput
;
-
(
void
)
releaseOutput
;
@end
@end
...
@@ -88,13 +90,13 @@ typedef enum : NSUInteger {
...
@@ -88,13 +90,13 @@ typedef enum : NSUInteger {
* texture: 需要进行预测的图像转换的 texture
* texture: 需要进行预测的图像转换的 texture
* completion: 预测完成回调
* completion: 预测完成回调
*/
*/
-
(
void
)
predict
:(
id
<
MTLTexture
>
)
texture
withCompletion
:(
void
(
^
)(
BOOL
,
NSArray
<
NS
Number
*>
*
))
completion
;
-
(
void
)
predict
:(
id
<
MTLTexture
>
)
texture
withCompletion
:(
void
(
^
)(
BOOL
,
NSArray
<
NS
Array
<
NSNumber
*>
*>
*
))
completion
;
/*
/*
* texture: 需要进行预测的图像转换的 texture
* texture: 需要进行预测的图像转换的 texture
* completion: 预测完成回调
* completion: 预测完成回调
*/
*/
-
(
void
)
predict
:(
id
<
MTLTexture
>
)
texture
withResultCompletion
:(
void
(
^
)(
BOOL
,
PaddleMobileGPUResult
*
))
completion
;
-
(
void
)
predict
:(
id
<
MTLTexture
>
)
texture
withResultCompletion
:(
void
(
^
)(
BOOL
,
NSArray
<
PaddleMobileGPUResult
*>
*
))
completion
;
/*
/*
* 清理内存
* 清理内存
...
...
metal/paddle-mobile-demo/paddle-mobile-demo/OCInterface/PaddleMobileGPU.m
浏览文件 @
8dee56c8
...
@@ -66,24 +66,34 @@
...
@@ -66,24 +66,34 @@
return
[
runner
load
];
return
[
runner
load
];
}
}
-
(
void
)
predict
:(
id
<
MTLTexture
>
)
texture
withCompletion
:(
void
(
^
)(
BOOL
,
NSArray
<
NS
Number
*>
*
))
completion
{
-
(
void
)
predict
:(
id
<
MTLTexture
>
)
texture
withCompletion
:(
void
(
^
)(
BOOL
,
NSArray
<
NS
Array
<
NSNumber
*>
*>
*
))
completion
{
[
runner
predictWithTexture
:
texture
completion
:
^
(
BOOL
success
,
ResultHolder
*
_Nullable
result
)
{
[
runner
predictWithTexture
:
texture
completion
:
^
(
BOOL
success
,
NSArray
<
ResultHolder
*>
*
_Nullable
resultArr
)
{
NSMutableArray
<
NSNumber
*>
*
resultArray
=
[
NSMutableArray
arrayWithCapacity
:
result
.
capacity
];
NSMutableArray
<
NSMutableArray
<
NSNumber
*>*>
*
ocResultArray
=
[
NSMutableArray
arrayWithCapacity
:
resultArr
.
count
];
for
(
int
i
=
0
;
i
<
result
.
capacity
;
++
i
)
{
for
(
int
i
=
0
;
i
<
resultArr
.
count
;
++
i
)
{
[
resultArray
addObject
:[
NSNumber
numberWithFloat
:
result
.
result
[
i
]]];
ResultHolder
*
resultHolder
=
resultArr
[
i
];
NSMutableArray
<
NSNumber
*>*
res
=
[
NSMutableArray
arrayWithCapacity
:
resultHolder
.
capacity
];
for
(
int
j
=
0
;
j
<
resultHolder
.
capacity
;
++
j
)
{
[
res
addObject
:[
NSNumber
numberWithFloat
:
resultHolder
.
result
[
i
]]];
}
[
ocResultArray
addObject
:
res
];
[
resultHolder
releasePointer
];
}
}
completion
(
success
,
resultArray
);
completion
(
success
,
ocResultArray
);
[
result
releasePointer
];
}];
}];
}
}
-
(
void
)
predict
:(
id
<
MTLTexture
>
)
texture
withResultCompletion
:(
void
(
^
)(
BOOL
,
PaddleMobileGPUResult
*
))
completion
{
-
(
void
)
predict
:(
id
<
MTLTexture
>
)
texture
withResultCompletion
:(
void
(
^
)(
BOOL
,
NSArray
<
PaddleMobileGPUResult
*>
*
))
completion
{
[
runner
predictWithTexture
:
texture
completion
:
^
(
BOOL
success
,
ResultHolder
*
_Nullable
result
)
{
[
runner
predictWithTexture
:
texture
completion
:
^
(
BOOL
success
,
NSArray
<
ResultHolder
*>
*
_Nullable
resultArr
)
{
PaddleMobileGPUResult
*
gpuResult
=
[[
PaddleMobileGPUResult
alloc
]
init
];
NSMutableArray
<
PaddleMobileGPUResult
*>
*
ocResultArr
=
[
NSMutableArray
arrayWithCapacity
:
resultArr
.
count
];
[
gpuResult
setOutputResult
:
result
];
for
(
int
i
=
0
;
i
<
resultArr
.
count
;
++
i
)
{
completion
(
success
,
gpuResult
);
ResultHolder
*
result
=
resultArr
[
i
];
PaddleMobileGPUResult
*
gpuResult
=
[[
PaddleMobileGPUResult
alloc
]
init
];
gpuResult
.
dim
=
result
.
dim
;
[
gpuResult
setOutputResult
:
result
];
[
ocResultArr
addObject
:
gpuResult
];
}
completion
(
success
,
ocResultArr
);
}];
}];
}
}
...
...
metal/paddle-mobile-demo/paddle-mobile-demo/OCInterface/SuperResolutionNet.swift
浏览文件 @
8dee56c8
...
@@ -16,7 +16,7 @@ import Foundation
...
@@ -16,7 +16,7 @@ import Foundation
import
paddle_mobile
import
paddle_mobile
@objc
public
class
SuperResolutionNet
:
Net
{
@objc
public
class
SuperResolutionNet
:
Net
{
override
public
func
resultStr
(
res
:
ResultHolder
)
->
String
{
override
public
func
resultStr
(
res
:
[
ResultHolder
]
)
->
String
{
return
"未实现"
return
"未实现"
}
}
...
...
metal/paddle-mobile-demo/paddle-mobile-demo/ViewController.swift
浏览文件 @
8dee56c8
...
@@ -147,7 +147,8 @@ class ViewController: UIViewController {
...
@@ -147,7 +147,8 @@ class ViewController: UIViewController {
fatalError
()
fatalError
()
}
}
if
success
,
let
inResultHolder
=
resultHolder
{
if
success
,
let
inResultHolderArr
=
resultHolder
{
let
inResultHolder
=
inResultHolderArr
[
0
]
if
i
==
max
-
1
{
if
i
==
max
-
1
{
let
time
=
Date
.
init
()
.
timeIntervalSince
(
startDate
)
let
time
=
Date
.
init
()
.
timeIntervalSince
(
startDate
)
...
@@ -160,7 +161,7 @@ class ViewController: UIViewController {
...
@@ -160,7 +161,7 @@ class ViewController: UIViewController {
}
}
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
resultHolder
?
.
releasePointer
()
resultHolder
?
.
first
?
.
releasePointer
()
}
}
}
}
}
}
...
@@ -272,7 +273,7 @@ extension ViewController: VideoCaptureDelegate{
...
@@ -272,7 +273,7 @@ extension ViewController: VideoCaptureDelegate{
runner
.
scaleTexture
(
input
:
texture
)
{
(
scaledTexture
)
in
runner
.
scaleTexture
(
input
:
texture
)
{
(
scaledTexture
)
in
self
.
runner
.
predict
(
texture
:
scaledTexture
,
completion
:
{
(
success
,
resultHolder
)
in
self
.
runner
.
predict
(
texture
:
scaledTexture
,
completion
:
{
(
success
,
resultHolder
)
in
// print(resultHolder!.result![0])
// print(resultHolder!.result![0])
resultHolder
?
.
releasePointer
()
resultHolder
?
.
first
?
.
releasePointer
()
})
})
}
}
}
}
...
...
metal/paddle-mobile/paddle-mobile/API/Net.swift
浏览文件 @
8dee56c8
...
@@ -71,17 +71,20 @@ import Foundation
...
@@ -71,17 +71,20 @@ import Foundation
super
.
init
()
super
.
init
()
}
}
@objc
open
func
resultStr
(
res
:
ResultHolder
)
->
String
{
@objc
open
func
resultStr
(
res
:
[
ResultHolder
]
)
->
String
{
fatalError
()
fatalError
()
}
}
@objc
open
func
fetchResult
(
paddleMobileRes
:
GPUResultHolder
)
->
ResultHolder
{
@objc
open
func
fetchResult
(
paddleMobileRes
:
[
GPUResultHolder
])
->
[
ResultHolder
]
{
guard
let
inResPointer
=
paddleMobileRes
.
resultPointer
else
{
return
paddleMobileRes
.
map
{
(
gpuRes
)
->
ResultHolder
in
fatalError
()
guard
let
inResPointer
=
gpuRes
.
resultPointer
else
{
fatalError
()
}
return
ResultHolder
.
init
(
inResult
:
inResPointer
,
inCapacity
:
paddleMobileRes
.
capacity
,
inDim
:
gpuRes
.
dim
)
}
}
return
ResultHolder
.
init
(
inResult
:
inResPointer
,
inCapacity
:
paddleMobileRes
.
capacity
)
}
}
open
func
updateProgram
(
program
:
Program
)
{
open
func
updateProgram
(
program
:
Program
)
{
}
}
}
}
metal/paddle-mobile/paddle-mobile/API/Runner.swift
浏览文件 @
8dee56c8
...
@@ -18,10 +18,12 @@ import Foundation
...
@@ -18,10 +18,12 @@ import Foundation
@objc
public
class
ResultHolder
:
NSObject
{
@objc
public
class
ResultHolder
:
NSObject
{
@objc
public
let
result
:
UnsafeMutablePointer
<
Float32
>
@objc
public
let
result
:
UnsafeMutablePointer
<
Float32
>
@objc
public
let
capacity
:
Int
@objc
public
let
capacity
:
Int
@objc
public
let
dim
:
[
Int
]
init
(
inResult
:
UnsafeMutablePointer
<
Float32
>
,
inCapacity
:
Int
)
{
init
(
inResult
:
UnsafeMutablePointer
<
Float32
>
,
inCapacity
:
Int
,
inDim
:
[
Int
]
)
{
result
=
inResult
result
=
inResult
capacity
=
inCapacity
capacity
=
inCapacity
dim
=
inDim
}
}
@objc
public
func
releasePointer
()
{
@objc
public
func
releasePointer
()
{
...
@@ -99,7 +101,7 @@ import Foundation
...
@@ -99,7 +101,7 @@ import Foundation
/// - Parameters:
/// - Parameters:
/// - texture: 输入 texture 需要使用 getTexture 获得
/// - texture: 输入 texture 需要使用 getTexture 获得
/// - completion: 结果回调, 当 success 为 true 时 result 不为 nil
/// - completion: 结果回调, 当 success 为 true 时 result 不为 nil
@objc
public
func
predict
(
texture
:
MTLTexture
,
completion
:
@escaping
(
_
success
:
Bool
,
_
result
:
ResultHolder
?)
->
Void
)
{
@objc
public
func
predict
(
texture
:
MTLTexture
,
completion
:
@escaping
(
_
success
:
Bool
,
_
result
:
[
ResultHolder
]
?)
->
Void
)
{
do
{
do
{
try
self
.
executor
?
.
predict
(
input
:
texture
,
dim
:
self
.
net
.
inputDim
,
completionHandle
:
{
[
weak
self
]
(
res
)
in
try
self
.
executor
?
.
predict
(
input
:
texture
,
dim
:
self
.
net
.
inputDim
,
completionHandle
:
{
[
weak
self
]
(
res
)
in
guard
let
SSelf
=
self
else
{
guard
let
SSelf
=
self
else
{
...
...
metal/paddle-mobile/paddle-mobile/Src/Framework/Executor.swift
浏览文件 @
8dee56c8
...
@@ -69,7 +69,7 @@ public class Executor<P: PrecisionType> {
...
@@ -69,7 +69,7 @@ public class Executor<P: PrecisionType> {
}
}
}
}
public
func
predict
(
input
:
MTLTexture
,
dim
:
Dim
,
completionHandle
:
@escaping
(
GPUResultHolder
)
->
Void
,
preProcessKernle
:
CusomKernel
?
=
nil
,
except
:
Int
=
0
)
throws
{
public
func
predict
(
input
:
MTLTexture
,
dim
:
Dim
,
completionHandle
:
@escaping
(
[
GPUResultHolder
]
)
->
Void
,
preProcessKernle
:
CusomKernel
?
=
nil
,
except
:
Int
=
0
)
throws
{
inflightSemaphore
.
wait
()
inflightSemaphore
.
wait
()
guard
let
buffer
=
queue
.
makeCommandBuffer
()
else
{
guard
let
buffer
=
queue
.
makeCommandBuffer
()
else
{
...
@@ -135,7 +135,7 @@ public class Executor<P: PrecisionType> {
...
@@ -135,7 +135,7 @@ public class Executor<P: PrecisionType> {
resultHolder
=
GPUResultHolder
.
init
(
inDim
:
output
.
dim
.
dims
,
inPointer
:
output
.
result
,
inCapacity
:
output
.
capacity
)
resultHolder
=
GPUResultHolder
.
init
(
inDim
:
output
.
dim
.
dims
,
inPointer
:
output
.
result
,
inCapacity
:
output
.
capacity
)
}
}
completionHandle
(
resultHolder
)
completionHandle
(
[
resultHolder
]
)
SSelf
.
inflightSemaphore
.
signal
()
SSelf
.
inflightSemaphore
.
signal
()
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录