Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
dad903fe
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看板
未验证
提交
dad903fe
编写于
4月 17, 2019
作者:
xiebaiyuan
提交者:
GitHub
4月 17, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1557 from loadingArbert/liuqingcan/adaptationXcode10_2
adapter new xcode & remove annotation
上级
8505700f
58dbec77
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
25 addition
and
32 deletion
+25
-32
metal/paddle-mobile-metallib/paddle-mobile-metallib.xcodeproj/project.pbxproj
...metallib/paddle-mobile-metallib.xcodeproj/project.pbxproj
+2
-0
metal/paddle-mobile/paddle-mobile.xcodeproj/project.pbxproj
metal/paddle-mobile/paddle-mobile.xcodeproj/project.pbxproj
+3
-3
metal/paddle-mobile/paddle-mobile/Src/Common/Types.swift
metal/paddle-mobile/paddle-mobile/Src/Common/Types.swift
+11
-25
metal/paddle-mobile/paddle-mobile/Src/Framework/Loader.swift
metal/paddle-mobile/paddle-mobile/Src/Framework/Loader.swift
+3
-2
metal/paddle-mobile/paddle-mobile/Src/Framework/Texture.swift
...l/paddle-mobile/paddle-mobile/Src/Framework/Texture.swift
+3
-1
metal/paddle-mobile/paddle-mobile/Src/Program/ProgramOptimize.swift
...le-mobile/paddle-mobile/Src/Program/ProgramOptimize.swift
+3
-1
未找到文件。
metal/paddle-mobile-metallib/paddle-mobile-metallib.xcodeproj/project.pbxproj
浏览文件 @
dad903fe
...
...
@@ -352,6 +352,7 @@
buildSettings
=
{
CODE_SIGN_STYLE
=
Automatic
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
MTL_LANGUAGE_REVISION
=
iOSMetal10
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
};
name
=
Debug
;
...
...
@@ -362,6 +363,7 @@
buildSettings
=
{
CODE_SIGN_STYLE
=
Automatic
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
MTL_LANGUAGE_REVISION
=
iOSMetal10
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
};
name
=
Release
;
...
...
metal/paddle-mobile/paddle-mobile.xcodeproj/project.pbxproj
浏览文件 @
dad903fe
...
...
@@ -17,9 +17,9 @@
4AA1EA942146661500D0F791
/* ShapeKernel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
4AA1EA932146661500D0F791
/* ShapeKernel.swift */
;
};
4AA1EA982146666500D0F791
/* FlattenOp.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
4AA1EA972146666500D0F791
/* FlattenOp.swift */
;
};
4AA1EAA2214912CD00D0F791
/* FlattenKernel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
4AA1EAA1214912CC00D0F791
/* FlattenKernel.swift */
;
};
C28FE02F21BA68C00054EFAC
/* Metal.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C28FE02C21BA68C00054EFAC
/* Metal.framework */
;
};
C28FE03021BA68C00054EFAC
/* MetalPerformanceShaders.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C28FE02D21BA68C00054EFAC
/* MetalPerformanceShaders.framework */
;
};
C28FE03121BA68C00054EFAC
/* MetalKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C28FE02E21BA68C00054EFAC
/* MetalKit.framework */
;
};
C28FE02F21BA68C00054EFAC
/* Metal.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C28FE02C21BA68C00054EFAC
/* Metal.framework */
;
settings
=
{
ATTRIBUTES
=
(
Weak
,
);
};
};
C28FE03021BA68C00054EFAC
/* MetalPerformanceShaders.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C28FE02D21BA68C00054EFAC
/* MetalPerformanceShaders.framework */
;
settings
=
{
ATTRIBUTES
=
(
Weak
,
);
};
};
C28FE03121BA68C00054EFAC
/* MetalKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C28FE02E21BA68C00054EFAC
/* MetalKit.framework */
;
settings
=
{
ATTRIBUTES
=
(
Weak
,
);
};
};
D3831F70E7E0B565B9AC22DA
/* Pods_paddle_mobile.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD2E06330A1E7129C918DB46
/* Pods_paddle_mobile.framework */
;
};
FC039B6F20E11C3C0081E9F8
/* paddle_mobile.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FC039B6D20E11C3C0081E9F8
/* paddle_mobile.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
FC039B9720E11C9A0081E9F8
/* Extensions.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FC039B9420E11C9A0081E9F8
/* Extensions.swift */
;
};
...
...
metal/paddle-mobile/paddle-mobile/Src/Common/Types.swift
浏览文件 @
dad903fe
...
...
@@ -22,8 +22,6 @@ public protocol SummableMultipliable: Equatable {
}
public
protocol
PrecisionProtocol
:
SummableMultipliable
{
init
(
inFloat
:
Float32
)
init
(
inFloat16
:
Float16
)
init
<
P
:
PrecisionProtocol
>
(
_
inP
:
P
)
static
var
bitSize
:
UInt
{
get
}
static
func
initializeValue
()
->
Self
...
...
@@ -42,11 +40,12 @@ extension Float16: PrecisionProtocol {
}
public
init
<
P
>
(
_
inP
:
P
)
where
P
:
PrecisionProtocol
{
if
P
.
bitSize
==
Float32
.
bitSize
{
self
=
Float16
(
inFloat
:
inP
as!
Float32
)
}
else
if
P
.
bitSize
==
Float16
.
bitSize
{
self
=
inP
as!
Float16
}
else
{
switch
P
.
precisionType
{
case
.
Float32
:
fatalError
()
case
.
Float16
:
self
=
inP
as!
Int16
default
:
fatalError
()
}
}
...
...
@@ -55,12 +54,6 @@ extension Float16: PrecisionProtocol {
return
16
}
public
init
(
inFloat16
:
Float16
)
{
self
=
inFloat16
}
public
init
(
inFloat
:
Float32
)
{
self
=
Int16
(
inFloat
)
}
}
extension
Float32
:
PrecisionProtocol
{
...
...
@@ -74,23 +67,16 @@ extension Float32: PrecisionProtocol {
}
public
init
<
P
>
(
_
inP
:
P
)
where
P
:
PrecisionProtocol
{
if
P
.
bitSize
==
Float32
.
bitSize
{
switch
P
.
precisionType
{
case
.
Float32
:
self
=
inP
as!
Float32
}
else
if
P
.
bitSize
==
Float16
.
bitSize
{
self
=
Float32
.
init
(
inP
as!
Float16
)
}
else
{
case
.
Float16
:
self
=
Float32
.
init
(
Int32
.
init
(
inP
as!
Int16
)
)
default
:
fatalError
()
}
}
public
init
(
inFloat
:
Float32
)
{
self
=
inFloat
}
public
init
(
inFloat16
:
Float16
)
{
self
=
Float32
.
init
(
inFloat16
)
}
public
static
var
bitSize
:
UInt
{
return
32
}
...
...
metal/paddle-mobile/paddle-mobile/Src/Framework/Loader.swift
浏览文件 @
dad903fe
...
...
@@ -161,8 +161,9 @@ public class Loader<P: PrecisionProtocol>: Loaderable{
let
programDesc
=
ProgramOptimize
<
P
>.
init
()
.
optimize
(
originProgramDesc
:
originProgramDesc
)
// let programDesc = PMProgramDesc.init(protoProgram: protoProgram)
print
(
programDesc
)
if
GlobalConfig
.
shared
.
debug
{
print
(
programDesc
)
}
guard
programDesc
.
blocks
.
count
>
0
else
{
throw
PaddleMobileError
.
loaderError
(
message
:
"count of blocks must greater than 0"
)
...
...
metal/paddle-mobile/paddle-mobile/Src/Framework/Texture.swift
浏览文件 @
dad903fe
...
...
@@ -165,7 +165,9 @@ public class Texture: Tensorial {
// 初始化时 dim padToFourDim 模型中的维度(一般来说 nchw),前面补全0
init
(
device
:
MTLDevice
,
inDim
:
Dim
)
{
print
(
" in dim >
\(
inDim
)
"
)
if
GlobalConfig
.
shared
.
debug
{
print
(
" in dim >
\(
inDim
)
"
)
}
var
fourDim
:
Dim
if
inDim
.
cout
()
==
4
{
fourDim
=
inDim
...
...
metal/paddle-mobile/paddle-mobile/Src/Program/ProgramOptimize.swift
浏览文件 @
dad903fe
...
...
@@ -203,7 +203,9 @@ class ProgramOptimize<P: PrecisionProtocol> {
var
typeMapNodes
:
[
String
:
[(
node
:
Node
,
output
:
[
String
:
Node
])]]
=
[:]
let
block
=
originProgramDesc
.
blocks
[
0
]
for
opDesc
in
block
.
ops
{
print
(
opDesc
.
type
)
if
GlobalConfig
.
shared
.
debug
{
print
(
opDesc
.
type
)
}
guard
let
opInputKeys
=
opInfos
[
opDesc
.
type
]?
.
inputs
,
let
outputKeys
=
opInfos
[
opDesc
.
type
]?
.
outputs
else
{
fatalError
()
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录