diff --git a/.gitignore b/.gitignore index 8c4450181d82116620d880c93789dee9dcda9d73..8e4725d6ac91a4680c78ebf0e03a867521ba93d2 100644 --- a/.gitignore +++ b/.gitignore @@ -93,3 +93,6 @@ metal/paddle-mobile/paddle-mobile/CPU/libpaddle-mobile.a *.xcuserdatad/ */xcuserdata/ /venv/ + +metal/paddle-mobile-demo/paddle-mobile-demo/images +metal/paddle-mobile-demo/paddle-mobile-demo/models diff --git a/metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj b/metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj index d6114880efcaf528bd26fcda11e08ec68d943575..e5ee139c38efb6e2236ef05827cdb4ea3beb053e 100644 --- a/metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj +++ b/metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj @@ -8,6 +8,232 @@ /* Begin PBXBuildFile section */ 30D0ED21F392CFA3885B1002 /* Pods_paddle_mobile_demo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18896810981724F8A0FED62A /* Pods_paddle_mobile_demo.framework */; }; + C2A7541F219EF62800DF4209 /* params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75339219EF62700DF4209 /* params */; }; + C2A75420219EF62800DF4209 /* model in Resources */ = {isa = PBXBuildFile; fileRef = C2A7533A219EF62700DF4209 /* model */; }; + C2A75421219EF62800DF4209 /* combined_mobilenet_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A7533D219EF62700DF4209 /* combined_mobilenet_params */; }; + C2A75422219EF62800DF4209 /* combined_mobilenet_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A7533E219EF62700DF4209 /* combined_mobilenet_model */; }; + C2A75423219EF62800DF4209 /* yolo_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75340219EF62700DF4209 /* yolo_params */; }; + C2A75424219EF62800DF4209 /* yolo_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A75341219EF62700DF4209 /* yolo_model */; }; + C2A75425219EF62800DF4209 /* genet_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75343219EF62700DF4209 /* genet_params */; }; + C2A75426219EF62800DF4209 /* genet_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A75344219EF62700DF4209 /* genet_model */; }; + C2A75427219EF62800DF4209 /* superresoltion_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75346219EF62700DF4209 /* superresoltion_params */; }; + C2A75428219EF62800DF4209 /* superresoltion_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A75347219EF62700DF4209 /* superresoltion_model */; }; + C2A75429219EF62800DF4209 /* ssd_hand_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75349219EF62700DF4209 /* ssd_hand_params */; }; + C2A7542A219EF62800DF4209 /* ssd_hand_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A7534A219EF62700DF4209 /* ssd_hand_model */; }; + C2A7542B219EF62800DF4209 /* mobilenet in Resources */ = {isa = PBXBuildFile; fileRef = C2A7534C219EF62700DF4209 /* mobilenet */; }; + C2A7542C219EF62800DF4209 /* params in Resources */ = {isa = PBXBuildFile; fileRef = C2A7534D219EF62700DF4209 /* params */; }; + C2A7542D219EF62800DF4209 /* model in Resources */ = {isa = PBXBuildFile; fileRef = C2A7534E219EF62700DF4209 /* model */; }; + C2A7542E219EF62800DF4209 /* yolo in Resources */ = {isa = PBXBuildFile; fileRef = C2A7534F219EF62700DF4209 /* yolo */; }; + C2A7542F219EF62800DF4209 /* params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75351219EF62700DF4209 /* params */; }; + C2A75430219EF62800DF4209 /* model in Resources */ = {isa = PBXBuildFile; fileRef = C2A75352219EF62700DF4209 /* model */; }; + C2A75431219EF62800DF4209 /* batch_norm_7.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75354219EF62700DF4209 /* batch_norm_7.w_0 */; }; + C2A75432219EF62800DF4209 /* batch_norm_26.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75355219EF62700DF4209 /* batch_norm_26.b_0 */; }; + C2A75433219EF62800DF4209 /* batch_norm_32.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75356219EF62700DF4209 /* batch_norm_32.b_0 */; }; + C2A75434219EF62800DF4209 /* conv2d_16.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75357219EF62700DF4209 /* conv2d_16.w_0 */; }; + C2A75435219EF62800DF4209 /* batch_norm_15.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75358219EF62700DF4209 /* batch_norm_15.w_2 */; }; + C2A75436219EF62800DF4209 /* batch_norm_29.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75359219EF62700DF4209 /* batch_norm_29.w_2 */; }; + C2A75437219EF62800DF4209 /* batch_norm_4.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535A219EF62700DF4209 /* batch_norm_4.w_1 */; }; + C2A75438219EF62800DF4209 /* batch_norm_5.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535B219EF62700DF4209 /* batch_norm_5.w_1 */; }; + C2A75439219EF62800DF4209 /* batch_norm_28.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535C219EF62700DF4209 /* batch_norm_28.w_2 */; }; + C2A7543A219EF62800DF4209 /* batch_norm_14.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535D219EF62700DF4209 /* batch_norm_14.w_2 */; }; + C2A7543B219EF62800DF4209 /* conv2d_17.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535E219EF62700DF4209 /* conv2d_17.w_0 */; }; + C2A7543C219EF62800DF4209 /* batch_norm_33.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535F219EF62700DF4209 /* batch_norm_33.b_0 */; }; + C2A7543D219EF62800DF4209 /* batch_norm_27.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75360219EF62700DF4209 /* batch_norm_27.b_0 */; }; + C2A7543E219EF62800DF4209 /* batch_norm_6.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75361219EF62700DF4209 /* batch_norm_6.w_0 */; }; + C2A7543F219EF62800DF4209 /* batch_norm_4.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75362219EF62700DF4209 /* batch_norm_4.w_0 */; }; + C2A75440219EF62800DF4209 /* depthwise_conv2d_9.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75363219EF62700DF4209 /* depthwise_conv2d_9.w_0 */; }; + C2A75441219EF62800DF4209 /* batch_norm_31.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75364219EF62700DF4209 /* batch_norm_31.b_0 */; }; + C2A75442219EF62800DF4209 /* conv2d_29.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75365219EF62700DF4209 /* conv2d_29.w_0 */; }; + C2A75443219EF62800DF4209 /* batch_norm_25.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75366219EF62700DF4209 /* batch_norm_25.b_0 */; }; + C2A75444219EF62800DF4209 /* conv2d_15.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75367219EF62700DF4209 /* conv2d_15.w_0 */; }; + C2A75445219EF62800DF4209 /* batch_norm_19.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75368219EF62700DF4209 /* batch_norm_19.b_0 */; }; + C2A75446219EF62800DF4209 /* batch_norm_16.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75369219EF62700DF4209 /* batch_norm_16.w_2 */; }; + C2A75447219EF62800DF4209 /* __model__ in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536A219EF62700DF4209 /* __model__ */; }; + C2A75448219EF62800DF4209 /* batch_norm_7.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536B219EF62700DF4209 /* batch_norm_7.w_1 */; }; + C2A75449219EF62800DF4209 /* batch_norm_6.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536C219EF62700DF4209 /* batch_norm_6.w_1 */; }; + C2A7544A219EF62800DF4209 /* batch_norm_17.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536D219EF62700DF4209 /* batch_norm_17.w_2 */; }; + C2A7544B219EF62800DF4209 /* conv2d_14.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536E219EF62700DF4209 /* conv2d_14.w_0 */; }; + C2A7544C219EF62800DF4209 /* batch_norm_18.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536F219EF62700DF4209 /* batch_norm_18.b_0 */; }; + C2A7544D219EF62800DF4209 /* conv2d_28.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75370219EF62700DF4209 /* conv2d_28.w_0 */; }; + C2A7544E219EF62800DF4209 /* batch_norm_24.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75371219EF62700DF4209 /* batch_norm_24.b_0 */; }; + C2A7544F219EF62800DF4209 /* batch_norm_30.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75372219EF62700DF4209 /* batch_norm_30.b_0 */; }; + C2A75450219EF62800DF4209 /* depthwise_conv2d_8.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75373219EF62700DF4209 /* depthwise_conv2d_8.w_0 */; }; + C2A75451219EF62800DF4209 /* batch_norm_5.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75374219EF62700DF4209 /* batch_norm_5.w_0 */; }; + C2A75452219EF62800DF4209 /* batch_norm_1.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75375219EF62700DF4209 /* batch_norm_1.w_0 */; }; + C2A75453219EF62800DF4209 /* conv2d_10.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75376219EF62700DF4209 /* conv2d_10.w_0 */; }; + C2A75454219EF62800DF4209 /* batch_norm_34.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75377219EF62700DF4209 /* batch_norm_34.b_0 */; }; + C2A75455219EF62800DF4209 /* batch_norm_20.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75378219EF62700DF4209 /* batch_norm_20.b_0 */; }; + C2A75456219EF62800DF4209 /* batch_norm_13.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75379219EF62700DF4209 /* batch_norm_13.w_2 */; }; + C2A75457219EF62800DF4209 /* batch_norm_2.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537A219EF62700DF4209 /* batch_norm_2.w_1 */; }; + C2A75458219EF62800DF4209 /* batch_norm_3.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537B219EF62700DF4209 /* batch_norm_3.w_1 */; }; + C2A75459219EF62800DF4209 /* batch_norm_12.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537C219EF62700DF4209 /* batch_norm_12.w_2 */; }; + C2A7545A219EF62800DF4209 /* batch_norm_21.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537D219EF62700DF4209 /* batch_norm_21.b_0 */; }; + C2A7545B219EF62800DF4209 /* conv2d_11.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537E219EF62700DF4209 /* conv2d_11.w_0 */; }; + C2A7545C219EF62800DF4209 /* batch_norm_0.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537F219EF62700DF4209 /* batch_norm_0.w_0 */; }; + C2A7545D219EF62800DF4209 /* batch_norm_2.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75380219EF62700DF4209 /* batch_norm_2.w_0 */; }; + C2A7545E219EF62800DF4209 /* conv2d_13.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75381219EF62700DF4209 /* conv2d_13.w_0 */; }; + C2A7545F219EF62800DF4209 /* batch_norm_23.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75382219EF62700DF4209 /* batch_norm_23.b_0 */; }; + C2A75460219EF62800DF4209 /* batch_norm_10.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75383219EF62700DF4209 /* batch_norm_10.w_2 */; }; + C2A75461219EF62800DF4209 /* batch_norm_1.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75384219EF62700DF4209 /* batch_norm_1.w_1 */; }; + C2A75462219EF62800DF4209 /* batch_norm_0.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75385219EF62700DF4209 /* batch_norm_0.w_1 */; }; + C2A75463219EF62800DF4209 /* batch_norm_11.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75386219EF62700DF4209 /* batch_norm_11.w_2 */; }; + C2A75464219EF62800DF4209 /* batch_norm_22.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75387219EF62700DF4209 /* batch_norm_22.b_0 */; }; + C2A75465219EF62800DF4209 /* conv2d_12.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75388219EF62700DF4209 /* conv2d_12.w_0 */; }; + C2A75466219EF62800DF4209 /* batch_norm_3.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75389219EF62700DF4209 /* batch_norm_3.w_0 */; }; + C2A75467219EF62800DF4209 /* batch_norm_21.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538A219EF62700DF4209 /* batch_norm_21.w_1 */; }; + C2A75468219EF62800DF4209 /* batch_norm_3.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538B219EF62700DF4209 /* batch_norm_3.b_0 */; }; + C2A75469219EF62800DF4209 /* batch_norm_22.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538C219EF62700DF4209 /* batch_norm_22.w_0 */; }; + C2A7546A219EF62800DF4209 /* batch_norm_23.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538D219EF62700DF4209 /* batch_norm_23.w_0 */; }; + C2A7546B219EF62800DF4209 /* batch_norm_2.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538E219EF62700DF4209 /* batch_norm_2.b_0 */; }; + C2A7546C219EF62800DF4209 /* batch_norm_20.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538F219EF62700DF4209 /* batch_norm_20.w_1 */; }; + C2A7546D219EF62800DF4209 /* batch_norm_34.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75390219EF62700DF4209 /* batch_norm_34.w_1 */; }; + C2A7546E219EF62800DF4209 /* batch_norm_22.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75391219EF62700DF4209 /* batch_norm_22.w_1 */; }; + C2A7546F219EF62800DF4209 /* batch_norm_0.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75392219EF62700DF4209 /* batch_norm_0.b_0 */; }; + C2A75470219EF62800DF4209 /* batch_norm_21.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75393219EF62700DF4209 /* batch_norm_21.w_0 */; }; + C2A75471219EF62800DF4209 /* batch_norm_20.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75394219EF62700DF4209 /* batch_norm_20.w_0 */; }; + C2A75472219EF62800DF4209 /* batch_norm_34.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75395219EF62700DF4209 /* batch_norm_34.w_0 */; }; + C2A75473219EF62800DF4209 /* batch_norm_1.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75396219EF62700DF4209 /* batch_norm_1.b_0 */; }; + C2A75474219EF62800DF4209 /* batch_norm_23.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75397219EF62700DF4209 /* batch_norm_23.w_1 */; }; + C2A75475219EF62800DF4209 /* batch_norm_27.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75398219EF62700DF4209 /* batch_norm_27.w_1 */; }; + C2A75476219EF62800DF4209 /* batch_norm_33.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75399219EF62700DF4209 /* batch_norm_33.w_1 */; }; + C2A75477219EF62800DF4209 /* batch_norm_5.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539A219EF62700DF4209 /* batch_norm_5.b_0 */; }; + C2A75478219EF62800DF4209 /* batch_norm_18.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539B219EF62700DF4209 /* batch_norm_18.w_0 */; }; + C2A75479219EF62800DF4209 /* batch_norm_30.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539C219EF62700DF4209 /* batch_norm_30.w_0 */; }; + C2A7547A219EF62800DF4209 /* batch_norm_24.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539D219EF62700DF4209 /* batch_norm_24.w_0 */; }; + C2A7547B219EF62800DF4209 /* conv2d_28.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539E219EF62700DF4209 /* conv2d_28.b_0 */; }; + C2A7547C219EF62800DF4209 /* batch_norm_25.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539F219EF62700DF4209 /* batch_norm_25.w_0 */; }; + C2A7547D219EF62800DF4209 /* conv2d_29.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A0219EF62700DF4209 /* conv2d_29.b_0 */; }; + C2A7547E219EF62800DF4209 /* batch_norm_31.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A1219EF62700DF4209 /* batch_norm_31.w_0 */; }; + C2A7547F219EF62800DF4209 /* batch_norm_19.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A2219EF62700DF4209 /* batch_norm_19.w_0 */; }; + C2A75480219EF62800DF4209 /* batch_norm_4.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A3219EF62700DF4209 /* batch_norm_4.b_0 */; }; + C2A75481219EF62800DF4209 /* batch_norm_32.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A4219EF62700DF4209 /* batch_norm_32.w_1 */; }; + C2A75482219EF62800DF4209 /* batch_norm_26.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A5219EF62700DF4209 /* batch_norm_26.w_1 */; }; + C2A75483219EF62800DF4209 /* batch_norm_30.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A6219EF62700DF4209 /* batch_norm_30.w_1 */; }; + C2A75484219EF62800DF4209 /* batch_norm_24.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A7219EF62700DF4209 /* batch_norm_24.w_1 */; }; + C2A75485219EF62800DF4209 /* batch_norm_18.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A8219EF62700DF4209 /* batch_norm_18.w_1 */; }; + C2A75486219EF62800DF4209 /* batch_norm_6.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A9219EF62700DF4209 /* batch_norm_6.b_0 */; }; + C2A75487219EF62800DF4209 /* batch_norm_9.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AA219EF62700DF4209 /* batch_norm_9.w_2 */; }; + C2A75488219EF62800DF4209 /* conv2d_8.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AB219EF62700DF4209 /* conv2d_8.w_0 */; }; + C2A75489219EF62800DF4209 /* batch_norm_27.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AC219EF62700DF4209 /* batch_norm_27.w_0 */; }; + C2A7548A219EF62800DF4209 /* batch_norm_33.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AD219EF62700DF4209 /* batch_norm_33.w_0 */; }; + C2A7548B219EF62800DF4209 /* batch_norm_32.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AE219EF62700DF4209 /* batch_norm_32.w_0 */; }; + C2A7548C219EF62800DF4209 /* conv2d_9.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AF219EF62700DF4209 /* conv2d_9.w_0 */; }; + C2A7548D219EF62800DF4209 /* batch_norm_26.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B0219EF62700DF4209 /* batch_norm_26.w_0 */; }; + C2A7548E219EF62800DF4209 /* batch_norm_8.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B1219EF62700DF4209 /* batch_norm_8.w_2 */; }; + C2A7548F219EF62800DF4209 /* batch_norm_7.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B2219EF62700DF4209 /* batch_norm_7.b_0 */; }; + C2A75490219EF62800DF4209 /* batch_norm_19.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B3219EF62700DF4209 /* batch_norm_19.w_1 */; }; + C2A75491219EF62800DF4209 /* batch_norm_25.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B4219EF62700DF4209 /* batch_norm_25.w_1 */; }; + C2A75492219EF62800DF4209 /* batch_norm_31.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B5219EF62700DF4209 /* batch_norm_31.w_1 */; }; + C2A75493219EF62800DF4209 /* batch_norm_28.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B6219EF62700DF4209 /* batch_norm_28.w_1 */; }; + C2A75494219EF62800DF4209 /* batch_norm_14.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B7219EF62700DF4209 /* batch_norm_14.w_1 */; }; + C2A75495219EF62800DF4209 /* batch_norm_5.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B8219EF62700DF4209 /* batch_norm_5.w_2 */; }; + C2A75496219EF62800DF4209 /* batch_norm_17.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B9219EF62700DF4209 /* batch_norm_17.w_0 */; }; + C2A75497219EF62800DF4209 /* conv2d_33.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BA219EF62700DF4209 /* conv2d_33.b_0 */; }; + C2A75498219EF62800DF4209 /* conv2d_27.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BB219EF62700DF4209 /* conv2d_27.b_0 */; }; + C2A75499219EF62800DF4209 /* conv2d_4.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BC219EF62700DF4209 /* conv2d_4.w_0 */; }; + C2A7549A219EF62800DF4209 /* conv2d_5.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BD219EF62700DF4209 /* conv2d_5.w_0 */; }; + C2A7549B219EF62800DF4209 /* conv2d_26.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BE219EF62700DF4209 /* conv2d_26.b_0 */; }; + C2A7549C219EF62800DF4209 /* conv2d_32.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BF219EF62700DF4209 /* conv2d_32.b_0 */; }; + C2A7549D219EF62800DF4209 /* batch_norm_16.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C0219EF62700DF4209 /* batch_norm_16.w_0 */; }; + C2A7549E219EF62800DF4209 /* batch_norm_4.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C1219EF62700DF4209 /* batch_norm_4.w_2 */; }; + C2A7549F219EF62800DF4209 /* batch_norm_15.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C2219EF62700DF4209 /* batch_norm_15.w_1 */; }; + C2A754A0219EF62800DF4209 /* batch_norm_29.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C3219EF62700DF4209 /* batch_norm_29.w_1 */; }; + C2A754A1219EF62800DF4209 /* batch_norm_17.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C4219EF62700DF4209 /* batch_norm_17.w_1 */; }; + C2A754A2219EF62800DF4209 /* batch_norm_9.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C5219EF62700DF4209 /* batch_norm_9.b_0 */; }; + C2A754A3219EF62800DF4209 /* batch_norm_6.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C6219EF62700DF4209 /* batch_norm_6.w_2 */; }; + C2A754A4219EF62800DF4209 /* batch_norm_14.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C7219EF62700DF4209 /* batch_norm_14.w_0 */; }; + C2A754A5219EF62800DF4209 /* batch_norm_28.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C8219EF62700DF4209 /* batch_norm_28.w_0 */; }; + C2A754A6219EF62800DF4209 /* conv2d_24.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C9219EF62700DF4209 /* conv2d_24.b_0 */; }; + C2A754A7219EF62800DF4209 /* conv2d_7.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CA219EF62700DF4209 /* conv2d_7.w_0 */; }; + C2A754A8219EF62800DF4209 /* conv2d_30.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CB219EF62700DF4209 /* conv2d_30.b_0 */; }; + C2A754A9219EF62800DF4209 /* conv2d_31.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CC219EF62700DF4209 /* conv2d_31.b_0 */; }; + C2A754AA219EF62800DF4209 /* batch_norm_29.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CD219EF62700DF4209 /* batch_norm_29.w_0 */; }; + C2A754AB219EF62800DF4209 /* conv2d_6.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CE219EF62700DF4209 /* conv2d_6.w_0 */; }; + C2A754AC219EF62800DF4209 /* conv2d_25.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CF219EF62700DF4209 /* conv2d_25.b_0 */; }; + C2A754AD219EF62800DF4209 /* batch_norm_15.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D0219EF62700DF4209 /* batch_norm_15.w_0 */; }; + C2A754AE219EF62800DF4209 /* batch_norm_7.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D1219EF62700DF4209 /* batch_norm_7.w_2 */; }; + C2A754AF219EF62800DF4209 /* batch_norm_8.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D2219EF62700DF4209 /* batch_norm_8.b_0 */; }; + C2A754B0219EF62800DF4209 /* batch_norm_16.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D3219EF62700DF4209 /* batch_norm_16.w_1 */; }; + C2A754B1219EF62800DF4209 /* batch_norm_12.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D4219EF62700DF4209 /* batch_norm_12.w_1 */; }; + C2A754B2219EF62800DF4209 /* batch_norm_3.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D5219EF62700DF4209 /* batch_norm_3.w_2 */; }; + C2A754B3219EF62800DF4209 /* conv2d_2.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D6219EF62700DF4209 /* conv2d_2.w_0 */; }; + C2A754B4219EF62800DF4209 /* batch_norm_11.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D7219EF62700DF4209 /* batch_norm_11.w_0 */; }; + C2A754B5219EF62800DF4209 /* batch_norm_10.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D8219EF62700DF4209 /* batch_norm_10.w_0 */; }; + C2A754B6219EF62800DF4209 /* conv2d_3.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D9219EF62700DF4209 /* conv2d_3.w_0 */; }; + C2A754B7219EF62800DF4209 /* batch_norm_2.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DA219EF62700DF4209 /* batch_norm_2.w_2 */; }; + C2A754B8219EF62800DF4209 /* depthwise_conv2d_12.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DB219EF62700DF4209 /* depthwise_conv2d_12.w_0 */; }; + C2A754B9219EF62800DF4209 /* batch_norm_13.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DC219EF62700DF4209 /* batch_norm_13.w_1 */; }; + C2A754BA219EF62800DF4209 /* batch_norm_11.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DD219EF62700DF4209 /* batch_norm_11.w_1 */; }; + C2A754BB219EF62800DF4209 /* depthwise_conv2d_10.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DE219EF62700DF4209 /* depthwise_conv2d_10.w_0 */; }; + C2A754BC219EF62800DF4209 /* batch_norm_0.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DF219EF62700DF4209 /* batch_norm_0.w_2 */; }; + C2A754BD219EF62800DF4209 /* conv2d_22.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E0219EF62700DF4209 /* conv2d_22.b_0 */; }; + C2A754BE219EF62800DF4209 /* conv2d_1.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E1219EF62700DF4209 /* conv2d_1.w_0 */; }; + C2A754BF219EF62800DF4209 /* batch_norm_12.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E2219EF62700DF4209 /* batch_norm_12.w_0 */; }; + C2A754C0219EF62800DF4209 /* batch_norm_13.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E3219EF62700DF4209 /* batch_norm_13.w_0 */; }; + C2A754C1219EF62800DF4209 /* conv2d_0.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E4219EF62700DF4209 /* conv2d_0.w_0 */; }; + C2A754C2219EF62800DF4209 /* conv2d_23.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E5219EF62700DF4209 /* conv2d_23.b_0 */; }; + C2A754C3219EF62800DF4209 /* batch_norm_1.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E6219EF62700DF4209 /* batch_norm_1.w_2 */; }; + C2A754C4219EF62800DF4209 /* batch_norm_10.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E7219EF62700DF4209 /* batch_norm_10.w_1 */; }; + C2A754C5219EF62800DF4209 /* depthwise_conv2d_11.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E8219EF62700DF4209 /* depthwise_conv2d_11.w_0 */; }; + C2A754C6219EF62800DF4209 /* depthwise_conv2d_3.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E9219EF62700DF4209 /* depthwise_conv2d_3.w_0 */; }; + C2A754C7219EF62800DF4209 /* batch_norm_13.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753EA219EF62700DF4209 /* batch_norm_13.b_0 */; }; + C2A754C8219EF62800DF4209 /* conv2d_23.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753EB219EF62700DF4209 /* conv2d_23.w_0 */; }; + C2A754C9219EF62800DF4209 /* batch_norm_20.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753EC219EF62700DF4209 /* batch_norm_20.w_2 */; }; + C2A754CA219EF62800DF4209 /* batch_norm_34.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753ED219EF62700DF4209 /* batch_norm_34.w_2 */; }; + C2A754CB219EF62800DF4209 /* batch_norm_21.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753EE219EF62700DF4209 /* batch_norm_21.w_2 */; }; + C2A754CC219EF62800DF4209 /* conv2d_22.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753EF219EF62700DF4209 /* conv2d_22.w_0 */; }; + C2A754CD219EF62800DF4209 /* batch_norm_12.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F0219EF62700DF4209 /* batch_norm_12.b_0 */; }; + C2A754CE219EF62800DF4209 /* depthwise_conv2d_2.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F1219EF62700DF4209 /* depthwise_conv2d_2.w_0 */; }; + C2A754CF219EF62800DF4209 /* depthwise_conv2d_0.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F2219EF62700DF4209 /* depthwise_conv2d_0.w_0 */; }; + C2A754D0219EF62800DF4209 /* batch_norm_10.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F3219EF62700DF4209 /* batch_norm_10.b_0 */; }; + C2A754D1219EF62800DF4209 /* conv2d_20.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F4219EF62700DF4209 /* conv2d_20.w_0 */; }; + C2A754D2219EF62800DF4209 /* batch_norm_23.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F5219EF62700DF4209 /* batch_norm_23.w_2 */; }; + C2A754D3219EF62800DF4209 /* batch_norm_22.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F6219EF62700DF4209 /* batch_norm_22.w_2 */; }; + C2A754D4219EF62800DF4209 /* conv2d_21.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F7219EF62700DF4209 /* conv2d_21.w_0 */; }; + C2A754D5219EF62800DF4209 /* batch_norm_11.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F8219EF62700DF4209 /* batch_norm_11.b_0 */; }; + C2A754D6219EF62800DF4209 /* depthwise_conv2d_1.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F9219EF62700DF4209 /* depthwise_conv2d_1.w_0 */; }; + C2A754D7219EF62800DF4209 /* depthwise_conv2d_5.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FA219EF62700DF4209 /* depthwise_conv2d_5.w_0 */; }; + C2A754D8219EF62800DF4209 /* batch_norm_8.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FB219EF62700DF4209 /* batch_norm_8.w_0 */; }; + C2A754D9219EF62800DF4209 /* conv2d_25.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FC219EF62700DF4209 /* conv2d_25.w_0 */; }; + C2A754DA219EF62800DF4209 /* batch_norm_29.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FD219EF62700DF4209 /* batch_norm_29.b_0 */; }; + C2A754DB219EF62800DF4209 /* conv2d_31.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FE219EF62700DF4209 /* conv2d_31.w_0 */; }; + C2A754DC219EF62800DF4209 /* conv2d_19.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FF219EF62700DF4209 /* conv2d_19.w_0 */; }; + C2A754DD219EF62800DF4209 /* batch_norm_15.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75400219EF62700DF4209 /* batch_norm_15.b_0 */; }; + C2A754DE219EF62800DF4209 /* batch_norm_32.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75401219EF62700DF4209 /* batch_norm_32.w_2 */; }; + C2A754DF219EF62800DF4209 /* batch_norm_26.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75402219EF62700DF4209 /* batch_norm_26.w_2 */; }; + C2A754E0219EF62800DF4209 /* batch_norm_27.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75403219EF62700DF4209 /* batch_norm_27.w_2 */; }; + C2A754E1219EF62800DF4209 /* batch_norm_33.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75404219EF62700DF4209 /* batch_norm_33.w_2 */; }; + C2A754E2219EF62800DF4209 /* conv2d_18.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75405219EF62700DF4209 /* conv2d_18.w_0 */; }; + C2A754E3219EF62800DF4209 /* batch_norm_14.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75406219EF62700DF4209 /* batch_norm_14.b_0 */; }; + C2A754E4219EF62800DF4209 /* conv2d_30.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75407219EF62700DF4209 /* conv2d_30.w_0 */; }; + C2A754E5219EF62800DF4209 /* conv2d_24.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75408219EF62700DF4209 /* conv2d_24.w_0 */; }; + C2A754E6219EF62800DF4209 /* batch_norm_28.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75409219EF62700DF4209 /* batch_norm_28.b_0 */; }; + C2A754E7219EF62800DF4209 /* batch_norm_9.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540A219EF62700DF4209 /* batch_norm_9.w_0 */; }; + C2A754E8219EF62800DF4209 /* depthwise_conv2d_4.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540B219EF62700DF4209 /* depthwise_conv2d_4.w_0 */; }; + C2A754E9219EF62800DF4209 /* depthwise_conv2d_6.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540C219EF62700DF4209 /* depthwise_conv2d_6.w_0 */; }; + C2A754EA219EF62800DF4209 /* conv2d_32.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540D219EF62700DF4209 /* conv2d_32.w_0 */; }; + C2A754EB219EF62800DF4209 /* conv2d_26.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540E219EF62700DF4209 /* conv2d_26.w_0 */; }; + C2A754EC219EF62800DF4209 /* batch_norm_16.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540F219EF62700DF4209 /* batch_norm_16.b_0 */; }; + C2A754ED219EF62800DF4209 /* batch_norm_19.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75410219EF62700DF4209 /* batch_norm_19.w_2 */; }; + C2A754EE219EF62800DF4209 /* batch_norm_25.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75411219EF62700DF4209 /* batch_norm_25.w_2 */; }; + C2A754EF219EF62800DF4209 /* batch_norm_31.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75412219EF62700DF4209 /* batch_norm_31.w_2 */; }; + C2A754F0219EF62800DF4209 /* batch_norm_8.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75413219EF62700DF4209 /* batch_norm_8.w_1 */; }; + C2A754F1219EF62800DF4209 /* batch_norm_9.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75414219EF62700DF4209 /* batch_norm_9.w_1 */; }; + C2A754F2219EF62800DF4209 /* batch_norm_30.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75415219EF62700DF4209 /* batch_norm_30.w_2 */; }; + C2A754F3219EF62800DF4209 /* batch_norm_24.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75416219EF62700DF4209 /* batch_norm_24.w_2 */; }; + C2A754F4219EF62800DF4209 /* batch_norm_18.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75417219EF62700DF4209 /* batch_norm_18.w_2 */; }; + C2A754F5219EF62800DF4209 /* batch_norm_17.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75418219EF62700DF4209 /* batch_norm_17.b_0 */; }; + C2A754F6219EF62800DF4209 /* conv2d_27.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75419219EF62700DF4209 /* conv2d_27.w_0 */; }; + C2A754F7219EF62800DF4209 /* conv2d_33.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7541A219EF62700DF4209 /* conv2d_33.w_0 */; }; + C2A754F8219EF62800DF4209 /* depthwise_conv2d_7.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7541B219EF62700DF4209 /* depthwise_conv2d_7.w_0 */; }; + C2A754F9219EF62800DF4209 /* ar_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A7541D219EF62700DF4209 /* ar_model */; }; + C2A754FA219EF62800DF4209 /* ar_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A7541E219EF62700DF4209 /* ar_params */; }; + C2CBB49021B778EA0020DC6C /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = FC4FD97B2140EE250073E130 /* libc++.tbd */; }; + C2E33ADE217EB80E0097FDD6 /* synset.txt in Resources */ = {isa = PBXBuildFile; fileRef = C2E339FB217EB80E0097FDD6 /* synset.txt */; }; + C2E33ADF217EB80E0097FDD6 /* banana.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = C2E339FC217EB80E0097FDD6 /* banana.jpeg */; }; + C2E33AE0217EB80E0097FDD6 /* hand.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C2E339FD217EB80E0097FDD6 /* hand.jpg */; }; + C2E33AE1217EB80E0097FDD6 /* iphone.JPG in Resources */ = {isa = PBXBuildFile; fileRef = C2E339FE217EB80E0097FDD6 /* iphone.JPG */; }; + C2E33AE2217EB80E0097FDD6 /* paddle-mobile.png in Resources */ = {isa = PBXBuildFile; fileRef = C2E339FF217EB80E0097FDD6 /* paddle-mobile.png */; }; C2E67E5E21524E460013F575 /* LoadPointerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2E67E5D21524E460013F575 /* LoadPointerViewController.m */; }; FC013928210204A3008100E3 /* PreProcessKernel.metal in Sources */ = {isa = PBXBuildFile; fileRef = FC013927210204A3008100E3 /* PreProcessKernel.metal */; }; FC039B8220E11C550081E9F8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC039B8120E11C550081E9F8 /* AppDelegate.swift */; }; @@ -21,16 +247,6 @@ FCEBEC2C20E1391F00C0B14D /* paddle_mobile.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCEBEC2B20E1391F00C0B14D /* paddle_mobile.framework */; }; FCEBEC2D20E1391F00C0B14D /* paddle_mobile.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = FCEBEC2B20E1391F00C0B14D /* paddle_mobile.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; FCF437E8214B6DDB00943429 /* MultiPredictViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCF437E7214B6DDB00943429 /* MultiPredictViewController.swift */; }; - FCFE9B692152858600DECA15 /* hand.jpg.zip in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B632152858600DECA15 /* hand.jpg.zip */; }; - FCFE9B6A2152858600DECA15 /* synset.txt in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B642152858600DECA15 /* synset.txt */; }; - FCFE9B6B2152858600DECA15 /* banana.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B652152858600DECA15 /* banana.jpeg */; }; - FCFE9B6C2152858600DECA15 /* hand.jpg in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B662152858600DECA15 /* hand.jpg */; }; - FCFE9B6D2152858600DECA15 /* iphone.JPG in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B672152858600DECA15 /* iphone.JPG */; }; - FCFE9B6E2152858600DECA15 /* paddle-mobile.png in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B682152858600DECA15 /* paddle-mobile.png */; }; - FCFE9C512152859600DECA15 /* genet_params in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B752152859500DECA15 /* genet_params */; }; - FCFE9C522152859600DECA15 /* genet_model in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B762152859500DECA15 /* genet_model */; }; - FCFE9D232152859600DECA15 /* ar_model in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9C4C2152859500DECA15 /* ar_model */; }; - FCFE9D242152859600DECA15 /* ar_params in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9C4D2152859500DECA15 /* ar_params */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -51,6 +267,231 @@ 081C9CF10DB06C58B8B6B039 /* Pods-paddle-mobile-demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-paddle-mobile-demo.release.xcconfig"; path = "../Pods/Target Support Files/Pods-paddle-mobile-demo/Pods-paddle-mobile-demo.release.xcconfig"; sourceTree = ""; }; 18896810981724F8A0FED62A /* Pods_paddle_mobile_demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_paddle_mobile_demo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 878829884E1A14D7044721D5 /* Pods-paddle-mobile-demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-paddle-mobile-demo.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-paddle-mobile-demo/Pods-paddle-mobile-demo.debug.xcconfig"; sourceTree = ""; }; + C2A75339219EF62700DF4209 /* params */ = {isa = PBXFileReference; lastKnownFileType = file; path = params; sourceTree = ""; }; + C2A7533A219EF62700DF4209 /* model */ = {isa = PBXFileReference; lastKnownFileType = file; path = model; sourceTree = ""; }; + C2A7533D219EF62700DF4209 /* combined_mobilenet_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = combined_mobilenet_params; sourceTree = ""; }; + C2A7533E219EF62700DF4209 /* combined_mobilenet_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = combined_mobilenet_model; sourceTree = ""; }; + C2A75340219EF62700DF4209 /* yolo_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = yolo_params; sourceTree = ""; }; + C2A75341219EF62700DF4209 /* yolo_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = yolo_model; sourceTree = ""; }; + C2A75343219EF62700DF4209 /* genet_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = genet_params; sourceTree = ""; }; + C2A75344219EF62700DF4209 /* genet_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = genet_model; sourceTree = ""; }; + C2A75346219EF62700DF4209 /* superresoltion_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = superresoltion_params; sourceTree = ""; }; + C2A75347219EF62700DF4209 /* superresoltion_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = superresoltion_model; sourceTree = ""; }; + C2A75349219EF62700DF4209 /* ssd_hand_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = ssd_hand_params; sourceTree = ""; }; + C2A7534A219EF62700DF4209 /* ssd_hand_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = ssd_hand_model; sourceTree = ""; }; + C2A7534C219EF62700DF4209 /* mobilenet */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mobilenet; sourceTree = ""; }; + C2A7534D219EF62700DF4209 /* params */ = {isa = PBXFileReference; lastKnownFileType = file; path = params; sourceTree = ""; }; + C2A7534E219EF62700DF4209 /* model */ = {isa = PBXFileReference; lastKnownFileType = file; path = model; sourceTree = ""; }; + C2A7534F219EF62700DF4209 /* yolo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = yolo; sourceTree = ""; }; + C2A75351219EF62700DF4209 /* params */ = {isa = PBXFileReference; lastKnownFileType = file; path = params; sourceTree = ""; }; + C2A75352219EF62700DF4209 /* model */ = {isa = PBXFileReference; lastKnownFileType = file; path = model; sourceTree = ""; }; + C2A75354219EF62700DF4209 /* batch_norm_7.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_7.w_0; sourceTree = ""; }; + C2A75355219EF62700DF4209 /* batch_norm_26.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_26.b_0; sourceTree = ""; }; + C2A75356219EF62700DF4209 /* batch_norm_32.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_32.b_0; sourceTree = ""; }; + C2A75357219EF62700DF4209 /* conv2d_16.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_16.w_0; sourceTree = ""; }; + C2A75358219EF62700DF4209 /* batch_norm_15.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_15.w_2; sourceTree = ""; }; + C2A75359219EF62700DF4209 /* batch_norm_29.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_29.w_2; sourceTree = ""; }; + C2A7535A219EF62700DF4209 /* batch_norm_4.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_4.w_1; sourceTree = ""; }; + C2A7535B219EF62700DF4209 /* batch_norm_5.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_5.w_1; sourceTree = ""; }; + C2A7535C219EF62700DF4209 /* batch_norm_28.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_28.w_2; sourceTree = ""; }; + C2A7535D219EF62700DF4209 /* batch_norm_14.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_14.w_2; sourceTree = ""; }; + C2A7535E219EF62700DF4209 /* conv2d_17.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_17.w_0; sourceTree = ""; }; + C2A7535F219EF62700DF4209 /* batch_norm_33.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_33.b_0; sourceTree = ""; }; + C2A75360219EF62700DF4209 /* batch_norm_27.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_27.b_0; sourceTree = ""; }; + C2A75361219EF62700DF4209 /* batch_norm_6.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_6.w_0; sourceTree = ""; }; + C2A75362219EF62700DF4209 /* batch_norm_4.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_4.w_0; sourceTree = ""; }; + C2A75363219EF62700DF4209 /* depthwise_conv2d_9.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_9.w_0; sourceTree = ""; }; + C2A75364219EF62700DF4209 /* batch_norm_31.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_31.b_0; sourceTree = ""; }; + C2A75365219EF62700DF4209 /* conv2d_29.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_29.w_0; sourceTree = ""; }; + C2A75366219EF62700DF4209 /* batch_norm_25.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_25.b_0; sourceTree = ""; }; + C2A75367219EF62700DF4209 /* conv2d_15.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_15.w_0; sourceTree = ""; }; + C2A75368219EF62700DF4209 /* batch_norm_19.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_19.b_0; sourceTree = ""; }; + C2A75369219EF62700DF4209 /* batch_norm_16.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_16.w_2; sourceTree = ""; }; + C2A7536A219EF62700DF4209 /* __model__ */ = {isa = PBXFileReference; lastKnownFileType = file; path = __model__; sourceTree = ""; }; + C2A7536B219EF62700DF4209 /* batch_norm_7.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_7.w_1; sourceTree = ""; }; + C2A7536C219EF62700DF4209 /* batch_norm_6.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_6.w_1; sourceTree = ""; }; + C2A7536D219EF62700DF4209 /* batch_norm_17.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_17.w_2; sourceTree = ""; }; + C2A7536E219EF62700DF4209 /* conv2d_14.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_14.w_0; sourceTree = ""; }; + C2A7536F219EF62700DF4209 /* batch_norm_18.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_18.b_0; sourceTree = ""; }; + C2A75370219EF62700DF4209 /* conv2d_28.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_28.w_0; sourceTree = ""; }; + C2A75371219EF62700DF4209 /* batch_norm_24.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_24.b_0; sourceTree = ""; }; + C2A75372219EF62700DF4209 /* batch_norm_30.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_30.b_0; sourceTree = ""; }; + C2A75373219EF62700DF4209 /* depthwise_conv2d_8.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_8.w_0; sourceTree = ""; }; + C2A75374219EF62700DF4209 /* batch_norm_5.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_5.w_0; sourceTree = ""; }; + C2A75375219EF62700DF4209 /* batch_norm_1.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_1.w_0; sourceTree = ""; }; + C2A75376219EF62700DF4209 /* conv2d_10.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_10.w_0; sourceTree = ""; }; + C2A75377219EF62700DF4209 /* batch_norm_34.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_34.b_0; sourceTree = ""; }; + C2A75378219EF62700DF4209 /* batch_norm_20.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_20.b_0; sourceTree = ""; }; + C2A75379219EF62700DF4209 /* batch_norm_13.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_13.w_2; sourceTree = ""; }; + C2A7537A219EF62700DF4209 /* batch_norm_2.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_2.w_1; sourceTree = ""; }; + C2A7537B219EF62700DF4209 /* batch_norm_3.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_3.w_1; sourceTree = ""; }; + C2A7537C219EF62700DF4209 /* batch_norm_12.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_12.w_2; sourceTree = ""; }; + C2A7537D219EF62700DF4209 /* batch_norm_21.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_21.b_0; sourceTree = ""; }; + C2A7537E219EF62700DF4209 /* conv2d_11.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_11.w_0; sourceTree = ""; }; + C2A7537F219EF62700DF4209 /* batch_norm_0.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_0.w_0; sourceTree = ""; }; + C2A75380219EF62700DF4209 /* batch_norm_2.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_2.w_0; sourceTree = ""; }; + C2A75381219EF62700DF4209 /* conv2d_13.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_13.w_0; sourceTree = ""; }; + C2A75382219EF62700DF4209 /* batch_norm_23.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_23.b_0; sourceTree = ""; }; + C2A75383219EF62700DF4209 /* batch_norm_10.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_10.w_2; sourceTree = ""; }; + C2A75384219EF62700DF4209 /* batch_norm_1.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_1.w_1; sourceTree = ""; }; + C2A75385219EF62700DF4209 /* batch_norm_0.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_0.w_1; sourceTree = ""; }; + C2A75386219EF62700DF4209 /* batch_norm_11.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_11.w_2; sourceTree = ""; }; + C2A75387219EF62700DF4209 /* batch_norm_22.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_22.b_0; sourceTree = ""; }; + C2A75388219EF62700DF4209 /* conv2d_12.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_12.w_0; sourceTree = ""; }; + C2A75389219EF62700DF4209 /* batch_norm_3.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_3.w_0; sourceTree = ""; }; + C2A7538A219EF62700DF4209 /* batch_norm_21.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_21.w_1; sourceTree = ""; }; + C2A7538B219EF62700DF4209 /* batch_norm_3.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_3.b_0; sourceTree = ""; }; + C2A7538C219EF62700DF4209 /* batch_norm_22.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_22.w_0; sourceTree = ""; }; + C2A7538D219EF62700DF4209 /* batch_norm_23.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_23.w_0; sourceTree = ""; }; + C2A7538E219EF62700DF4209 /* batch_norm_2.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_2.b_0; sourceTree = ""; }; + C2A7538F219EF62700DF4209 /* batch_norm_20.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_20.w_1; sourceTree = ""; }; + C2A75390219EF62700DF4209 /* batch_norm_34.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_34.w_1; sourceTree = ""; }; + C2A75391219EF62700DF4209 /* batch_norm_22.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_22.w_1; sourceTree = ""; }; + C2A75392219EF62700DF4209 /* batch_norm_0.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_0.b_0; sourceTree = ""; }; + C2A75393219EF62700DF4209 /* batch_norm_21.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_21.w_0; sourceTree = ""; }; + C2A75394219EF62700DF4209 /* batch_norm_20.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_20.w_0; sourceTree = ""; }; + C2A75395219EF62700DF4209 /* batch_norm_34.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_34.w_0; sourceTree = ""; }; + C2A75396219EF62700DF4209 /* batch_norm_1.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_1.b_0; sourceTree = ""; }; + C2A75397219EF62700DF4209 /* batch_norm_23.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_23.w_1; sourceTree = ""; }; + C2A75398219EF62700DF4209 /* batch_norm_27.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_27.w_1; sourceTree = ""; }; + C2A75399219EF62700DF4209 /* batch_norm_33.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_33.w_1; sourceTree = ""; }; + C2A7539A219EF62700DF4209 /* batch_norm_5.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_5.b_0; sourceTree = ""; }; + C2A7539B219EF62700DF4209 /* batch_norm_18.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_18.w_0; sourceTree = ""; }; + C2A7539C219EF62700DF4209 /* batch_norm_30.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_30.w_0; sourceTree = ""; }; + C2A7539D219EF62700DF4209 /* batch_norm_24.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_24.w_0; sourceTree = ""; }; + C2A7539E219EF62700DF4209 /* conv2d_28.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_28.b_0; sourceTree = ""; }; + C2A7539F219EF62700DF4209 /* batch_norm_25.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_25.w_0; sourceTree = ""; }; + C2A753A0219EF62700DF4209 /* conv2d_29.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_29.b_0; sourceTree = ""; }; + C2A753A1219EF62700DF4209 /* batch_norm_31.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_31.w_0; sourceTree = ""; }; + C2A753A2219EF62700DF4209 /* batch_norm_19.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_19.w_0; sourceTree = ""; }; + C2A753A3219EF62700DF4209 /* batch_norm_4.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_4.b_0; sourceTree = ""; }; + C2A753A4219EF62700DF4209 /* batch_norm_32.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_32.w_1; sourceTree = ""; }; + C2A753A5219EF62700DF4209 /* batch_norm_26.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_26.w_1; sourceTree = ""; }; + C2A753A6219EF62700DF4209 /* batch_norm_30.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_30.w_1; sourceTree = ""; }; + C2A753A7219EF62700DF4209 /* batch_norm_24.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_24.w_1; sourceTree = ""; }; + C2A753A8219EF62700DF4209 /* batch_norm_18.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_18.w_1; sourceTree = ""; }; + C2A753A9219EF62700DF4209 /* batch_norm_6.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_6.b_0; sourceTree = ""; }; + C2A753AA219EF62700DF4209 /* batch_norm_9.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_9.w_2; sourceTree = ""; }; + C2A753AB219EF62700DF4209 /* conv2d_8.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_8.w_0; sourceTree = ""; }; + C2A753AC219EF62700DF4209 /* batch_norm_27.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_27.w_0; sourceTree = ""; }; + C2A753AD219EF62700DF4209 /* batch_norm_33.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_33.w_0; sourceTree = ""; }; + C2A753AE219EF62700DF4209 /* batch_norm_32.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_32.w_0; sourceTree = ""; }; + C2A753AF219EF62700DF4209 /* conv2d_9.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_9.w_0; sourceTree = ""; }; + C2A753B0219EF62700DF4209 /* batch_norm_26.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_26.w_0; sourceTree = ""; }; + C2A753B1219EF62700DF4209 /* batch_norm_8.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_8.w_2; sourceTree = ""; }; + C2A753B2219EF62700DF4209 /* batch_norm_7.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_7.b_0; sourceTree = ""; }; + C2A753B3219EF62700DF4209 /* batch_norm_19.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_19.w_1; sourceTree = ""; }; + C2A753B4219EF62700DF4209 /* batch_norm_25.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_25.w_1; sourceTree = ""; }; + C2A753B5219EF62700DF4209 /* batch_norm_31.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_31.w_1; sourceTree = ""; }; + C2A753B6219EF62700DF4209 /* batch_norm_28.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_28.w_1; sourceTree = ""; }; + C2A753B7219EF62700DF4209 /* batch_norm_14.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_14.w_1; sourceTree = ""; }; + C2A753B8219EF62700DF4209 /* batch_norm_5.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_5.w_2; sourceTree = ""; }; + C2A753B9219EF62700DF4209 /* batch_norm_17.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_17.w_0; sourceTree = ""; }; + C2A753BA219EF62700DF4209 /* conv2d_33.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_33.b_0; sourceTree = ""; }; + C2A753BB219EF62700DF4209 /* conv2d_27.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_27.b_0; sourceTree = ""; }; + C2A753BC219EF62700DF4209 /* conv2d_4.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_4.w_0; sourceTree = ""; }; + C2A753BD219EF62700DF4209 /* conv2d_5.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_5.w_0; sourceTree = ""; }; + C2A753BE219EF62700DF4209 /* conv2d_26.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_26.b_0; sourceTree = ""; }; + C2A753BF219EF62700DF4209 /* conv2d_32.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_32.b_0; sourceTree = ""; }; + C2A753C0219EF62700DF4209 /* batch_norm_16.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_16.w_0; sourceTree = ""; }; + C2A753C1219EF62700DF4209 /* batch_norm_4.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_4.w_2; sourceTree = ""; }; + C2A753C2219EF62700DF4209 /* batch_norm_15.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_15.w_1; sourceTree = ""; }; + C2A753C3219EF62700DF4209 /* batch_norm_29.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_29.w_1; sourceTree = ""; }; + C2A753C4219EF62700DF4209 /* batch_norm_17.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_17.w_1; sourceTree = ""; }; + C2A753C5219EF62700DF4209 /* batch_norm_9.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_9.b_0; sourceTree = ""; }; + C2A753C6219EF62700DF4209 /* batch_norm_6.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_6.w_2; sourceTree = ""; }; + C2A753C7219EF62700DF4209 /* batch_norm_14.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_14.w_0; sourceTree = ""; }; + C2A753C8219EF62700DF4209 /* batch_norm_28.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_28.w_0; sourceTree = ""; }; + C2A753C9219EF62700DF4209 /* conv2d_24.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_24.b_0; sourceTree = ""; }; + C2A753CA219EF62700DF4209 /* conv2d_7.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_7.w_0; sourceTree = ""; }; + C2A753CB219EF62700DF4209 /* conv2d_30.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_30.b_0; sourceTree = ""; }; + C2A753CC219EF62700DF4209 /* conv2d_31.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_31.b_0; sourceTree = ""; }; + C2A753CD219EF62700DF4209 /* batch_norm_29.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_29.w_0; sourceTree = ""; }; + C2A753CE219EF62700DF4209 /* conv2d_6.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_6.w_0; sourceTree = ""; }; + C2A753CF219EF62700DF4209 /* conv2d_25.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_25.b_0; sourceTree = ""; }; + C2A753D0219EF62700DF4209 /* batch_norm_15.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_15.w_0; sourceTree = ""; }; + C2A753D1219EF62700DF4209 /* batch_norm_7.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_7.w_2; sourceTree = ""; }; + C2A753D2219EF62700DF4209 /* batch_norm_8.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_8.b_0; sourceTree = ""; }; + C2A753D3219EF62700DF4209 /* batch_norm_16.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_16.w_1; sourceTree = ""; }; + C2A753D4219EF62700DF4209 /* batch_norm_12.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_12.w_1; sourceTree = ""; }; + C2A753D5219EF62700DF4209 /* batch_norm_3.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_3.w_2; sourceTree = ""; }; + C2A753D6219EF62700DF4209 /* conv2d_2.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_2.w_0; sourceTree = ""; }; + C2A753D7219EF62700DF4209 /* batch_norm_11.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_11.w_0; sourceTree = ""; }; + C2A753D8219EF62700DF4209 /* batch_norm_10.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_10.w_0; sourceTree = ""; }; + C2A753D9219EF62700DF4209 /* conv2d_3.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_3.w_0; sourceTree = ""; }; + C2A753DA219EF62700DF4209 /* batch_norm_2.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_2.w_2; sourceTree = ""; }; + C2A753DB219EF62700DF4209 /* depthwise_conv2d_12.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_12.w_0; sourceTree = ""; }; + C2A753DC219EF62700DF4209 /* batch_norm_13.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_13.w_1; sourceTree = ""; }; + C2A753DD219EF62700DF4209 /* batch_norm_11.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_11.w_1; sourceTree = ""; }; + C2A753DE219EF62700DF4209 /* depthwise_conv2d_10.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_10.w_0; sourceTree = ""; }; + C2A753DF219EF62700DF4209 /* batch_norm_0.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_0.w_2; sourceTree = ""; }; + C2A753E0219EF62700DF4209 /* conv2d_22.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_22.b_0; sourceTree = ""; }; + C2A753E1219EF62700DF4209 /* conv2d_1.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_1.w_0; sourceTree = ""; }; + C2A753E2219EF62700DF4209 /* batch_norm_12.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_12.w_0; sourceTree = ""; }; + C2A753E3219EF62700DF4209 /* batch_norm_13.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_13.w_0; sourceTree = ""; }; + C2A753E4219EF62700DF4209 /* conv2d_0.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_0.w_0; sourceTree = ""; }; + C2A753E5219EF62700DF4209 /* conv2d_23.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_23.b_0; sourceTree = ""; }; + C2A753E6219EF62700DF4209 /* batch_norm_1.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_1.w_2; sourceTree = ""; }; + C2A753E7219EF62700DF4209 /* batch_norm_10.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_10.w_1; sourceTree = ""; }; + C2A753E8219EF62700DF4209 /* depthwise_conv2d_11.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_11.w_0; sourceTree = ""; }; + C2A753E9219EF62700DF4209 /* depthwise_conv2d_3.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_3.w_0; sourceTree = ""; }; + C2A753EA219EF62700DF4209 /* batch_norm_13.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_13.b_0; sourceTree = ""; }; + C2A753EB219EF62700DF4209 /* conv2d_23.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_23.w_0; sourceTree = ""; }; + C2A753EC219EF62700DF4209 /* batch_norm_20.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_20.w_2; sourceTree = ""; }; + C2A753ED219EF62700DF4209 /* batch_norm_34.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_34.w_2; sourceTree = ""; }; + C2A753EE219EF62700DF4209 /* batch_norm_21.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_21.w_2; sourceTree = ""; }; + C2A753EF219EF62700DF4209 /* conv2d_22.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_22.w_0; sourceTree = ""; }; + C2A753F0219EF62700DF4209 /* batch_norm_12.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_12.b_0; sourceTree = ""; }; + C2A753F1219EF62700DF4209 /* depthwise_conv2d_2.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_2.w_0; sourceTree = ""; }; + C2A753F2219EF62700DF4209 /* depthwise_conv2d_0.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_0.w_0; sourceTree = ""; }; + C2A753F3219EF62700DF4209 /* batch_norm_10.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_10.b_0; sourceTree = ""; }; + C2A753F4219EF62700DF4209 /* conv2d_20.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_20.w_0; sourceTree = ""; }; + C2A753F5219EF62700DF4209 /* batch_norm_23.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_23.w_2; sourceTree = ""; }; + C2A753F6219EF62700DF4209 /* batch_norm_22.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_22.w_2; sourceTree = ""; }; + C2A753F7219EF62700DF4209 /* conv2d_21.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_21.w_0; sourceTree = ""; }; + C2A753F8219EF62700DF4209 /* batch_norm_11.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_11.b_0; sourceTree = ""; }; + C2A753F9219EF62700DF4209 /* depthwise_conv2d_1.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_1.w_0; sourceTree = ""; }; + C2A753FA219EF62700DF4209 /* depthwise_conv2d_5.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_5.w_0; sourceTree = ""; }; + C2A753FB219EF62700DF4209 /* batch_norm_8.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_8.w_0; sourceTree = ""; }; + C2A753FC219EF62700DF4209 /* conv2d_25.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_25.w_0; sourceTree = ""; }; + C2A753FD219EF62700DF4209 /* batch_norm_29.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_29.b_0; sourceTree = ""; }; + C2A753FE219EF62700DF4209 /* conv2d_31.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_31.w_0; sourceTree = ""; }; + C2A753FF219EF62700DF4209 /* conv2d_19.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_19.w_0; sourceTree = ""; }; + C2A75400219EF62700DF4209 /* batch_norm_15.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_15.b_0; sourceTree = ""; }; + C2A75401219EF62700DF4209 /* batch_norm_32.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_32.w_2; sourceTree = ""; }; + C2A75402219EF62700DF4209 /* batch_norm_26.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_26.w_2; sourceTree = ""; }; + C2A75403219EF62700DF4209 /* batch_norm_27.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_27.w_2; sourceTree = ""; }; + C2A75404219EF62700DF4209 /* batch_norm_33.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_33.w_2; sourceTree = ""; }; + C2A75405219EF62700DF4209 /* conv2d_18.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_18.w_0; sourceTree = ""; }; + C2A75406219EF62700DF4209 /* batch_norm_14.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_14.b_0; sourceTree = ""; }; + C2A75407219EF62700DF4209 /* conv2d_30.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_30.w_0; sourceTree = ""; }; + C2A75408219EF62700DF4209 /* conv2d_24.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_24.w_0; sourceTree = ""; }; + C2A75409219EF62700DF4209 /* batch_norm_28.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_28.b_0; sourceTree = ""; }; + C2A7540A219EF62700DF4209 /* batch_norm_9.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_9.w_0; sourceTree = ""; }; + C2A7540B219EF62700DF4209 /* depthwise_conv2d_4.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_4.w_0; sourceTree = ""; }; + C2A7540C219EF62700DF4209 /* depthwise_conv2d_6.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_6.w_0; sourceTree = ""; }; + C2A7540D219EF62700DF4209 /* conv2d_32.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_32.w_0; sourceTree = ""; }; + C2A7540E219EF62700DF4209 /* conv2d_26.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_26.w_0; sourceTree = ""; }; + C2A7540F219EF62700DF4209 /* batch_norm_16.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_16.b_0; sourceTree = ""; }; + C2A75410219EF62700DF4209 /* batch_norm_19.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_19.w_2; sourceTree = ""; }; + C2A75411219EF62700DF4209 /* batch_norm_25.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_25.w_2; sourceTree = ""; }; + C2A75412219EF62700DF4209 /* batch_norm_31.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_31.w_2; sourceTree = ""; }; + C2A75413219EF62700DF4209 /* batch_norm_8.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_8.w_1; sourceTree = ""; }; + C2A75414219EF62700DF4209 /* batch_norm_9.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_9.w_1; sourceTree = ""; }; + C2A75415219EF62700DF4209 /* batch_norm_30.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_30.w_2; sourceTree = ""; }; + C2A75416219EF62700DF4209 /* batch_norm_24.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_24.w_2; sourceTree = ""; }; + C2A75417219EF62700DF4209 /* batch_norm_18.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_18.w_2; sourceTree = ""; }; + C2A75418219EF62700DF4209 /* batch_norm_17.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_17.b_0; sourceTree = ""; }; + C2A75419219EF62700DF4209 /* conv2d_27.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_27.w_0; sourceTree = ""; }; + C2A7541A219EF62700DF4209 /* conv2d_33.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_33.w_0; sourceTree = ""; }; + C2A7541B219EF62700DF4209 /* depthwise_conv2d_7.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_7.w_0; sourceTree = ""; }; + C2A7541D219EF62700DF4209 /* ar_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = ar_model; sourceTree = ""; }; + C2A7541E219EF62700DF4209 /* ar_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = ar_params; sourceTree = ""; }; + C2E339FB217EB80E0097FDD6 /* synset.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = synset.txt; sourceTree = ""; }; + C2E339FC217EB80E0097FDD6 /* banana.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = banana.jpeg; sourceTree = ""; }; + C2E339FD217EB80E0097FDD6 /* hand.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = hand.jpg; sourceTree = ""; }; + C2E339FE217EB80E0097FDD6 /* iphone.JPG */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = iphone.JPG; sourceTree = ""; }; + C2E339FF217EB80E0097FDD6 /* paddle-mobile.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "paddle-mobile.png"; sourceTree = ""; }; C2E67E5C21524E460013F575 /* LoadPointerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoadPointerViewController.h; sourceTree = ""; }; C2E67E5D21524E460013F575 /* LoadPointerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoadPointerViewController.m; sourceTree = ""; }; FC013927210204A3008100E3 /* PreProcessKernel.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; path = PreProcessKernel.metal; sourceTree = ""; }; @@ -68,16 +509,6 @@ FCBCCC542122EF5400D94F7E /* MetalHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetalHelper.swift; sourceTree = ""; }; FCEBEC2B20E1391F00C0B14D /* paddle_mobile.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = paddle_mobile.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FCF437E7214B6DDB00943429 /* MultiPredictViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultiPredictViewController.swift; sourceTree = ""; }; - FCFE9B632152858600DECA15 /* hand.jpg.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = hand.jpg.zip; sourceTree = ""; }; - FCFE9B642152858600DECA15 /* synset.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = synset.txt; sourceTree = ""; }; - FCFE9B652152858600DECA15 /* banana.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = banana.jpeg; sourceTree = ""; }; - FCFE9B662152858600DECA15 /* hand.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = hand.jpg; sourceTree = ""; }; - FCFE9B672152858600DECA15 /* iphone.JPG */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = iphone.JPG; sourceTree = ""; }; - FCFE9B682152858600DECA15 /* paddle-mobile.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "paddle-mobile.png"; sourceTree = ""; }; - FCFE9B752152859500DECA15 /* genet_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = genet_params; sourceTree = ""; }; - FCFE9B762152859500DECA15 /* genet_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = genet_model; sourceTree = ""; }; - FCFE9C4C2152859500DECA15 /* ar_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = ar_model; sourceTree = ""; }; - FCFE9C4D2152859500DECA15 /* ar_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = ar_params; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -85,6 +516,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + C2CBB49021B778EA0020DC6C /* libc++.tbd in Frameworks */, FCEBEC2C20E1391F00C0B14D /* paddle_mobile.framework in Frameworks */, 30D0ED21F392CFA3885B1002 /* Pods_paddle_mobile_demo.framework in Frameworks */, ); @@ -111,6 +543,333 @@ name = Frameworks; sourceTree = ""; }; + C2A75337219EF62700DF4209 /* models */ = { + isa = PBXGroup; + children = ( + C2A75338219EF62700DF4209 /* mobilenet */, + C2A7533B219EF62700DF4209 /* yolo_combined */, + C2A75342219EF62700DF4209 /* genet */, + C2A75345219EF62700DF4209 /* superresoltion */, + C2A75348219EF62700DF4209 /* mobilenet_ssd_hand */, + C2A7534B219EF62700DF4209 /* yolo */, + C2A75350219EF62700DF4209 /* mobilenet_combine */, + C2A75353219EF62700DF4209 /* mobilenetssd */, + C2A7541C219EF62700DF4209 /* fluid_fssd_new_ar */, + ); + path = models; + sourceTree = ""; + }; + C2A75338219EF62700DF4209 /* mobilenet */ = { + isa = PBXGroup; + children = ( + C2A75339219EF62700DF4209 /* params */, + C2A7533A219EF62700DF4209 /* model */, + ); + path = mobilenet; + sourceTree = ""; + }; + C2A7533B219EF62700DF4209 /* yolo_combined */ = { + isa = PBXGroup; + children = ( + C2A7533C219EF62700DF4209 /* mobilenet */, + C2A7533F219EF62700DF4209 /* yolo */, + ); + path = yolo_combined; + sourceTree = ""; + }; + C2A7533C219EF62700DF4209 /* mobilenet */ = { + isa = PBXGroup; + children = ( + C2A7533D219EF62700DF4209 /* combined_mobilenet_params */, + C2A7533E219EF62700DF4209 /* combined_mobilenet_model */, + ); + path = mobilenet; + sourceTree = ""; + }; + C2A7533F219EF62700DF4209 /* yolo */ = { + isa = PBXGroup; + children = ( + C2A75340219EF62700DF4209 /* yolo_params */, + C2A75341219EF62700DF4209 /* yolo_model */, + ); + path = yolo; + sourceTree = ""; + }; + C2A75342219EF62700DF4209 /* genet */ = { + isa = PBXGroup; + children = ( + C2A75343219EF62700DF4209 /* genet_params */, + C2A75344219EF62700DF4209 /* genet_model */, + ); + path = genet; + sourceTree = ""; + }; + C2A75345219EF62700DF4209 /* superresoltion */ = { + isa = PBXGroup; + children = ( + C2A75346219EF62700DF4209 /* superresoltion_params */, + C2A75347219EF62700DF4209 /* superresoltion_model */, + ); + path = superresoltion; + sourceTree = ""; + }; + C2A75348219EF62700DF4209 /* mobilenet_ssd_hand */ = { + isa = PBXGroup; + children = ( + C2A75349219EF62700DF4209 /* ssd_hand_params */, + C2A7534A219EF62700DF4209 /* ssd_hand_model */, + ); + path = mobilenet_ssd_hand; + sourceTree = ""; + }; + C2A7534B219EF62700DF4209 /* yolo */ = { + isa = PBXGroup; + children = ( + C2A7534C219EF62700DF4209 /* mobilenet */, + C2A7534D219EF62700DF4209 /* params */, + C2A7534E219EF62700DF4209 /* model */, + C2A7534F219EF62700DF4209 /* yolo */, + ); + path = yolo; + sourceTree = ""; + }; + C2A75350219EF62700DF4209 /* mobilenet_combine */ = { + isa = PBXGroup; + children = ( + C2A75351219EF62700DF4209 /* params */, + C2A75352219EF62700DF4209 /* model */, + ); + path = mobilenet_combine; + sourceTree = ""; + }; + C2A75353219EF62700DF4209 /* mobilenetssd */ = { + isa = PBXGroup; + children = ( + C2A75354219EF62700DF4209 /* batch_norm_7.w_0 */, + C2A75355219EF62700DF4209 /* batch_norm_26.b_0 */, + C2A75356219EF62700DF4209 /* batch_norm_32.b_0 */, + C2A75357219EF62700DF4209 /* conv2d_16.w_0 */, + C2A75358219EF62700DF4209 /* batch_norm_15.w_2 */, + C2A75359219EF62700DF4209 /* batch_norm_29.w_2 */, + C2A7535A219EF62700DF4209 /* batch_norm_4.w_1 */, + C2A7535B219EF62700DF4209 /* batch_norm_5.w_1 */, + C2A7535C219EF62700DF4209 /* batch_norm_28.w_2 */, + C2A7535D219EF62700DF4209 /* batch_norm_14.w_2 */, + C2A7535E219EF62700DF4209 /* conv2d_17.w_0 */, + C2A7535F219EF62700DF4209 /* batch_norm_33.b_0 */, + C2A75360219EF62700DF4209 /* batch_norm_27.b_0 */, + C2A75361219EF62700DF4209 /* batch_norm_6.w_0 */, + C2A75362219EF62700DF4209 /* batch_norm_4.w_0 */, + C2A75363219EF62700DF4209 /* depthwise_conv2d_9.w_0 */, + C2A75364219EF62700DF4209 /* batch_norm_31.b_0 */, + C2A75365219EF62700DF4209 /* conv2d_29.w_0 */, + C2A75366219EF62700DF4209 /* batch_norm_25.b_0 */, + C2A75367219EF62700DF4209 /* conv2d_15.w_0 */, + C2A75368219EF62700DF4209 /* batch_norm_19.b_0 */, + C2A75369219EF62700DF4209 /* batch_norm_16.w_2 */, + C2A7536A219EF62700DF4209 /* __model__ */, + C2A7536B219EF62700DF4209 /* batch_norm_7.w_1 */, + C2A7536C219EF62700DF4209 /* batch_norm_6.w_1 */, + C2A7536D219EF62700DF4209 /* batch_norm_17.w_2 */, + C2A7536E219EF62700DF4209 /* conv2d_14.w_0 */, + C2A7536F219EF62700DF4209 /* batch_norm_18.b_0 */, + C2A75370219EF62700DF4209 /* conv2d_28.w_0 */, + C2A75371219EF62700DF4209 /* batch_norm_24.b_0 */, + C2A75372219EF62700DF4209 /* batch_norm_30.b_0 */, + C2A75373219EF62700DF4209 /* depthwise_conv2d_8.w_0 */, + C2A75374219EF62700DF4209 /* batch_norm_5.w_0 */, + C2A75375219EF62700DF4209 /* batch_norm_1.w_0 */, + C2A75376219EF62700DF4209 /* conv2d_10.w_0 */, + C2A75377219EF62700DF4209 /* batch_norm_34.b_0 */, + C2A75378219EF62700DF4209 /* batch_norm_20.b_0 */, + C2A75379219EF62700DF4209 /* batch_norm_13.w_2 */, + C2A7537A219EF62700DF4209 /* batch_norm_2.w_1 */, + C2A7537B219EF62700DF4209 /* batch_norm_3.w_1 */, + C2A7537C219EF62700DF4209 /* batch_norm_12.w_2 */, + C2A7537D219EF62700DF4209 /* batch_norm_21.b_0 */, + C2A7537E219EF62700DF4209 /* conv2d_11.w_0 */, + C2A7537F219EF62700DF4209 /* batch_norm_0.w_0 */, + C2A75380219EF62700DF4209 /* batch_norm_2.w_0 */, + C2A75381219EF62700DF4209 /* conv2d_13.w_0 */, + C2A75382219EF62700DF4209 /* batch_norm_23.b_0 */, + C2A75383219EF62700DF4209 /* batch_norm_10.w_2 */, + C2A75384219EF62700DF4209 /* batch_norm_1.w_1 */, + C2A75385219EF62700DF4209 /* batch_norm_0.w_1 */, + C2A75386219EF62700DF4209 /* batch_norm_11.w_2 */, + C2A75387219EF62700DF4209 /* batch_norm_22.b_0 */, + C2A75388219EF62700DF4209 /* conv2d_12.w_0 */, + C2A75389219EF62700DF4209 /* batch_norm_3.w_0 */, + C2A7538A219EF62700DF4209 /* batch_norm_21.w_1 */, + C2A7538B219EF62700DF4209 /* batch_norm_3.b_0 */, + C2A7538C219EF62700DF4209 /* batch_norm_22.w_0 */, + C2A7538D219EF62700DF4209 /* batch_norm_23.w_0 */, + C2A7538E219EF62700DF4209 /* batch_norm_2.b_0 */, + C2A7538F219EF62700DF4209 /* batch_norm_20.w_1 */, + C2A75390219EF62700DF4209 /* batch_norm_34.w_1 */, + C2A75391219EF62700DF4209 /* batch_norm_22.w_1 */, + C2A75392219EF62700DF4209 /* batch_norm_0.b_0 */, + C2A75393219EF62700DF4209 /* batch_norm_21.w_0 */, + C2A75394219EF62700DF4209 /* batch_norm_20.w_0 */, + C2A75395219EF62700DF4209 /* batch_norm_34.w_0 */, + C2A75396219EF62700DF4209 /* batch_norm_1.b_0 */, + C2A75397219EF62700DF4209 /* batch_norm_23.w_1 */, + C2A75398219EF62700DF4209 /* batch_norm_27.w_1 */, + C2A75399219EF62700DF4209 /* batch_norm_33.w_1 */, + C2A7539A219EF62700DF4209 /* batch_norm_5.b_0 */, + C2A7539B219EF62700DF4209 /* batch_norm_18.w_0 */, + C2A7539C219EF62700DF4209 /* batch_norm_30.w_0 */, + C2A7539D219EF62700DF4209 /* batch_norm_24.w_0 */, + C2A7539E219EF62700DF4209 /* conv2d_28.b_0 */, + C2A7539F219EF62700DF4209 /* batch_norm_25.w_0 */, + C2A753A0219EF62700DF4209 /* conv2d_29.b_0 */, + C2A753A1219EF62700DF4209 /* batch_norm_31.w_0 */, + C2A753A2219EF62700DF4209 /* batch_norm_19.w_0 */, + C2A753A3219EF62700DF4209 /* batch_norm_4.b_0 */, + C2A753A4219EF62700DF4209 /* batch_norm_32.w_1 */, + C2A753A5219EF62700DF4209 /* batch_norm_26.w_1 */, + C2A753A6219EF62700DF4209 /* batch_norm_30.w_1 */, + C2A753A7219EF62700DF4209 /* batch_norm_24.w_1 */, + C2A753A8219EF62700DF4209 /* batch_norm_18.w_1 */, + C2A753A9219EF62700DF4209 /* batch_norm_6.b_0 */, + C2A753AA219EF62700DF4209 /* batch_norm_9.w_2 */, + C2A753AB219EF62700DF4209 /* conv2d_8.w_0 */, + C2A753AC219EF62700DF4209 /* batch_norm_27.w_0 */, + C2A753AD219EF62700DF4209 /* batch_norm_33.w_0 */, + C2A753AE219EF62700DF4209 /* batch_norm_32.w_0 */, + C2A753AF219EF62700DF4209 /* conv2d_9.w_0 */, + C2A753B0219EF62700DF4209 /* batch_norm_26.w_0 */, + C2A753B1219EF62700DF4209 /* batch_norm_8.w_2 */, + C2A753B2219EF62700DF4209 /* batch_norm_7.b_0 */, + C2A753B3219EF62700DF4209 /* batch_norm_19.w_1 */, + C2A753B4219EF62700DF4209 /* batch_norm_25.w_1 */, + C2A753B5219EF62700DF4209 /* batch_norm_31.w_1 */, + C2A753B6219EF62700DF4209 /* batch_norm_28.w_1 */, + C2A753B7219EF62700DF4209 /* batch_norm_14.w_1 */, + C2A753B8219EF62700DF4209 /* batch_norm_5.w_2 */, + C2A753B9219EF62700DF4209 /* batch_norm_17.w_0 */, + C2A753BA219EF62700DF4209 /* conv2d_33.b_0 */, + C2A753BB219EF62700DF4209 /* conv2d_27.b_0 */, + C2A753BC219EF62700DF4209 /* conv2d_4.w_0 */, + C2A753BD219EF62700DF4209 /* conv2d_5.w_0 */, + C2A753BE219EF62700DF4209 /* conv2d_26.b_0 */, + C2A753BF219EF62700DF4209 /* conv2d_32.b_0 */, + C2A753C0219EF62700DF4209 /* batch_norm_16.w_0 */, + C2A753C1219EF62700DF4209 /* batch_norm_4.w_2 */, + C2A753C2219EF62700DF4209 /* batch_norm_15.w_1 */, + C2A753C3219EF62700DF4209 /* batch_norm_29.w_1 */, + C2A753C4219EF62700DF4209 /* batch_norm_17.w_1 */, + C2A753C5219EF62700DF4209 /* batch_norm_9.b_0 */, + C2A753C6219EF62700DF4209 /* batch_norm_6.w_2 */, + C2A753C7219EF62700DF4209 /* batch_norm_14.w_0 */, + C2A753C8219EF62700DF4209 /* batch_norm_28.w_0 */, + C2A753C9219EF62700DF4209 /* conv2d_24.b_0 */, + C2A753CA219EF62700DF4209 /* conv2d_7.w_0 */, + C2A753CB219EF62700DF4209 /* conv2d_30.b_0 */, + C2A753CC219EF62700DF4209 /* conv2d_31.b_0 */, + C2A753CD219EF62700DF4209 /* batch_norm_29.w_0 */, + C2A753CE219EF62700DF4209 /* conv2d_6.w_0 */, + C2A753CF219EF62700DF4209 /* conv2d_25.b_0 */, + C2A753D0219EF62700DF4209 /* batch_norm_15.w_0 */, + C2A753D1219EF62700DF4209 /* batch_norm_7.w_2 */, + C2A753D2219EF62700DF4209 /* batch_norm_8.b_0 */, + C2A753D3219EF62700DF4209 /* batch_norm_16.w_1 */, + C2A753D4219EF62700DF4209 /* batch_norm_12.w_1 */, + C2A753D5219EF62700DF4209 /* batch_norm_3.w_2 */, + C2A753D6219EF62700DF4209 /* conv2d_2.w_0 */, + C2A753D7219EF62700DF4209 /* batch_norm_11.w_0 */, + C2A753D8219EF62700DF4209 /* batch_norm_10.w_0 */, + C2A753D9219EF62700DF4209 /* conv2d_3.w_0 */, + C2A753DA219EF62700DF4209 /* batch_norm_2.w_2 */, + C2A753DB219EF62700DF4209 /* depthwise_conv2d_12.w_0 */, + C2A753DC219EF62700DF4209 /* batch_norm_13.w_1 */, + C2A753DD219EF62700DF4209 /* batch_norm_11.w_1 */, + C2A753DE219EF62700DF4209 /* depthwise_conv2d_10.w_0 */, + C2A753DF219EF62700DF4209 /* batch_norm_0.w_2 */, + C2A753E0219EF62700DF4209 /* conv2d_22.b_0 */, + C2A753E1219EF62700DF4209 /* conv2d_1.w_0 */, + C2A753E2219EF62700DF4209 /* batch_norm_12.w_0 */, + C2A753E3219EF62700DF4209 /* batch_norm_13.w_0 */, + C2A753E4219EF62700DF4209 /* conv2d_0.w_0 */, + C2A753E5219EF62700DF4209 /* conv2d_23.b_0 */, + C2A753E6219EF62700DF4209 /* batch_norm_1.w_2 */, + C2A753E7219EF62700DF4209 /* batch_norm_10.w_1 */, + C2A753E8219EF62700DF4209 /* depthwise_conv2d_11.w_0 */, + C2A753E9219EF62700DF4209 /* depthwise_conv2d_3.w_0 */, + C2A753EA219EF62700DF4209 /* batch_norm_13.b_0 */, + C2A753EB219EF62700DF4209 /* conv2d_23.w_0 */, + C2A753EC219EF62700DF4209 /* batch_norm_20.w_2 */, + C2A753ED219EF62700DF4209 /* batch_norm_34.w_2 */, + C2A753EE219EF62700DF4209 /* batch_norm_21.w_2 */, + C2A753EF219EF62700DF4209 /* conv2d_22.w_0 */, + C2A753F0219EF62700DF4209 /* batch_norm_12.b_0 */, + C2A753F1219EF62700DF4209 /* depthwise_conv2d_2.w_0 */, + C2A753F2219EF62700DF4209 /* depthwise_conv2d_0.w_0 */, + C2A753F3219EF62700DF4209 /* batch_norm_10.b_0 */, + C2A753F4219EF62700DF4209 /* conv2d_20.w_0 */, + C2A753F5219EF62700DF4209 /* batch_norm_23.w_2 */, + C2A753F6219EF62700DF4209 /* batch_norm_22.w_2 */, + C2A753F7219EF62700DF4209 /* conv2d_21.w_0 */, + C2A753F8219EF62700DF4209 /* batch_norm_11.b_0 */, + C2A753F9219EF62700DF4209 /* depthwise_conv2d_1.w_0 */, + C2A753FA219EF62700DF4209 /* depthwise_conv2d_5.w_0 */, + C2A753FB219EF62700DF4209 /* batch_norm_8.w_0 */, + C2A753FC219EF62700DF4209 /* conv2d_25.w_0 */, + C2A753FD219EF62700DF4209 /* batch_norm_29.b_0 */, + C2A753FE219EF62700DF4209 /* conv2d_31.w_0 */, + C2A753FF219EF62700DF4209 /* conv2d_19.w_0 */, + C2A75400219EF62700DF4209 /* batch_norm_15.b_0 */, + C2A75401219EF62700DF4209 /* batch_norm_32.w_2 */, + C2A75402219EF62700DF4209 /* batch_norm_26.w_2 */, + C2A75403219EF62700DF4209 /* batch_norm_27.w_2 */, + C2A75404219EF62700DF4209 /* batch_norm_33.w_2 */, + C2A75405219EF62700DF4209 /* conv2d_18.w_0 */, + C2A75406219EF62700DF4209 /* batch_norm_14.b_0 */, + C2A75407219EF62700DF4209 /* conv2d_30.w_0 */, + C2A75408219EF62700DF4209 /* conv2d_24.w_0 */, + C2A75409219EF62700DF4209 /* batch_norm_28.b_0 */, + C2A7540A219EF62700DF4209 /* batch_norm_9.w_0 */, + C2A7540B219EF62700DF4209 /* depthwise_conv2d_4.w_0 */, + C2A7540C219EF62700DF4209 /* depthwise_conv2d_6.w_0 */, + C2A7540D219EF62700DF4209 /* conv2d_32.w_0 */, + C2A7540E219EF62700DF4209 /* conv2d_26.w_0 */, + C2A7540F219EF62700DF4209 /* batch_norm_16.b_0 */, + C2A75410219EF62700DF4209 /* batch_norm_19.w_2 */, + C2A75411219EF62700DF4209 /* batch_norm_25.w_2 */, + C2A75412219EF62700DF4209 /* batch_norm_31.w_2 */, + C2A75413219EF62700DF4209 /* batch_norm_8.w_1 */, + C2A75414219EF62700DF4209 /* batch_norm_9.w_1 */, + C2A75415219EF62700DF4209 /* batch_norm_30.w_2 */, + C2A75416219EF62700DF4209 /* batch_norm_24.w_2 */, + C2A75417219EF62700DF4209 /* batch_norm_18.w_2 */, + C2A75418219EF62700DF4209 /* batch_norm_17.b_0 */, + C2A75419219EF62700DF4209 /* conv2d_27.w_0 */, + C2A7541A219EF62700DF4209 /* conv2d_33.w_0 */, + C2A7541B219EF62700DF4209 /* depthwise_conv2d_7.w_0 */, + ); + path = mobilenetssd; + sourceTree = ""; + }; + C2A7541C219EF62700DF4209 /* fluid_fssd_new_ar */ = { + isa = PBXGroup; + children = ( + C2A7541D219EF62700DF4209 /* ar_model */, + C2A7541E219EF62700DF4209 /* ar_params */, + ); + path = fluid_fssd_new_ar; + sourceTree = ""; + }; + C2E339FA217EB80E0097FDD6 /* images */ = { + isa = PBXGroup; + children = ( + C2E339FB217EB80E0097FDD6 /* synset.txt */, + C2E339FC217EB80E0097FDD6 /* banana.jpeg */, + C2E339FD217EB80E0097FDD6 /* hand.jpg */, + C2E339FE217EB80E0097FDD6 /* iphone.JPG */, + C2E339FF217EB80E0097FDD6 /* paddle-mobile.png */, + ); + path = images; + sourceTree = ""; + }; FC039B7520E11C550081E9F8 = { isa = PBXGroup; children = ( @@ -133,8 +892,8 @@ FC039B8020E11C550081E9F8 /* paddle-mobile-demo */ = { isa = PBXGroup; children = ( - FCFE9B6F2152859500DECA15 /* models */, - FCFE9B622152858600DECA15 /* images */, + C2A75337219EF62700DF4209 /* models */, + C2E339FA217EB80E0097FDD6 /* images */, FC803BCA214D27920094B8E5 /* VideoCapture */, FC8CFED2213519540094D569 /* Net */, FC039B8120E11C550081E9F8 /* AppDelegate.swift */, @@ -169,48 +928,6 @@ path = Net; sourceTree = ""; }; - FCFE9B622152858600DECA15 /* images */ = { - isa = PBXGroup; - children = ( - FCFE9B632152858600DECA15 /* hand.jpg.zip */, - FCFE9B642152858600DECA15 /* synset.txt */, - FCFE9B652152858600DECA15 /* banana.jpeg */, - FCFE9B662152858600DECA15 /* hand.jpg */, - FCFE9B672152858600DECA15 /* iphone.JPG */, - FCFE9B682152858600DECA15 /* paddle-mobile.png */, - ); - name = images; - path = ../../images; - sourceTree = ""; - }; - FCFE9B6F2152859500DECA15 /* models */ = { - isa = PBXGroup; - children = ( - FCFE9B742152859500DECA15 /* genet */, - FCFE9C4B2152859500DECA15 /* fluid_fssd_new_ar */, - ); - name = models; - path = ../../models; - sourceTree = ""; - }; - FCFE9B742152859500DECA15 /* genet */ = { - isa = PBXGroup; - children = ( - FCFE9B752152859500DECA15 /* genet_params */, - FCFE9B762152859500DECA15 /* genet_model */, - ); - path = genet; - sourceTree = ""; - }; - FCFE9C4B2152859500DECA15 /* fluid_fssd_new_ar */ = { - isa = PBXGroup; - children = ( - FCFE9C4C2152859500DECA15 /* ar_model */, - FCFE9C4D2152859500DECA15 /* ar_params */, - ); - path = fluid_fssd_new_ar; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -273,19 +990,234 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - FCFE9D232152859600DECA15 /* ar_model in Resources */, + C2A754A5219EF62800DF4209 /* batch_norm_28.w_0 in Resources */, + C2A75435219EF62800DF4209 /* batch_norm_15.w_2 in Resources */, + C2A754B9219EF62800DF4209 /* batch_norm_13.w_1 in Resources */, + C2A75471219EF62800DF4209 /* batch_norm_20.w_0 in Resources */, + C2A754C1219EF62800DF4209 /* conv2d_0.w_0 in Resources */, + C2A754F0219EF62800DF4209 /* batch_norm_8.w_1 in Resources */, + C2A754BE219EF62800DF4209 /* conv2d_1.w_0 in Resources */, + C2A75463219EF62800DF4209 /* batch_norm_11.w_2 in Resources */, + C2A754F5219EF62800DF4209 /* batch_norm_17.b_0 in Resources */, + C2A75465219EF62800DF4209 /* conv2d_12.w_0 in Resources */, FC039B8C20E11C560081E9F8 /* LaunchScreen.storyboard in Resources */, - FCFE9C522152859600DECA15 /* genet_model in Resources */, - FCFE9D242152859600DECA15 /* ar_params in Resources */, - FCFE9B6E2152858600DECA15 /* paddle-mobile.png in Resources */, - FCFE9C512152859600DECA15 /* genet_params in Resources */, - FCFE9B692152858600DECA15 /* hand.jpg.zip in Resources */, + C2A75494219EF62800DF4209 /* batch_norm_14.w_1 in Resources */, + C2A7547E219EF62800DF4209 /* batch_norm_31.w_0 in Resources */, + C2A75440219EF62800DF4209 /* depthwise_conv2d_9.w_0 in Resources */, + C2A754CC219EF62800DF4209 /* conv2d_22.w_0 in Resources */, + C2A754E7219EF62800DF4209 /* batch_norm_9.w_0 in Resources */, + C2A75438219EF62800DF4209 /* batch_norm_5.w_1 in Resources */, + C2A75481219EF62800DF4209 /* batch_norm_32.w_1 in Resources */, + C2A75424219EF62800DF4209 /* yolo_model in Resources */, + C2A7549D219EF62800DF4209 /* batch_norm_16.w_0 in Resources */, + C2A754D3219EF62800DF4209 /* batch_norm_22.w_2 in Resources */, + C2A754F6219EF62800DF4209 /* conv2d_27.w_0 in Resources */, + C2A75476219EF62800DF4209 /* batch_norm_33.w_1 in Resources */, + C2A754AB219EF62800DF4209 /* conv2d_6.w_0 in Resources */, + C2A75452219EF62800DF4209 /* batch_norm_1.w_0 in Resources */, + C2A7544C219EF62800DF4209 /* batch_norm_18.b_0 in Resources */, + C2A75461219EF62800DF4209 /* batch_norm_1.w_1 in Resources */, + C2A75428219EF62800DF4209 /* superresoltion_model in Resources */, + C2A7545E219EF62800DF4209 /* conv2d_13.w_0 in Resources */, + C2E33ADF217EB80E0097FDD6 /* banana.jpeg in Resources */, + C2A7541F219EF62800DF4209 /* params in Resources */, + C2A75468219EF62800DF4209 /* batch_norm_3.b_0 in Resources */, + C2A75469219EF62800DF4209 /* batch_norm_22.w_0 in Resources */, + C2A75425219EF62800DF4209 /* genet_params in Resources */, + C2A754B0219EF62800DF4209 /* batch_norm_16.w_1 in Resources */, + C2A754AE219EF62800DF4209 /* batch_norm_7.w_2 in Resources */, + C2A754F2219EF62800DF4209 /* batch_norm_30.w_2 in Resources */, + C2A7543D219EF62800DF4209 /* batch_norm_27.b_0 in Resources */, + C2A7547C219EF62800DF4209 /* batch_norm_25.w_0 in Resources */, + C2A754D5219EF62800DF4209 /* batch_norm_11.b_0 in Resources */, + C2A75483219EF62800DF4209 /* batch_norm_30.w_1 in Resources */, + C2A754B6219EF62800DF4209 /* conv2d_3.w_0 in Resources */, + C2A75437219EF62800DF4209 /* batch_norm_4.w_1 in Resources */, + C2A754E5219EF62800DF4209 /* conv2d_24.w_0 in Resources */, + C2A75473219EF62800DF4209 /* batch_norm_1.b_0 in Resources */, + C2A754A6219EF62800DF4209 /* conv2d_24.b_0 in Resources */, + C2A7545F219EF62800DF4209 /* batch_norm_23.b_0 in Resources */, + C2A75482219EF62800DF4209 /* batch_norm_26.w_1 in Resources */, + C2A75427219EF62800DF4209 /* superresoltion_params in Resources */, + C2A7542E219EF62800DF4209 /* yolo in Resources */, + C2A75445219EF62800DF4209 /* batch_norm_19.b_0 in Resources */, + C2A75464219EF62800DF4209 /* batch_norm_22.b_0 in Resources */, + C2A754EF219EF62800DF4209 /* batch_norm_31.w_2 in Resources */, + C2A754F7219EF62800DF4209 /* conv2d_33.w_0 in Resources */, + C2A75421219EF62800DF4209 /* combined_mobilenet_params in Resources */, + C2A754C7219EF62800DF4209 /* batch_norm_13.b_0 in Resources */, + C2A75487219EF62800DF4209 /* batch_norm_9.w_2 in Resources */, + C2A75454219EF62800DF4209 /* batch_norm_34.b_0 in Resources */, + C2A754AF219EF62800DF4209 /* batch_norm_8.b_0 in Resources */, + C2A75480219EF62800DF4209 /* batch_norm_4.b_0 in Resources */, + C2A75479219EF62800DF4209 /* batch_norm_30.w_0 in Resources */, + C2A75470219EF62800DF4209 /* batch_norm_21.w_0 in Resources */, FC039B8920E11C560081E9F8 /* Assets.xcassets in Resources */, - FCFE9B6A2152858600DECA15 /* synset.txt in Resources */, - FCFE9B6B2152858600DECA15 /* banana.jpeg in Resources */, - FCFE9B6D2152858600DECA15 /* iphone.JPG in Resources */, - FCFE9B6C2152858600DECA15 /* hand.jpg in Resources */, + C2A7549A219EF62800DF4209 /* conv2d_5.w_0 in Resources */, + C2A7542F219EF62800DF4209 /* params in Resources */, + C2A754F4219EF62800DF4209 /* batch_norm_18.w_2 in Resources */, + C2A75496219EF62800DF4209 /* batch_norm_17.w_0 in Resources */, + C2A754D4219EF62800DF4209 /* conv2d_21.w_0 in Resources */, + C2E33AE2217EB80E0097FDD6 /* paddle-mobile.png in Resources */, + C2A754D8219EF62800DF4209 /* batch_norm_8.w_0 in Resources */, + C2A75447219EF62800DF4209 /* __model__ in Resources */, + C2A75432219EF62800DF4209 /* batch_norm_26.b_0 in Resources */, + C2A7547D219EF62800DF4209 /* conv2d_29.b_0 in Resources */, + C2A75436219EF62800DF4209 /* batch_norm_29.w_2 in Resources */, + C2A75497219EF62800DF4209 /* conv2d_33.b_0 in Resources */, + C2A754B5219EF62800DF4209 /* batch_norm_10.w_0 in Resources */, + C2A75493219EF62800DF4209 /* batch_norm_28.w_1 in Resources */, + C2A754A3219EF62800DF4209 /* batch_norm_6.w_2 in Resources */, + C2A754CB219EF62800DF4209 /* batch_norm_21.w_2 in Resources */, + C2E33AE1217EB80E0097FDD6 /* iphone.JPG in Resources */, + C2A754A7219EF62800DF4209 /* conv2d_7.w_0 in Resources */, + C2A754B7219EF62800DF4209 /* batch_norm_2.w_2 in Resources */, + C2A75450219EF62800DF4209 /* depthwise_conv2d_8.w_0 in Resources */, + C2A754ED219EF62800DF4209 /* batch_norm_19.w_2 in Resources */, + C2A75477219EF62800DF4209 /* batch_norm_5.b_0 in Resources */, + C2A754C6219EF62800DF4209 /* depthwise_conv2d_3.w_0 in Resources */, + C2A7542B219EF62800DF4209 /* mobilenet in Resources */, + C2A754C5219EF62800DF4209 /* depthwise_conv2d_11.w_0 in Resources */, + C2A7544A219EF62800DF4209 /* batch_norm_17.w_2 in Resources */, + C2A754E4219EF62800DF4209 /* conv2d_30.w_0 in Resources */, + C2A754AA219EF62800DF4209 /* batch_norm_29.w_0 in Resources */, + C2A754C4219EF62800DF4209 /* batch_norm_10.w_1 in Resources */, + C2A754AC219EF62800DF4209 /* conv2d_25.b_0 in Resources */, + C2A75490219EF62800DF4209 /* batch_norm_19.w_1 in Resources */, + C2A754F8219EF62800DF4209 /* depthwise_conv2d_7.w_0 in Resources */, + C2A754D6219EF62800DF4209 /* depthwise_conv2d_1.w_0 in Resources */, + C2A754B1219EF62800DF4209 /* batch_norm_12.w_1 in Resources */, + C2A75495219EF62800DF4209 /* batch_norm_5.w_2 in Resources */, + C2A75458219EF62800DF4209 /* batch_norm_3.w_1 in Resources */, + C2A7549C219EF62800DF4209 /* conv2d_32.b_0 in Resources */, + C2A754E8219EF62800DF4209 /* depthwise_conv2d_4.w_0 in Resources */, + C2A7548A219EF62800DF4209 /* batch_norm_33.w_0 in Resources */, + C2A75491219EF62800DF4209 /* batch_norm_25.w_1 in Resources */, + C2A75466219EF62800DF4209 /* batch_norm_3.w_0 in Resources */, + C2A75474219EF62800DF4209 /* batch_norm_23.w_1 in Resources */, + C2A7546A219EF62800DF4209 /* batch_norm_23.w_0 in Resources */, + C2A754E3219EF62800DF4209 /* batch_norm_14.b_0 in Resources */, + C2A75429219EF62800DF4209 /* ssd_hand_params in Resources */, + C2A754D7219EF62800DF4209 /* depthwise_conv2d_5.w_0 in Resources */, + C2A754B3219EF62800DF4209 /* conv2d_2.w_0 in Resources */, + C2A7547F219EF62800DF4209 /* batch_norm_19.w_0 in Resources */, + C2A75455219EF62800DF4209 /* batch_norm_20.b_0 in Resources */, + C2A754BC219EF62800DF4209 /* batch_norm_0.w_2 in Resources */, + C2A754BF219EF62800DF4209 /* batch_norm_12.w_0 in Resources */, + C2A7547B219EF62800DF4209 /* conv2d_28.b_0 in Resources */, + C2A7545D219EF62800DF4209 /* batch_norm_2.w_0 in Resources */, + C2A754D1219EF62800DF4209 /* conv2d_20.w_0 in Resources */, + C2A75472219EF62800DF4209 /* batch_norm_34.w_0 in Resources */, + C2A754DF219EF62800DF4209 /* batch_norm_26.w_2 in Resources */, + C2A754D9219EF62800DF4209 /* conv2d_25.w_0 in Resources */, + C2A7543A219EF62800DF4209 /* batch_norm_14.w_2 in Resources */, + C2A75488219EF62800DF4209 /* conv2d_8.w_0 in Resources */, + C2A75422219EF62800DF4209 /* combined_mobilenet_model in Resources */, + C2A75441219EF62800DF4209 /* batch_norm_31.b_0 in Resources */, + C2A75446219EF62800DF4209 /* batch_norm_16.w_2 in Resources */, + C2A754E9219EF62800DF4209 /* depthwise_conv2d_6.w_0 in Resources */, + C2A7545B219EF62800DF4209 /* conv2d_11.w_0 in Resources */, + C2A754F9219EF62800DF4209 /* ar_model in Resources */, + C2A7547A219EF62800DF4209 /* batch_norm_24.w_0 in Resources */, + C2A7548D219EF62800DF4209 /* batch_norm_26.w_0 in Resources */, + C2A754B4219EF62800DF4209 /* batch_norm_11.w_0 in Resources */, + C2A7545A219EF62800DF4209 /* batch_norm_21.b_0 in Resources */, + C2A75434219EF62800DF4209 /* conv2d_16.w_0 in Resources */, + C2A75444219EF62800DF4209 /* conv2d_15.w_0 in Resources */, + C2A754E0219EF62800DF4209 /* batch_norm_27.w_2 in Resources */, + C2A75492219EF62800DF4209 /* batch_norm_31.w_1 in Resources */, + C2A754BA219EF62800DF4209 /* batch_norm_11.w_1 in Resources */, + C2A754DA219EF62800DF4209 /* batch_norm_29.b_0 in Resources */, + C2A7546D219EF62800DF4209 /* batch_norm_34.w_1 in Resources */, + C2A7549F219EF62800DF4209 /* batch_norm_15.w_1 in Resources */, + C2A754E1219EF62800DF4209 /* batch_norm_33.w_2 in Resources */, + C2A7543F219EF62800DF4209 /* batch_norm_4.w_0 in Resources */, + C2A7545C219EF62800DF4209 /* batch_norm_0.w_0 in Resources */, + C2A75499219EF62800DF4209 /* conv2d_4.w_0 in Resources */, + C2A75459219EF62800DF4209 /* batch_norm_12.w_2 in Resources */, + C2A754A0219EF62800DF4209 /* batch_norm_29.w_1 in Resources */, + C2A7543B219EF62800DF4209 /* conv2d_17.w_0 in Resources */, + C2A754A4219EF62800DF4209 /* batch_norm_14.w_0 in Resources */, + C2A7544E219EF62800DF4209 /* batch_norm_24.b_0 in Resources */, + C2A7546F219EF62800DF4209 /* batch_norm_0.b_0 in Resources */, + C2A754B2219EF62800DF4209 /* batch_norm_3.w_2 in Resources */, + C2A754AD219EF62800DF4209 /* batch_norm_15.w_0 in Resources */, + C2A754A8219EF62800DF4209 /* conv2d_30.b_0 in Resources */, + C2A75456219EF62800DF4209 /* batch_norm_13.w_2 in Resources */, + C2A75498219EF62800DF4209 /* conv2d_27.b_0 in Resources */, + C2A7544F219EF62800DF4209 /* batch_norm_30.b_0 in Resources */, + C2A7543C219EF62800DF4209 /* batch_norm_33.b_0 in Resources */, + C2A75420219EF62800DF4209 /* model in Resources */, + C2A7548F219EF62800DF4209 /* batch_norm_7.b_0 in Resources */, + C2A754CE219EF62800DF4209 /* depthwise_conv2d_2.w_0 in Resources */, + C2A754C8219EF62800DF4209 /* conv2d_23.w_0 in Resources */, + C2A7542A219EF62800DF4209 /* ssd_hand_model in Resources */, + C2A75485219EF62800DF4209 /* batch_norm_18.w_1 in Resources */, + C2A75486219EF62800DF4209 /* batch_norm_6.b_0 in Resources */, + C2A754A1219EF62800DF4209 /* batch_norm_17.w_1 in Resources */, + C2A75475219EF62800DF4209 /* batch_norm_27.w_1 in Resources */, + C2A7549B219EF62800DF4209 /* conv2d_26.b_0 in Resources */, + C2A75442219EF62800DF4209 /* conv2d_29.w_0 in Resources */, + C2A754C2219EF62800DF4209 /* conv2d_23.b_0 in Resources */, + C2A7546E219EF62800DF4209 /* batch_norm_22.w_1 in Resources */, + C2A7548C219EF62800DF4209 /* conv2d_9.w_0 in Resources */, + C2A754BB219EF62800DF4209 /* depthwise_conv2d_10.w_0 in Resources */, + C2A75433219EF62800DF4209 /* batch_norm_32.b_0 in Resources */, + C2A75453219EF62800DF4209 /* conv2d_10.w_0 in Resources */, + C2A754A9219EF62800DF4209 /* conv2d_31.b_0 in Resources */, + C2A754EA219EF62800DF4209 /* conv2d_32.w_0 in Resources */, + C2A754C3219EF62800DF4209 /* batch_norm_1.w_2 in Resources */, + C2A75457219EF62800DF4209 /* batch_norm_2.w_1 in Resources */, + C2A754CA219EF62800DF4209 /* batch_norm_34.w_2 in Resources */, + C2A754EE219EF62800DF4209 /* batch_norm_25.w_2 in Resources */, + C2A75462219EF62800DF4209 /* batch_norm_0.w_1 in Resources */, + C2A754DE219EF62800DF4209 /* batch_norm_32.w_2 in Resources */, + C2A754BD219EF62800DF4209 /* conv2d_22.b_0 in Resources */, + C2A754A2219EF62800DF4209 /* batch_norm_9.b_0 in Resources */, + C2A75430219EF62800DF4209 /* model in Resources */, + C2A7549E219EF62800DF4209 /* batch_norm_4.w_2 in Resources */, + C2A754C9219EF62800DF4209 /* batch_norm_20.w_2 in Resources */, + C2A754FA219EF62800DF4209 /* ar_params in Resources */, + C2A754EB219EF62800DF4209 /* conv2d_26.w_0 in Resources */, + C2A754CF219EF62800DF4209 /* depthwise_conv2d_0.w_0 in Resources */, + C2A75484219EF62800DF4209 /* batch_norm_24.w_1 in Resources */, + C2A7543E219EF62800DF4209 /* batch_norm_6.w_0 in Resources */, + C2A75489219EF62800DF4209 /* batch_norm_27.w_0 in Resources */, + C2A754EC219EF62800DF4209 /* batch_norm_16.b_0 in Resources */, + C2A754B8219EF62800DF4209 /* depthwise_conv2d_12.w_0 in Resources */, + C2A754D0219EF62800DF4209 /* batch_norm_10.b_0 in Resources */, + C2E33ADE217EB80E0097FDD6 /* synset.txt in Resources */, + C2A75431219EF62800DF4209 /* batch_norm_7.w_0 in Resources */, + C2A754F1219EF62800DF4209 /* batch_norm_9.w_1 in Resources */, + C2A75439219EF62800DF4209 /* batch_norm_28.w_2 in Resources */, + C2A75448219EF62800DF4209 /* batch_norm_7.w_1 in Resources */, + C2A75478219EF62800DF4209 /* batch_norm_18.w_0 in Resources */, + C2A75423219EF62800DF4209 /* yolo_params in Resources */, + C2A7542C219EF62800DF4209 /* params in Resources */, + C2E33AE0217EB80E0097FDD6 /* hand.jpg in Resources */, + C2A754DD219EF62800DF4209 /* batch_norm_15.b_0 in Resources */, + C2A7548B219EF62800DF4209 /* batch_norm_32.w_0 in Resources */, + C2A754E2219EF62800DF4209 /* conv2d_18.w_0 in Resources */, + C2A754D2219EF62800DF4209 /* batch_norm_23.w_2 in Resources */, + C2A7544D219EF62800DF4209 /* conv2d_28.w_0 in Resources */, + C2A754C0219EF62800DF4209 /* batch_norm_13.w_0 in Resources */, + C2A75443219EF62800DF4209 /* batch_norm_25.b_0 in Resources */, + C2A7542D219EF62800DF4209 /* model in Resources */, + C2A75426219EF62800DF4209 /* genet_model in Resources */, + C2A754CD219EF62800DF4209 /* batch_norm_12.b_0 in Resources */, + C2A7546C219EF62800DF4209 /* batch_norm_20.w_1 in Resources */, + C2A754DC219EF62800DF4209 /* conv2d_19.w_0 in Resources */, + C2A754E6219EF62800DF4209 /* batch_norm_28.b_0 in Resources */, + C2A75449219EF62800DF4209 /* batch_norm_6.w_1 in Resources */, FC039B8720E11C550081E9F8 /* Main.storyboard in Resources */, + C2A7548E219EF62800DF4209 /* batch_norm_8.w_2 in Resources */, + C2A75467219EF62800DF4209 /* batch_norm_21.w_1 in Resources */, + C2A754DB219EF62800DF4209 /* conv2d_31.w_0 in Resources */, + C2A754F3219EF62800DF4209 /* batch_norm_24.w_2 in Resources */, + C2A75451219EF62800DF4209 /* batch_norm_5.w_0 in Resources */, + C2A7546B219EF62800DF4209 /* batch_norm_2.b_0 in Resources */, + C2A75460219EF62800DF4209 /* batch_norm_10.w_2 in Resources */, + C2A7544B219EF62800DF4209 /* conv2d_14.w_0 in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -490,7 +1422,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = A798K58VVL; + DEVELOPMENT_TEAM = 6K8JTBT3MF; ENABLE_BITCODE = NO; INFOPLIST_FILE = "paddle-mobile-demo/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; @@ -517,7 +1449,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = A798K58VVL; + DEVELOPMENT_TEAM = 6K8JTBT3MF; ENABLE_BITCODE = NO; INFOPLIST_FILE = "paddle-mobile-demo/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; diff --git a/metal/paddle-mobile-demo/paddle-mobile-demo/Net/MetalHelper.swift b/metal/paddle-mobile-demo/paddle-mobile-demo/Net/MetalHelper.swift index d314e8b3f8845ef95b36b4b25e61809d353f0f24..a4a2b3488bf5a7da419ab68f12166cf96792d390 100644 --- a/metal/paddle-mobile-demo/paddle-mobile-demo/Net/MetalHelper.swift +++ b/metal/paddle-mobile-demo/paddle-mobile-demo/Net/MetalHelper.swift @@ -17,7 +17,7 @@ import MetalKit import Foundation import paddle_mobile -class MetalHelper { +public class MetalHelper { let device: MTLDevice let queue: MTLCommandQueue let textureLoader: MTKTextureLoader diff --git a/metal/paddle-mobile-demo/paddle-mobile-demo/ViewController.swift b/metal/paddle-mobile-demo/paddle-mobile-demo/ViewController.swift index 1c6d0a91c9bf1d202091282e43859270a238edaa..64a553f98ff15c47933bcbb79b867daeef9b43f8 100644 --- a/metal/paddle-mobile-demo/paddle-mobile-demo/ViewController.swift +++ b/metal/paddle-mobile-demo/paddle-mobile-demo/ViewController.swift @@ -23,23 +23,23 @@ let threadSupport: [(Platform, String)] = [(.GPU, "GPU"), (.CPU, "CPU")] //.mobilenet_ssd : Runner.init(inNet: MobileNet_ssd_hand.init(device: MetalHelper.shared.device), commandQueue: MetalHelper.shared.queue, inPlatform: platform), let modelHelperMap: [SupportModel : Runner] = [ - .genet : Runner.init(inNet: Genet.init(device: MetalHelper.shared.device), commandQueue: MetalHelper.shared.queue, inPlatform: platform), - .mobilenet_ssd_ar : Runner.init(inNet: MobileNet_ssd_AR.init(device: MetalHelper.shared.device), commandQueue: MetalHelper.shared.queue, inPlatform: platform)] + .yolo : Runner.init(inNet: YoloNet.init(device: MetalHelper.shared.device), commandQueue: MetalHelper.shared.queue, inPlatform: platform), + .mobilenet_combined : Runner.init(inNet: MobileNetCombined.init(device: MetalHelper.shared.device), commandQueue: MetalHelper.shared.queue, inPlatform: platform)] //, .genet : Genet.init() //let modelHelperMap: [SupportModel : Net] = [.mobilenet : MobileNet.init(), .mobilenet_ssd : MobileNet_ssd_hand.init()] -let netSupport: [SupportModel : Net] = [.genet : Genet.init(device: MetalHelper.shared.device), .mobilenet_ssd_ar : MobileNet_ssd_AR.init(device: MetalHelper.shared.device)] +let netSupport: [SupportModel : Net] = [.yolo : YoloNet.init(device: MetalHelper.shared.device), .mobilenet_combined : MobileNetCombined.init(device: MetalHelper.shared.device)] enum SupportModel: String{ // case mobilenet = "mobilenet" // case mobilenet_ssd = "mobilenetssd" - case genet = "genet" - case mobilenet_ssd_ar = "mobilenetssd_ar" + case yolo = "yolo" + case mobilenet_combined = "mobilenet_combined" static func supportedModels() -> [SupportModel] { // .mobilenet, // .mobilenet_ssd, - return [.genet, .mobilenet_ssd_ar] + return [.yolo, .mobilenet_combined] } } @@ -98,7 +98,7 @@ class ViewController: UIViewController { } @IBAction func predictAct(_ sender: Any) { - let max = 50 + let max = 1 switch platform { case .GPU: guard let inTexture = toPredictTexture else { @@ -106,11 +106,11 @@ class ViewController: UIViewController { return } - for _ in 0..<10{ - runner.predict(texture: inTexture) { (success, resultHolder) in - resultHolder?.releasePointer() - } - } +// for _ in 0..<1{ +// runner.predict(texture: inTexture) { (success, resultHolder) in +// resultHolder?.releasePointer() +// } +// } let startDate = Date.init() for i in 0.. String { + // fatalError() + return " \(res.result![0]) ... " + } + +} diff --git a/metal/paddle-mobile/paddle-mobile/Net.swift b/metal/paddle-mobile/paddle-mobile/Net.swift index ce9ec98a66e685eec3a688a5a29402a76567b0e2..994eb709fcc3e38ab35e5af0cfd7e35bc60835d7 100644 --- a/metal/paddle-mobile/paddle-mobile/Net.swift +++ b/metal/paddle-mobile/paddle-mobile/Net.swift @@ -14,6 +14,7 @@ import Foundation +import Metal public class ResultHolder: NSObject { @objc public let result: UnsafeMutablePointer? diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Base/OpCreator.swift b/metal/paddle-mobile/paddle-mobile/Operators/Base/OpCreator.swift index 9806042e9eb339d6d15f2cbfebe924b548d29922..ce9146b7407558e87abe86102cd6fd1f19a6f4fb 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Base/OpCreator.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/Base/OpCreator.swift @@ -67,7 +67,8 @@ class OpCreator { gFlatten : FlattenOp

.creat, gConvAddPreluType : ConvAddPreluOp

.creat, gConvAddAddPreluType : ConvAddAddPreluOp

.creat, - gElementwiseAddPreluType: ElementwiseAddPreluOp

.creat] + gElementwiseAddPreluType : ElementwiseAddPreluOp

.creat, + gFusionConvAddType : ConvAddOp

.creat] private init(){} } diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Base/OpParam.swift b/metal/paddle-mobile/paddle-mobile/Operators/Base/OpParam.swift index 9f868e35864d59be5711c4ac0a02787638eeae8f..b0ac4c231a6d1ad8473eddb1109df1eabb0c59a7 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Base/OpParam.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/Base/OpParam.swift @@ -26,7 +26,7 @@ protocol OpParam { var output: OutputType { get set } func outputDesc() -> String - associatedtype ParamPrecisionType: PrecisionType + //associatedtype ParamPrecisionType: PrecisionType init(opDesc: OpDesc, inScope: Scope) throws static func getFirstTensor(key: String, map: [String : [String]], from: Scope) throws -> VarType static func inputX(inputs: [String : [String]], from: Scope) throws -> VarType diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Base/Operator.swift b/metal/paddle-mobile/paddle-mobile/Operators/Base/Operator.swift index 40698da5ecb047dbf557cea18556616020ee9750..c7e8a6366db844ea481396cb098fcc56694e6319 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Base/Operator.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/Base/Operator.swift @@ -158,7 +158,8 @@ let gShape = "shape" let gFlatten = "flatten" let gConvAddPreluType = "conv_add_prelu" let gConvAddAddPreluType = "conv_add_add_prelu" -let gElementwiseAddPreluType = "elementwise_add_prelu" +let gElementwiseAddPreluType = "elementwise_add_prelu" +let gFusionConvAddType = "fusion_conv_add" let opInfos = [gConvType : (inputs: ["Input"], outputs: ["Output"]), @@ -188,5 +189,6 @@ let opInfos = [gConvType : (inputs: ["Input"], outputs: ["Out gFlatten : (inputs: ["X"], outputs: ["Out"]), gConvAddPreluType : (inputs: ["Input"], outputs: ["Out"]), gConvAddAddPreluType : (inputs: ["Input"], outputs: ["Out"]), - gElementwiseAddPreluType : (inputs: ["X"], outputs: ["Out"]) + gElementwiseAddPreluType : (inputs: ["X"], outputs: ["Out"]), + gFusionConvAddType : (inputs: ["Input"], outputs: ["Out"]) ] diff --git a/metal/paddle-mobile/paddle-mobile/Operators/BatchNormOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/BatchNormOp.swift index 9fc20f8a597d39d3b628c5e1033f9c5cceac45ed..ad8eef3cd5865d7ad6d4ae7c3a218f4a05205883 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/BatchNormOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/BatchNormOp.swift @@ -13,9 +13,10 @@ limitations under the License. */ import Foundation +import Metal class BatchNormParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { input = try BatchNormParam.inputX(inputs: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/BilinearInterpOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/BilinearInterpOp.swift index 8db64ac3a473fe59e7821f11abeb3437c337459d..5ba66217e34b2f591e520b9b7ea8d2ff762a01d7 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/BilinearInterpOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/BilinearInterpOp.swift @@ -13,9 +13,10 @@ limitations under the License. */ import Foundation +import Metal class BilinearInterpParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { input = try BilinearInterpParam.inputX(inputs: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/BoxcoderOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/BoxcoderOp.swift index 0e1d5f0c53128bbc2f0b5e94d2075eecdef0fcc6..ad7530d73de6bdc81d5c63677c69d13542c9578a 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/BoxcoderOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/BoxcoderOp.swift @@ -15,7 +15,7 @@ import Foundation class BoxcoderParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { priorBox = try BoxcoderParam.getFirstTensor(key: "PriorBox", map: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ConcatOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ConcatOp.swift index d5320136190bb1b7af124b762b719921c1d25200..cbf4c66285be6865c2f5012bc7cc0f9063f50575 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ConcatOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ConcatOp.swift @@ -15,7 +15,7 @@ import Foundation class ConcatParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { guard let xlist = opDesc.inputs["X"] else { diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ConvAddAddPreluOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ConvAddAddPreluOp.swift index e5bded65a1a8944d337fea65995af79cab580105..859b60238ef6c7b1b7de36422f1bae4517d6096b 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ConvAddAddPreluOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ConvAddAddPreluOp.swift @@ -13,9 +13,10 @@ limitations under the License. */ import Foundation +import Metal class ConvAddAddPreluParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { filter = try ConvAddAddPreluParam.inputFilter(paraInputs: opDesc.paraInputs, from: inScope) @@ -34,8 +35,8 @@ class ConvAddAddPreluParam: OpParam { } let input: Texture

- let y: Tensor - let filter: Tensor + let y: Tensor

+ let filter: Tensor

let mode: String let alpha: Tensor

var output: Texture

diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ConvAddBatchNormReluOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ConvAddBatchNormReluOp.swift index 43935b65d1442d7c2e1ca3db49168140569c433f..4becb1d13aace70b0662c4f85f8f37284e5abe93 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ConvAddBatchNormReluOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ConvAddBatchNormReluOp.swift @@ -16,7 +16,7 @@ import Foundation class ConvAddBatchNormReluParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { @@ -42,12 +42,12 @@ class ConvAddBatchNormReluParam: OpParam { let input: Texture

- let variance: Tensor - let bias: Tensor - let mean: Tensor - let scale: Tensor - let y: Tensor - let filter: Tensor + let variance: Tensor

+ let bias: Tensor

+ let mean: Tensor

+ let scale: Tensor

+ let y: Tensor

+ let filter: Tensor

let epsilon: Float32 var newScale: MTLBuffer? var newBiase: MTLBuffer? diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ConvAddOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ConvAddOp.swift index 5e184844d886beb19ac5ff297f8a270af8a076fa..0fd543ede463edaa16edf563e66aaebf83e765a1 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ConvAddOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ConvAddOp.swift @@ -15,7 +15,7 @@ import Foundation class ConvAddParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { filter = try ConvAddParam.inputFilter(paraInputs: opDesc.paraInputs, from: inScope) @@ -33,8 +33,8 @@ class ConvAddParam: OpParam { } let input: Texture

- let y: Tensor - let filter: Tensor + let y: Tensor

+ let filter: Tensor

var output: Texture

let stride: [Int32] diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ConvAddPreluOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ConvAddPreluOp.swift index 0a0fcc7d7934e1c3c7a48f6925105b02ec6d8fc9..23652374d97e1e2a722f8ea38f0020a3882dbce1 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ConvAddPreluOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ConvAddPreluOp.swift @@ -15,7 +15,7 @@ import Foundation class ConvAddPreluParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { filter = try ConvAddPreluParam.inputFilter(paraInputs: opDesc.paraInputs, from: inScope) @@ -34,8 +34,8 @@ class ConvAddPreluParam: OpParam { } let input: Texture

- let y: Tensor - let filter: Tensor + let y: Tensor

+ let filter: Tensor

let mode: String let alpha: Tensor

var output: Texture

diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ConvBNReluOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ConvBNReluOp.swift index 959fe44b98dabec2b39fdfdb438d482d720caa61..f090ab1e73a10125cfe676ed4788142ea2f73039 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ConvBNReluOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ConvBNReluOp.swift @@ -15,7 +15,7 @@ import Foundation class ConvBNReluParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { filter = try ConvBNReluParam.inputFilter(paraInputs: opDesc.paraInputs, from: inScope) @@ -38,11 +38,11 @@ class ConvBNReluParam: OpParam { let input: Texture

- let variance: Tensor - let bias: Tensor - let mean: Tensor - let scale: Tensor - let filter: Tensor + let variance: Tensor

+ let bias: Tensor

+ let mean: Tensor

+ let scale: Tensor

+ let filter: Tensor

let epsilon: Float32 var newScale: MTLBuffer? var newBiase: MTLBuffer? diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ConvOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ConvOp.swift index e82eb1f4753f0ebfdb5a949c85181a0ae52ea2da..ba3ff7fad477cad2914c851b1a34a67f0f839b77 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ConvOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ConvOp.swift @@ -15,7 +15,7 @@ import Foundation class ConvParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { filter = try ConvParam.inputFilter(paraInputs: opDesc.paraInputs, from: inScope) @@ -32,7 +32,7 @@ class ConvParam: OpParam { } let input: Texture

- let filter: Tensor + let filter: Tensor

var output: Texture

let stride: [Int32] let paddings: [Int32] diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ConvTransposeOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ConvTransposeOp.swift index 9ec6f7bd60260b5808e469129e9c292ff9837f7c..d4bd4140e5097f77fd5bc295a940a8df800a7258 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ConvTransposeOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ConvTransposeOp.swift @@ -15,8 +15,8 @@ import Foundation class ConvTransposeParam: ConvParam

{ - typealias ParamPrecisionType = P - required init(opDesc: OpDesc, inScope: Scope) throws { + //typealias ParamPrecisionType = P + required init(opDesc: OpDesc, inScope: Scope) throws { do { try super.init(opDesc: opDesc, inScope: inScope) } catch let error { diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ElementwiseAddOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ElementwiseAddOp.swift index ae040dd65f74fc222275bc579338107f2ea188fd..f27a3e5d545c81bbec0493a160a70c70d402c7a3 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ElementwiseAddOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ElementwiseAddOp.swift @@ -13,9 +13,10 @@ // limitations under the License. */ import Foundation +import Metal class ElementwiseAddParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { inputX = try ElementwiseAddParam.inputX(inputs: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ElementwiseAddPreluOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ElementwiseAddPreluOp.swift index 333303e9bb7c1224ff50d69b5523edabe0fc81a6..1b11cc156ea843e61cc762f0cbe8afc453bd0dbf 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ElementwiseAddPreluOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ElementwiseAddPreluOp.swift @@ -13,9 +13,10 @@ limitations under the License. */ import Foundation +import Metal class ElementwiseAddPreluParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { alpha = try ElementwiseAddPreluParam.paramInputAlpha(inputs: opDesc.paraInputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/FeedOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/FeedOp.swift index 382ea58b844b25bb855ed7cdc155a860bca45da5..20775015a098b6e4c4008eb88da39cf5f4e30567 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/FeedOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/FeedOp.swift @@ -13,6 +13,8 @@ limitations under the License. */ import Foundation +import MetalKit +import CoreMedia class FeedParam: OpParam{ var output: Texture

@@ -30,7 +32,7 @@ class FeedParam: OpParam{ } } - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P } class FeedOp: Operator, FeedParam

>, Runable, Creator, InferShaperable { diff --git a/metal/paddle-mobile/paddle-mobile/Operators/FetchOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/FetchOp.swift index ade5b09099b69f4784b33a3b108cfcfe1aa1ea7f..332659317232186270afe9d6e393fb877c08eec4 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/FetchOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/FetchOp.swift @@ -13,6 +13,7 @@ limitations under the License. */ import Foundation +import Metal class FetchParam: OpParam{ var output: FetchHolder @@ -29,7 +30,7 @@ class FetchParam: OpParam{ } } - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P } class FetchKernel: Kernel, Computable { diff --git a/metal/paddle-mobile/paddle-mobile/Operators/FlattenOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/FlattenOp.swift index 4fc5f222932ce98c4bf3e29bdf6cd8c666f5f9f1..f881684d792f73f975f98bdf0a2a9bf83630dd5f 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/FlattenOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/FlattenOp.swift @@ -15,7 +15,7 @@ import Foundation class FlattenParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { input = try FlattenParam.inputX(inputs: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ConcatKernel.swift b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ConcatKernel.swift index 81ef46c0b3e919615d07f667851007e95b02d54f..4f10d35c836eb59106b4ae44e1e0716ffa3d6d23 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ConcatKernel.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ConcatKernel.swift @@ -13,6 +13,7 @@ limitations under the License. */ import Foundation +import Metal struct ConcatTestParam: TestParam { var input: [MTLTexture] diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ConvAddBatchNormReluKernel.swift b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ConvAddBatchNormReluKernel.swift index 66324dd47086fd7c1ccffb674c0f8b8623416e0d..c8ebb7d941e14615385214d725a6b4c4e7e97e10 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ConvAddBatchNormReluKernel.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ConvAddBatchNormReluKernel.swift @@ -13,6 +13,7 @@ limitations under the License. */ import Foundation +import Metal struct ConvAddBatchNormReluTestParam: TestParam { let inputTexture: MTLTexture diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ShapeKernel.swift b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ShapeKernel.swift index feb052a44fdc7c6134cc90f07f3fc94ad0a497df..e65cf90a94f423d4fbd159764e000c823992ba4f 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ShapeKernel.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/ShapeKernel.swift @@ -12,6 +12,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +import Metal import Foundation struct ShapeMetalParam { diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/Texture2DTo2DArrayKernel.swift b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/Texture2DTo2DArrayKernel.swift index 0943686660e4bdd91b6cd909dff04cdd497cd817..a207f275911fc7b2a12ce706a80f14e7578193fe 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/Texture2DTo2DArrayKernel.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/Texture2DTo2DArrayKernel.swift @@ -13,6 +13,8 @@ limitations under the License. */ import Foundation +import MetalKit +import CoreMedia struct Texture2DTo2DArrayParam { let input: MTLTexture diff --git a/metal/paddle-mobile/paddle-mobile/Operators/MulticlassNMSOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/MulticlassNMSOp.swift index fc1b3164c9cf623a1bc4d350cc8a5f72c369bae4..0e003a2fe856f73040249233beb4ab1a8e8bb760 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/MulticlassNMSOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/MulticlassNMSOp.swift @@ -15,7 +15,7 @@ import Foundation class MulticlassNMSParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { scores = try MulticlassNMSParam.getFirstTensor(key: "Scores", map: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/PoolOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/PoolOp.swift index 6f42f2aa9f8d0515946ace625ed16c5040fd3099..c8f25dbce290405e6949a0d0571b46108b394ff8 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/PoolOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/PoolOp.swift @@ -15,7 +15,7 @@ import Foundation class PoolParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { input = try PoolParam.inputX(inputs: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/PreluOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/PreluOp.swift index 2d7987e937b9ddf6410ebb0d23bb89c76c1a13ce..94c81b2158ed622c627e862a66a00397e3a8b2d8 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/PreluOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/PreluOp.swift @@ -15,7 +15,7 @@ import Foundation class PreluParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { input = try PreluParam.inputX(inputs: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/PriorBoxOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/PriorBoxOp.swift index 2a9f18463483a024545300661e1db33cedce585b..1b4bf67a71276c6c0dc2c377edca7780776837d6 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/PriorBoxOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/PriorBoxOp.swift @@ -15,7 +15,7 @@ import Foundation class PriorBoxParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { min_max_aspect_ratios_order = try PriorBoxParam.getAttr(key: "min_max_aspect_ratios_order", attrs: opDesc.attrs) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ReluOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ReluOp.swift index 7748df75fef3a2280a51dda159ead0392e146443..deefb69464627433727e0da5557b73644962aafb 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ReluOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ReluOp.swift @@ -16,7 +16,7 @@ import Foundation class ReluParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { input = try ReluParam.inputX(inputs: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ReshapeOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ReshapeOp.swift index ac46baca91bd6eedab9241da68a05d08391ec931..bb7a20e9a0573d9ce3547c31d27753b7ec653724 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ReshapeOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ReshapeOp.swift @@ -13,9 +13,10 @@ limitations under the License. */ import Foundation +import Metal class ReshapeParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { input = try ReshapeParam.inputX(inputs: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/ShapeOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/ShapeOp.swift index b37eed0a9d398923bb866444cf224cb79bb2fecc..cbe9b44fa40c1f99d27450da938ad06e9d162e62 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/ShapeOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/ShapeOp.swift @@ -15,7 +15,7 @@ import Foundation class ShapeParam: OpParam { - typealias ParamPrecisionType = P + // typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { input = try ShapeParam.input(inputs: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/SoftmaxOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/SoftmaxOp.swift index 66b5c7b3146d4c433e12b846a971e4b5ae579f79..3931965b0508fba64d661045ba98c5f0f8e1e56c 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/SoftmaxOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/SoftmaxOp.swift @@ -13,16 +13,17 @@ limitations under the License. */ import Foundation +import Metal class SoftmaxParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { input = try SoftmaxParam.inputX(inputs: opDesc.inputs, from: inScope) output = try SoftmaxParam.outputOut(outputs: opDesc.outputs, from: inScope) - assert(input.tensorDim.dims.count == 2) - assert(input.transpose == [0, 1, 2, 3]) + //assert(input.tensorDim.dims.count == 2) + //assert(input.transpose == [0, 1, 2, 3]) output.dim = input.dim output.tensorDim = input.tensorDim diff --git a/metal/paddle-mobile/paddle-mobile/Operators/SplitOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/SplitOp.swift index 4495902a46426e2a866ba81a2aa761951605f940..98c3b709232dc095a331d808dd1c87987afe90fd 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/SplitOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/SplitOp.swift @@ -15,7 +15,7 @@ import Foundation class SplitParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { input = try SplitParam.inputX(inputs: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/Operators/TransposeOp.swift b/metal/paddle-mobile/paddle-mobile/Operators/TransposeOp.swift index 8b695ec76fcd46b46f503e21e70f8aac52cee717..87f3fa0ff314294c75c431cc12229dd1100dac4d 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/TransposeOp.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/TransposeOp.swift @@ -13,9 +13,10 @@ limitations under the License. */ import Foundation +import Metal class TransposeParam: OpParam { - typealias ParamPrecisionType = P + //typealias ParamPrecisionType = P required init(opDesc: OpDesc, inScope: Scope) throws { do { input = try TransposeParam.inputX(inputs: opDesc.inputs, from: inScope) diff --git a/metal/paddle-mobile/paddle-mobile/PaddleMobile.swift b/metal/paddle-mobile/paddle-mobile/PaddleMobile.swift index a6ed8d400ede11a09c4e10ac4dd84273dcf079dc..b66d4ccca600d247f83a662b501ea973f6ca7c9e 100644 --- a/metal/paddle-mobile/paddle-mobile/PaddleMobile.swift +++ b/metal/paddle-mobile/paddle-mobile/PaddleMobile.swift @@ -33,7 +33,7 @@ class ScaleKernel: CusomKernel { } -public class Runner: NSObject { +@objc public class Runner: NSObject { var program: Program? var executor: Executor? var queue: MTLCommandQueue? diff --git a/metal/paddle-mobile/paddle-mobile/Program/ProgramOptimize.swift b/metal/paddle-mobile/paddle-mobile/Program/ProgramOptimize.swift index 87aced32c0c2cd576f023eeb5a3daad15daf1ce8..a62b4688aa5a806bbb823f22ba3329ee38de719f 100644 --- a/metal/paddle-mobile/paddle-mobile/Program/ProgramOptimize.swift +++ b/metal/paddle-mobile/paddle-mobile/Program/ProgramOptimize.swift @@ -203,6 +203,7 @@ class ProgramOptimize { var typeMapNodes: [String : [(node: Node, output: [String : Node])]] = [:] let block = originProgramDesc.blocks[0] for opDesc in block.ops { + print(opDesc.type) guard let opInputKeys = opInfos[opDesc.type]?.inputs, let outputKeys = opInfos[opDesc.type]?.outputs else { fatalError() } diff --git a/metal/paddle-mobile/paddle-mobile/Program/VarDesc.swift b/metal/paddle-mobile/paddle-mobile/Program/VarDesc.swift index f29169598f69ec568bd9d08af8fa4738fe8f5eea..810c2bbf4a33968c6f2268a3f4356cc02f82490a 100644 --- a/metal/paddle-mobile/paddle-mobile/Program/VarDesc.swift +++ b/metal/paddle-mobile/paddle-mobile/Program/VarDesc.swift @@ -85,6 +85,7 @@ extension VarDesc: CustomStringConvertible, CustomDebugStringConvertible { if let inTensorDesc = tensorDesc { str += " dim size: \(inTensorDesc.dims.count) \n" str += " dim: \(inTensorDesc.dims) \n" + str += "type:\(self.type) \n" } else { str += " no dim info" } diff --git a/metal/paddle-mobile/paddle-mobile/YoloNet.swift b/metal/paddle-mobile/paddle-mobile/YoloNet.swift new file mode 100644 index 0000000000000000000000000000000000000000..f3faf79a5bc49b33968f3ce16a6c9e7e40deac45 --- /dev/null +++ b/metal/paddle-mobile/paddle-mobile/YoloNet.swift @@ -0,0 +1,49 @@ +// +// YoloNet.swift +// paddle-mobile +// +// Created by Xiao,Haichun on 2018/12/5. +// Copyright © 2018 orange. All rights reserved. +// + +import Foundation +import Metal + +public class YoloNet: Net { + @objc public override init(device: MTLDevice) { + super.init(device: device) + means = [0, 0, 0] + scale = 1 + except = 0 + modelPath = Bundle.main.path(forResource: "yolo_model", ofType: nil) ?! "model null" + paramPath = Bundle.main.path(forResource: "yolo_params", ofType: nil) ?! "para null" + modelDir = "" + //preprocessKernel = GenetPreProccess.init(device: device) + dim = (n: 1, h: 224, w: 224, c: 3) + } + + @objc override public init(device: MTLDevice,paramPointer: UnsafeMutableRawPointer, paramSize:Int, modePointer: UnsafeMutableRawPointer, modelSize: Int) { + super.init(device:device,paramPointer:paramPointer,paramSize:paramSize,modePointer:modePointer,modelSize:modelSize) + means = [0, 0, 0] + scale = 1 + except = 0 + modelPath = "" + paramPath = "" + modelDir = "" + //preprocessKernel = GenetPreProccess.init(device: device) + dim = (n: 1, h: 224, w: 224, c: 3) + } + +// class GenetPreProccess: CusomKernel { +// init(device: MTLDevice) { +// let s = CusomKernel.Shape.init(inWidth: 128, inHeight: 128, inChannel: 3) +// super.init(device: device, inFunctionName: "genet_preprocess", outputDim: s, usePaddleMobileLib: false) +// } +// } + + override public func resultStr(res: ResultHolder) -> String { + // fatalError() + return " \(res.result![0]) ... " + } + +} diff --git a/metal/paddle-mobile/paddle-mobile/framework/Tensor.swift b/metal/paddle-mobile/paddle-mobile/framework/Tensor.swift index c5ee1414521e7eb92011d4f4b608ad326b005531..4da06e12294bd54f2bc9d7656c89be1dfd6930be 100644 --- a/metal/paddle-mobile/paddle-mobile/framework/Tensor.swift +++ b/metal/paddle-mobile/paddle-mobile/framework/Tensor.swift @@ -13,8 +13,10 @@ limitations under the License. */ import Foundation +import MetalKit +import CoreMedia -protocol Tensorial: CustomStringConvertible, CustomDebugStringConvertible{ +protocol Tensorial: Variant { var dim: Dim { get set } func numel() -> Int var layout: DataLayout { get } @@ -61,7 +63,7 @@ class Tensor: Tensorial { } } - required init(inDim: Dim, inLayout: DataLayout = DataLayout.NCHW()) { + init(inDim: Dim, inLayout: DataLayout = DataLayout.NCHW()) { dim = inDim let size = inDim.numel() * MemoryLayout

.size let pointer = UnsafeMutablePointer

.allocate(capacity: size) diff --git a/src/fpga/V2/api.cpp b/src/fpga/V2/api.cpp index 8010e43a61c8f8d1b5fb00370b987ab14cbf2727..6e1090c00e13ba1403808fb3af53b1965409dc06 100644 --- a/src/fpga/V2/api.cpp +++ b/src/fpga/V2/api.cpp @@ -204,7 +204,8 @@ void fill_split_arg(struct SplitConvArgs *arg, framework::Tensor *input, arg->conv_arg[i].image.address = input_ptr; arg->conv_arg[i].image.scale_address = input->scale; - arg->conv_arg[i].image.channels = (uint32_t)input->dims()[1]; + arg->conv_arg[i].image.channels = + (uint32_t)get_aligned_channel_num((int)(input->dims()[1])); // NOLINT arg->conv_arg[i].image.height = (uint32_t)input->dims()[2]; arg->conv_arg[i].image.width = (uint32_t)input->dims()[3]; arg->conv_arg[i].image.pad_height = (uint32_t)padding_h; @@ -216,7 +217,7 @@ void fill_split_arg(struct SplitConvArgs *arg, framework::Tensor *input, int num_after_alignment = filter::calc_aligned_num( arg->filter_num, (int)input->dims()[1]); // NOLINT arg->conv_arg[i].free_space = - fpga_malloc(num_after_alignment * 2 * sizeof(half)); + fpga_malloc(num_after_alignment * 2 * sizeof(float)); // half } } diff --git a/src/fpga/V2/filter.cpp b/src/fpga/V2/filter.cpp index b17ce4406bf1b6b4619d0e9e75d3f432dfa84fb1..3b0692a99e0119491505683d9fe874aaef8eac39 100644 --- a/src/fpga/V2/filter.cpp +++ b/src/fpga/V2/filter.cpp @@ -16,7 +16,6 @@ limitations under the License. */ #include #include #include "fpga/common/fpga_common.h" - namespace paddle_mobile { namespace fpga { namespace filter { @@ -88,12 +87,25 @@ void align_filter(float **data_in, int num, int channel, int height, *data_in = new_data; fpga_free(temp); } - +void convert_to_fp16(float **data_in, int data_size) { + float *tmp = *data_in; + // half_float::half *tmp_data = (half_float::half *)fpga_malloc(data_size * + // sizeof(half_float::half)); + int16_t *tmp_data = + (int16_t *)fpga_malloc(data_size * sizeof(int16_t)); // NOLINT + for (int i = 0; i < data_size; i++) { + // tmp_data[i] = (half_float::half)((*data_in)[i]); + tmp_data[i] = fp32_2_fp16((*data_in)[i]); + } + *data_in = (float *)tmp_data; // NOLINT + fpga_free(tmp); +} void format_filter(float **data_in, int num, int channel, int height, int width, int group_num, float max) { convert_to_hwc(data_in, num, channel, height, width); align_filter(data_in, num, channel, height, width); int pixel_num = calc_aligned_total_pixel_num(num, channel, height, width); + convert_to_fp16(data_in, pixel_num); fpga_flush(*data_in, pixel_num * sizeof(float)); } @@ -115,6 +127,7 @@ void format_fc_filter(float **data_in, int num, int channel, int height, convert_fc_filter(data_in, num, chw); align_filter(data_in, num, channel, height, width); int pixel_num = calc_aligned_total_pixel_num(num, channel, height, width); + convert_to_fp16(data_in, pixel_num); fpga_flush(*data_in, pixel_num * sizeof(float)); } diff --git a/src/fpga/V2/pe.cpp b/src/fpga/V2/pe.cpp index 35ef06de2d7b3adf5d8d71722319f66026635eaa..d22bd171758251cacfe37ec9aecfa5c642f04141 100644 --- a/src/fpga/V2/pe.cpp +++ b/src/fpga/V2/pe.cpp @@ -13,40 +13,53 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "fpga/common/pe.h" +#include "fpga/V2/api.h" #include "fpga/V2/filter.h" #include "fpga/V2/image.h" #include "fpga/common/config.h" #include "fpga/common/driver.h" +using namespace std; // NOLINT +using namespace paddle_mobile::fpga::driver; // NOLINT + namespace paddle_mobile { namespace fpga { -#define MUL8(x) ((x)*8) -#define BYPASS_DONE 1 +#define MUL8(x) (x * 8) +#define BYPASS_DONE 2 +#define CONV_DONE 1 + +static inline int get_image_out_axis(int src_len, int pad, int kernel_len, + int kernel_step) { + if (kernel_step == 0) { + return 0; + } + return (src_len + 2 * pad - kernel_len) / kernel_step + 1; +} float Findfp16Max() { uint16_t abs_vals[16]; uint64_t max_fp16; - max_fp16 = driver::reg_readq(MUL8(49)); - abs_vals[0] = (uint16_t)(0x0000007f & (max_fp16)); // NOLINT - abs_vals[1] = (uint16_t)(0x0000007f & (max_fp16 >> 16)); // NOLINT - abs_vals[2] = (uint16_t)(0x0000007f & (max_fp16 >> 32)); // NOLINT - abs_vals[3] = (uint16_t)(0x0000007f & (max_fp16 >> 48)); // NOLINT - max_fp16 = driver::reg_readq(MUL8(50)); - abs_vals[4] = (uint16_t)(0x0000007f & (max_fp16)); // NOLINT - abs_vals[5] = (uint16_t)(0x0000007f & (max_fp16 >> 16)); // NOLINT - abs_vals[6] = (uint16_t)(0x0000007f & (max_fp16 >> 32)); // NOLINT - abs_vals[7] = (uint16_t)(0x0000007f & (max_fp16 >> 48)); // NOLINT - max_fp16 = driver::reg_readq(MUL8(51)); - abs_vals[8] = (uint16_t)(0x0000007f & (max_fp16)); // NOLINT - abs_vals[9] = (uint16_t)(0x0000007f & (max_fp16 >> 16)); // NOLINT - abs_vals[10] = (uint16_t)(0x0000007f & (max_fp16 >> 32)); // NOLINT - abs_vals[11] = (uint16_t)(0x0000007f & (max_fp16 >> 48)); // NOLINT - max_fp16 = driver::reg_readq(MUL8(52)); - abs_vals[12] = (uint16_t)(0x0000007f & (max_fp16)); - abs_vals[13] = (uint16_t)(0x0000007f & (max_fp16 >> 16)); // NOLINT - abs_vals[14] = (uint16_t)(0x0000007f & (max_fp16 >> 32)); // NOLINT - abs_vals[15] = (uint16_t)(0x0000007f & (max_fp16 >> 48)); // NOLINT + max_fp16 = reg_readq(MUL8(49)); + abs_vals[0] = (uint16_t)(0x0000007fff & (max_fp16)); // NOLINT + abs_vals[1] = (uint16_t)(0x0000007fff & (max_fp16 >> 16)); // NOLINT + abs_vals[2] = (uint16_t)(0x0000007fff & (max_fp16 >> 32)); // NOLINT + abs_vals[3] = (uint16_t)(0x0000007fff & (max_fp16 >> 48)); // NOLINT + max_fp16 = reg_readq(MUL8(50)); + abs_vals[4] = (uint16_t)(0x0000007fff & (max_fp16)); // NOLINT + abs_vals[5] = (uint16_t)(0x0000007fff & (max_fp16 >> 16)); // NOLINT + abs_vals[6] = (uint16_t)(0x0000007fff & (max_fp16 >> 32)); // NOLINT + abs_vals[7] = (uint16_t)(0x0000007fff & (max_fp16 >> 48)); // NOLINT + max_fp16 = reg_readq(MUL8(51)); + abs_vals[8] = (uint16_t)(0x0000007fff & (max_fp16)); // NOLINT + abs_vals[9] = (uint16_t)(0x0000007fff & (max_fp16 >> 16)); // NOLINT + abs_vals[10] = (uint16_t)(0x0000007fff & (max_fp16 >> 32)); // NOLINT + abs_vals[11] = (uint16_t)(0x0000007fff & (max_fp16 >> 48)); // NOLINT + max_fp16 = reg_readq(MUL8(52)); + abs_vals[12] = (uint16_t)(0x0000007fff & (max_fp16)); + abs_vals[13] = (uint16_t)(0x0000007fff & (max_fp16 >> 16)); // NOLINT + abs_vals[14] = (uint16_t)(0x0000007fff & (max_fp16 >> 32)); // NOLINT + abs_vals[15] = (uint16_t)(0x0000007fff & (max_fp16 >> 48)); // NOLINT uint16_t tmp = 0; for (int i = 0; i < 16; i++) { @@ -54,6 +67,7 @@ float Findfp16Max() { tmp = abs_vals[i]; } } + DLOG << "max value found: " << fp16_2_fp32(tmp); return fp16_2_fp32(tmp) / 127.0f; } @@ -88,7 +102,473 @@ int ComputeBasicConv(const struct ConvArgs &args) { return 0; #endif - return 0; + uint64_t ifm_pixel_num = + ((args.image.width) * (args.image.height) * args.image.channels); + uint64_t ifm_memory_size = ifm_pixel_num * sizeof(short); // NOLINT + uint64_t flt_pixel_num = (args.filter_num * (args.kernel.width) * // NOLINT + (args.kernel.height) * args.image.channels); + uint64_t filter_memory_size = flt_pixel_num * sizeof(short); // NOLINT + + uint64_t bn_pixel_num = (args.filter_num * 2); // NOLINT + uint64_t bn_memory_size = bn_pixel_num * sizeof(float); + + uint64_t ofm_width = + ((args.image.width) + 2 * args.image.pad_width - args.kernel.width) / + (args.kernel.stride_w) + + 1; + uint64_t ofm_height = ((args.image.height) + 2 * (args.image.pad_height) - + (args.kernel.height)) / + (args.kernel.stride_h) + + 1; + + uint32_t filter_num = args.filter_num; + uint32_t image_channels = args.image.channels; + + DLOG << "filter_num: " << filter_num; + uint64_t ifm_src_paddr = vaddr_to_paddr((args.image.address)); + uint64_t flt_src_paddr = vaddr_to_paddr((args.filter_address)); + uint64_t sb_src_paddr = vaddr_to_paddr((args.free_space)); + uint64_t ifm_dst_paddr = vaddr_to_paddr((args.output.address)); + /**********BN******************/ + float image_inv_scale = (args.image.scale_address)[0]; + float filter_inv_scale = (args.filter_scale_address)[0]; + float scale_tmp = image_inv_scale * filter_inv_scale; + int idx = 0; + float tmp = 0.0; + float *convert_sb_addr = (float *)(args.free_space); // NOLINT + for (idx = 0; idx < args.filter_num * 2; idx++) { + if (idx % 2 == 1) { + tmp = ((float *)(args.sb_address))[idx] * scale_tmp; // NOLINT + } else { + tmp = ((float *)(args.sb_address))[idx]; // NOLINT + } + convert_sb_addr[idx] = tmp; // NOLINT + } + + fpga_flush(convert_sb_addr, args.filter_num * 2 * sizeof(float)); + reg_writeq(1, MUL8(24)); + usleep(1); + reg_writeq(0, MUL8(24)); + + reg_writeq(sb_src_paddr, MUL8(27)); + reg_writeq(0, MUL8(0)); + + uint64_t bps_addr = 0x8c00000000000000; + bps_addr += bn_memory_size; + reg_writeq(bps_addr, MUL8(0)); + int ret = -1; + ret = fpga_regpoll(MUL8(48), BYPASS_DONE, 0xffffff); + if (ret) { + DLOG << "conv bypass failed"; + return ret; + } + reg_readq(MUL8(63)); + + /*********configuring registers*************/ + uint32_t cmd_image_vir_base_addr = (uint32_t)ifm_src_paddr; + uint32_t cmd_filter_vir_base_addr = (uint32_t)flt_src_paddr; + uint32_t cmd_scale_base_addr = (uint32_t)sb_src_paddr; + uint32_t conv_ofm_addr_base = (uint32_t)ifm_dst_paddr; + uint64_t cmd_group_num = args.group_num; + uint64_t cmd_filter_per_group = filter_num / cmd_group_num; + + uint64_t cmd_flt_sqr_len = (args.kernel.width) * (args.kernel.height); + uint64_t cmd_ifm_pre_row_num = 0; + + if (1 == args.image.height) { + cmd_ifm_pre_row_num = 1; + } else { + cmd_ifm_pre_row_num = + (args.kernel.height) - (args.image.pad_height) + (args.kernel.stride_h); + } + uint64_t cmd_flt_pre_batch_num = 1; + uint64_t cmd_ifm_pack_num_per_row_mns1 = + (uint64_t)(((args.image.channels) + 127) / 128) - 1; + uint64_t cmd_bn_num = filter_num; + uint64_t cmd_bias_num = filter_num; + uint64_t cmd_ifm_stride_row_length = args.image.width * args.kernel.stride_h; + uint64_t cmd_flt_pack_num_per_kernel_mns1 = + (uint64_t)(((args.image.channels) + 127) / 128) - 1; + uint64_t cmd_ofm_width_mns1 = (uint64_t)( + ((args.image.width) - (args.kernel.width) + 2 * (args.image.pad_width)) / + (args.kernel.stride_w)); + uint64_t cmd_ofm_height = + (uint64_t)(((args.image.height) - (args.kernel.height) + + 2 * (args.image.pad_height)) / + (args.kernel.stride_h)) + + 1; + + uint64_t cmd_channel_num = 0; + uint64_t cmd_ifm_pack_len = 0; + uint64_t cmd_channel_per_group = 0; + uint64_t cmd_flt_batch_num_mns1 = 0; + uint64_t cmd_flt_N_impl = 8; + uint64_t cmd_ifm_C_impl = 16; + uint64_t cmd_flt_pack_length = 0; + uint64_t cmd_step_h_mul_row_byte_len = 0; + uint64_t cmd_pad_h_mul_row_byte_len = 0; + uint64_t cmd_ifm_pack_byte_length = 16 * ((((args.image.width) + 7) / 8) * 8); + uint64_t row_len_align = args.image.width; + if (image_channels > 64) { + cmd_channel_num = (uint64_t)((((args.image.channels) + 127)) / 128) * 128; + cmd_ifm_pack_len = 128 * (args.image.width); + cmd_channel_per_group = 128; + cmd_flt_batch_num_mns1 = (uint64_t)(((args.filter_num + 7)) / 8 - 1); + cmd_flt_N_impl = 8; + cmd_ifm_C_impl = 128; + cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 128; + cmd_step_h_mul_row_byte_len = + (args.kernel.stride_h) * cmd_channel_num * (args.image.width); + cmd_pad_h_mul_row_byte_len = + (args.image.pad_height) * cmd_channel_num * (args.image.width); + cmd_ifm_pack_byte_length = 128 * (args.image.width); + row_len_align = args.image.width * (cmd_ifm_pack_num_per_row_mns1 + 1); + } else if (image_channels > 32) { + cmd_channel_num = 64; + cmd_ifm_pack_len = 64 * (args.image.width); + cmd_channel_per_group = 64; + cmd_flt_batch_num_mns1 = (uint64_t)((((args.filter_num) + 15)) / 16 - 1); + cmd_flt_N_impl = 16; + cmd_ifm_C_impl = 64; + cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 64; + cmd_step_h_mul_row_byte_len = (args.kernel.stride_h) * cmd_channel_num * + ((((args.image.width) + 1)) / 2) * 2; + cmd_pad_h_mul_row_byte_len = (args.image.pad_height) * cmd_channel_num * + ((((args.image.width) + 1)) / 2) * 2; + cmd_ifm_pack_byte_length = + 64 * (uint64_t)((((args.image.width) + 1)) / 2) * 2; + row_len_align = (uint64_t)((((args.image.width) + 1)) / 2); + } else if (image_channels > 16) { + cmd_channel_num = 32; + cmd_ifm_pack_len = 32 * (args.image.width); + cmd_channel_per_group = 32; + cmd_flt_batch_num_mns1 = (uint64_t)((((args.filter_num) + 31)) / 32 - 1); + cmd_flt_N_impl = 32; + cmd_ifm_C_impl = 32; + cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 32; + cmd_step_h_mul_row_byte_len = (args.kernel.stride_h) * cmd_channel_num * + ((((args.image.width) + 3)) / 4) * 4; + cmd_pad_h_mul_row_byte_len = (args.image.pad_height) * cmd_channel_num * + ((((args.image.width) + 3)) / 4) * 4; + cmd_ifm_pack_byte_length = + 32 * (uint64_t)((((args.image.width) + 3)) / 4) * 4; + row_len_align = (uint64_t)((((args.image.width) + 3)) / 4); + } else { + cmd_channel_num = 16; + cmd_ifm_pack_len = 16 * (args.image.width); + cmd_channel_per_group = 16; + cmd_flt_batch_num_mns1 = (uint64_t)((((args.filter_num) + 63)) / 64 - 1); + cmd_flt_N_impl = 64; + cmd_ifm_C_impl = 16; + cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 16; + cmd_step_h_mul_row_byte_len = (args.kernel.stride_h) * cmd_channel_num * + ((((args.image.width) + 7)) / 8) * 8; + cmd_pad_h_mul_row_byte_len = (args.image.pad_height) * cmd_channel_num * + ((((args.image.width) + 7)) / 8) * 8; + cmd_ifm_pack_byte_length = 16 * ((((args.image.width) + 7)) / 8) * 8; + row_len_align = (uint64_t)((((args.image.width) + 7)) / 8); + } + uint64_t cmd_flt_length = + (args.kernel.width) * (args.kernel.height) * cmd_channel_num; + uint64_t cmd_ifm_row_byte_length = cmd_channel_num * (args.image.width); + + uint64_t cmd_ifm_buf_col_len = 0; + + uint64_t ifm_one_batch_len = + (1048576 / ((args.image.width) * cmd_channel_num)); + uint64_t cmd_ifm_batch_num_tmp = (uint64_t)( + ((args.image.height) + ifm_one_batch_len - 1) / ifm_one_batch_len); + if (1 == cmd_ifm_batch_num_tmp) { + cmd_ifm_buf_col_len = args.image.height; + } else { + if (((args.image.height) / (cmd_ifm_batch_num_tmp) % 2) == 0) { + cmd_ifm_buf_col_len = (args.image.height) / cmd_ifm_batch_num_tmp; + } else { + cmd_ifm_buf_col_len = (args.image.height) / cmd_ifm_batch_num_tmp - 1; + } + } + uint64_t cmd_ifm_batch_num_mns1 = + (((args.image.height) + cmd_ifm_buf_col_len - 1) / cmd_ifm_buf_col_len) - + 1; + uint64_t cmd_flt_cycle_num_mns1 = cmd_ifm_batch_num_mns1; + uint64_t cmd_flt_total_batch_num = filter_num / cmd_flt_N_impl; + uint64_t cmd_ifm_buf_col_len_rem = + (args.image.height) - + cmd_ifm_batch_num_mns1 * cmd_ifm_buf_col_len; //= -4; + uint64_t cmd_flt_N_len = args.kernel.width * args.kernel.height * + (cmd_flt_pack_num_per_kernel_mns1 + 1); + + //-------- ofm batch number reg && initial URAM reading address + // logic----------------- + uint64_t cmd_init_raddr_cnt = 1; + uint64_t cmd_init_raddr_flag = 0; + int64_t cmd_init_raddr_index = -8; + int64_t cmd_init_raddr_col_0 = -4; + int64_t cmd_init_raddr_col_1 = -4; + uint64_t conv_ofm_buf_col_len = 0; + uint64_t conv_ofm_buf_col_len_rem = 0; + + if (((args.image.pad_height) % (2 * (args.kernel.stride_h))) == 0) { + cmd_init_raddr_cnt = 0; + cmd_init_raddr_flag = 0; + cmd_init_raddr_index = + 0 - (int64_t)row_len_align * (((args.image.pad_height) + 1) / 2); + cmd_init_raddr_col_0 = cmd_init_raddr_index; + cmd_init_raddr_col_1 = cmd_init_raddr_index; + } else if (((args.image.pad_height) - + 2 * ((args.image.pad_height) / (2 * (args.kernel.stride_h)))) <= + (args.kernel.stride_h)) { + cmd_init_raddr_cnt = + (args.kernel.stride_h) - + ((args.image.pad_height) - + ((args.image.pad_height) / (2 * (args.kernel.stride_h)))); + cmd_init_raddr_flag = 1; + cmd_init_raddr_index = + 0 - (int64_t)row_len_align * (int64_t)(args.image.pad_height) - + (int64_t)row_len_align * + ((args.image.pad_height) / (2 * args.kernel.stride_h)); + cmd_init_raddr_col_0 = + 0 - (int64_t)row_len_align * (int64_t)(args.image.pad_height) - + (int64_t)row_len_align * + ((args.image.pad_height) / (2 * (args.kernel.stride_h))); + cmd_init_raddr_col_1 = 0; + } else if (((args.image.pad_height) - + 2 * ((args.image.pad_height) / (2 * (args.kernel.stride_h)))) <= + 2 * (args.kernel.stride_h)) { + cmd_init_raddr_cnt = + 2 * (args.kernel.stride_h) * + (((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) / + (2 * (args.kernel.stride_h))) - + (args.image.pad_height); + cmd_init_raddr_flag = 0; + cmd_init_raddr_index = + 0 - (int64_t)row_len_align * (int64_t)(args.kernel.stride_h) * + (((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) / + (2 * (args.kernel.stride_h))); + cmd_init_raddr_col_0 = + 0 - + (int64_t)row_len_align * + ((args.image.pad_height) / (2 * (args.kernel.stride_h))) - + (int64_t)row_len_align * + (2 * (args.kernel.stride_h) * + (((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) / + (2 * (args.kernel.stride_h))) - + (args.image.pad_height)); + cmd_init_raddr_col_1 = cmd_init_raddr_col_0; + } + + if (cmd_ifm_batch_num_mns1 == 0) { + if ((args.kernel.height) <= (args.kernel.stride_h)) { + conv_ofm_buf_col_len = (args.image.height) + 2 * (args.image.pad_height) - + 3 * (args.kernel.stride_h); + } else { + conv_ofm_buf_col_len = (args.image.height) + 2 * (args.image.pad_height) - + 2 * (args.kernel.stride_h) - (args.kernel.height); + } + conv_ofm_buf_col_len_rem = conv_ofm_buf_col_len; + } else { + int N_rem = 0; + int row_rem = 0; + + if ((args.kernel.height) <= (args.kernel.stride_h)) { + conv_ofm_buf_col_len = cmd_ifm_buf_col_len - 3 * (args.kernel.stride_h); + N_rem = (cmd_ifm_buf_col_len - (args.kernel.height)) / + (args.kernel.stride_h) + + 1; + row_rem = cmd_ifm_buf_col_len - (args.kernel.stride_h) * N_rem; + conv_ofm_buf_col_len_rem = cmd_ifm_buf_col_len_rem + + 2 * (args.image.pad_height) + row_rem - + 3 * (args.kernel.stride_h); + } else { + conv_ofm_buf_col_len = cmd_ifm_buf_col_len + 2 * (args.image.pad_height) - + 2 * (args.kernel.stride_h) - (args.kernel.height); + N_rem = (cmd_ifm_buf_col_len - (args.kernel.height)) / + (args.kernel.stride_h) + + 1; + row_rem = cmd_ifm_buf_col_len - (args.kernel.stride_h) * N_rem; + conv_ofm_buf_col_len_rem = + cmd_ifm_buf_col_len_rem + (args.image.pad_height) + row_rem - + 2 * (args.kernel.stride_h) - (args.kernel.height); + } + } + //----------------------- para functions -------------------------------- + float filter_quant_scale_tmp = ((args.filter_scale_address)[1]); + float image_quant_scale_tmp = ((args.image.scale_address)[1]); + + uint32_t cmd_filter_quant_scale = + *(uint32_t *)(&filter_quant_scale_tmp); // NOLINT + uint32_t cmd_image_quant_scale = + *(uint32_t *)(&image_quant_scale_tmp); // NOLINT + + uint64_t wParallelsim = cmd_flt_N_impl >> 3; + uint64_t wParallelsim_num = + (uint64_t)(((args.filter_num) + cmd_flt_N_impl - 1) / cmd_flt_N_impl) - 1; + uint64_t win_size = (args.kernel.width) * (args.kernel.height) * + (cmd_ifm_pack_num_per_row_mns1 + 1) - + 1; + uint64_t conv_ofm_width = (((args.image.width) - (args.kernel.width) + + (args.image.pad_width) + (args.image.pad_width)) / + (args.kernel.stride_w)); + uint64_t conv_ofm_dma_length = cmd_flt_N_impl * sizeof(short); // NOLINT + uint64_t conv_ofm_dma_stride = args.filter_num * sizeof(short); // NOLINT + uint64_t conv_ofm_height_batch_tmp = + get_image_out_axis(args.image.height, args.image.pad_height, + args.kernel.height, args.kernel.stride_h); + uint64_t conv_ofm_height_batch = (conv_ofm_height_batch_tmp + 1) / 2 - 1; + uint64_t o_ust_rst = 0; + uint64_t conv_ofm_dma_repeat = + (uint64_t)(((((args.image.width) - (args.kernel.width) + + (args.image.pad_width) + (args.image.pad_width))) / + (args.kernel.stride_w)) + + 1); + uint64_t conv_ofm_dma_offset = + args.filter_num * conv_ofm_dma_repeat * sizeof(short); // NOLINT + uint64_t conv_ofm_inter_stride = conv_ofm_dma_offset * 2; + //----------------- register contation ------------------ + uint64_t cmd_ifm_flt_base_addr = ((uint64_t)cmd_filter_vir_base_addr << 32) | + ((uint64_t)cmd_image_vir_base_addr); + uint64_t cmd_ifm_flt_dim = ((uint64_t)(args.kernel.height) << 48) | + ((uint64_t)(args.kernel.width) << 32) | + ((uint64_t)(args.image.height) << 16) | + ((uint64_t)(args.image.width)); + uint64_t cmd_pad_step_size = ((uint64_t)(args.kernel.stride_h) << 48) | + ((uint64_t)(args.kernel.stride_w) << 32) | + ((uint64_t)(args.image.pad_height) << 16) | + ((uint64_t)(args.image.pad_width)); + uint64_t cmd_param1 = ((uint64_t)cmd_filter_per_group << 48) | + ((uint64_t)cmd_channel_num << 32) | + ((uint64_t)filter_num << 16) | + ((uint64_t)cmd_group_num); + uint64_t cmd_param2 = + ((uint64_t)cmd_flt_sqr_len << 48) | ((uint64_t)cmd_ifm_pack_len << 32) | + ((uint64_t)cmd_ifm_pre_row_num << 16) | ((uint64_t)cmd_channel_per_group); + uint64_t cmd_param3 = ((uint64_t)cmd_flt_batch_num_mns1 << 48) | + ((uint64_t)cmd_flt_total_batch_num << 32) | + ((uint64_t)cmd_flt_N_impl << 16) | + ((uint64_t)cmd_flt_pre_batch_num); + uint64_t cmd_param4 = ((uint64_t)cmd_ifm_pack_num_per_row_mns1 << 48) | + ((uint64_t)cmd_bn_num << 32) | + ((uint64_t)cmd_bias_num << 16) | + ((uint64_t)cmd_flt_N_len); + uint64_t cmd_param5 = ((uint64_t)cmd_ifm_stride_row_length << 48) | + ((uint64_t)cmd_flt_pack_length << 32) | + ((uint64_t)cmd_flt_cycle_num_mns1 << 16) | + ((uint64_t)cmd_flt_pack_num_per_kernel_mns1); + uint64_t cmd_param6 = ((uint64_t)cmd_ofm_width_mns1 << 48) | + ((uint64_t)cmd_ifm_batch_num_mns1 << 32) | + ((uint64_t)cmd_ifm_buf_col_len << 16) | + ((uint64_t)cmd_ifm_C_impl); + uint64_t cmd_param7 = ((uint64_t)conv_ofm_inter_stride << 32) | + ((uint64_t)cmd_ifm_buf_col_len_rem << 16) | + ((uint64_t)cmd_ofm_height); + uint64_t cmd_param8 = + ((uint64_t)cmd_flt_length << 32) | ((uint64_t)cmd_ifm_row_byte_length); + uint64_t cmd_ifm_flt_quant_scale = + (((uint64_t)cmd_filter_quant_scale) << 32) | + ((uint64_t)cmd_image_quant_scale); + uint64_t cmd_step_pad_mul_row_len = + ((uint64_t)cmd_pad_h_mul_row_byte_len << 32) | + ((uint64_t)cmd_step_h_mul_row_byte_len); + //---- ofm paras ---- + uint64_t cmd_conv_param_reg = ((uint64_t)wParallelsim_num << 32) | + ((uint64_t)wParallelsim << 16) | + ((uint64_t)win_size); + uint64_t cmd_ofm_addr_width_reg = + ((uint64_t)conv_ofm_width << 32) | ((uint64_t)conv_ofm_addr_base); + uint64_t cmd_intra_stride_atoms_reg = + ((uint64_t)conv_ofm_dma_length << 32) | ((uint64_t)conv_ofm_dma_stride); + uint64_t cmd_ofm_height_batch_reg = + ((uint64_t)conv_ofm_buf_col_len_rem << 48) | + ((uint64_t)conv_ofm_buf_col_len << 32) | + ((uint64_t)conv_ofm_height_batch + 0x80000000); + uint64_t cmd_user_ctrl_reg = ((uint64_t)o_ust_rst); + uint64_t cmd_wdma_param_reg = + ((uint64_t)(conv_ofm_dma_repeat | 0x80000000) << 32) | + ((uint64_t)conv_ofm_dma_offset); + + uint64_t cmd_init_raddr_reg = ((cmd_init_raddr_col_1 & 0xffff) << 48) | + ((cmd_init_raddr_col_0 & 0xffff) << 32) | + (((cmd_init_raddr_index & 0xffff) << 16)) | + (cmd_init_raddr_flag & 0xffff) << 15 | + ((cmd_init_raddr_cnt & 0xffff)); + + uint64_t cmd_para31 = (cmd_para31 & 0x1) | args.relu_enabled; + + DLOG << "cmd_init_raddr_col_1 = " << hex << cmd_init_raddr_col_1; + + DLOG << "cmd_init_raddr_col_0 = " << hex << cmd_init_raddr_col_0; + DLOG << "cmd_init_raddr_index = " << hex << cmd_init_raddr_index; // + DLOG << "cmd_init_raddr_cnt = " << hex << cmd_init_raddr_cnt; + DLOG << "conv_ofm_height_batch = " << conv_ofm_height_batch; + + DLOG << "cmd_ifm_flt_base_addr = " << hex << cmd_ifm_flt_base_addr; + DLOG << "cmd_scale_base_addr = " << hex << cmd_scale_base_addr; + DLOG << "cmd_ifm_flt_dim = " << hex << cmd_ifm_flt_dim; + DLOG << "cmd_pad_step_size = " << hex << cmd_pad_step_size; + DLOG << "cmd_param1 = " << hex << cmd_param1; + DLOG << "cmd_param2 = " << hex << cmd_param2; + DLOG << "cmd_param3 = " << hex << cmd_param3; + DLOG << "cmd_param4 = " << hex << cmd_param4; + DLOG << "cmd_param5 = " << hex << cmd_param5; + DLOG << "cmd_param6 = " << hex << cmd_param6; + DLOG << "cmd_param7 = " << hex << cmd_param7; + DLOG << "cmd_param8 = " << hex << cmd_param8; + DLOG << "cmd_ifm_flt_quant_scale = " << hex << cmd_ifm_flt_quant_scale; + DLOG << "cmd_step_pad_mul_row_len = " << hex << cmd_step_pad_mul_row_len; + DLOG << "cmd_ifm_pack_byte_length = " << hex << cmd_ifm_pack_byte_length; + DLOG << "cmd_conv_param_reg = " << hex << cmd_conv_param_reg; + DLOG << "cmd_ofm_addr_width_reg = " << hex << cmd_ofm_addr_width_reg; + DLOG << "cmd_intra_stride_atoms_reg = " << hex << cmd_intra_stride_atoms_reg; + DLOG << "cmd_init_raddr_reg = " << hex << cmd_init_raddr_reg; + DLOG << "cmd_ofm_height_batch_reg = " << hex << cmd_ofm_height_batch_reg; + DLOG << "cmd_wdma_param_reg = " << hex << cmd_wdma_param_reg; + DLOG << "cmd_para31 = " << hex << cmd_para31; + + reg_writeq(cmd_ifm_flt_base_addr, MUL8(1)); + reg_writeq(cmd_scale_base_addr, MUL8(2)); + reg_writeq(cmd_ifm_flt_dim, MUL8(3)); + reg_writeq(cmd_pad_step_size, MUL8(4)); + reg_writeq(cmd_param1, MUL8(5)); + reg_writeq(cmd_param2, MUL8(6)); + reg_writeq(cmd_param3, MUL8(7)); + reg_writeq(cmd_param4, MUL8(8)); + reg_writeq(cmd_param5, MUL8(9)); + reg_writeq(cmd_param6, MUL8(10)); + reg_writeq(cmd_param7, MUL8(11)); + reg_writeq(cmd_param8, MUL8(12)); + reg_writeq(cmd_ifm_flt_quant_scale, MUL8(13)); + reg_writeq(cmd_step_pad_mul_row_len, MUL8(14)); + reg_writeq(cmd_ifm_pack_byte_length, MUL8(15)); + reg_writeq(cmd_conv_param_reg, MUL8(16)); + reg_writeq(cmd_ofm_addr_width_reg, MUL8(17)); + reg_writeq(cmd_intra_stride_atoms_reg, MUL8(18)); + + reg_writeq(cmd_init_raddr_reg, MUL8(29)); + reg_writeq(cmd_para31, MUL8(31)); + + reg_writeq(0, MUL8(19)); + reg_writeq(cmd_ofm_height_batch_reg, MUL8(19)); + reg_writeq(cmd_ofm_height_batch_reg & 0xffffffff00000000, MUL8(19)); + + reg_writeq(cmd_wdma_param_reg, MUL8(25)); + + reg_writeq(0, MUL8(0)); + reg_writeq(0x4000000000000000, MUL8(0)); + + ret = fpga_regpoll(MUL8(48), CONV_DONE, 0xffffff); + if (ret == -1) { + DLOG << "fpga conv no interrupt!!"; + return ret; + } + reg_readq(MUL8(63)); + + usleep(10); + float scale = Findfp16Max(); + (args.output.scale_address)[0] = scale; // NOLINT + (args.output.scale_address)[1] = (float)(1.0 / scale); // NOLINT + DLOG << "Findfp16Max scale = " << scale; + DLOG << "ret=" << ret; + return ret; } int ComputeFpgaPool(const struct PoolingArgs &args) { @@ -97,7 +577,6 @@ int ComputeFpgaPool(const struct PoolingArgs &args) { DLOG << " mode:" << args.mode << " kernel_reciprocal:" << fp16_2_fp32(args.kernel_reciprocal); DLOG << " image_address:" << args.image.address - << " image_scale_address:" << args.image.scale_address << " image_channels:" << args.image.channels << " image_height:" << args.image.height << " image_width:" << args.image.width @@ -107,13 +586,467 @@ int ComputeFpgaPool(const struct PoolingArgs &args) { << " kernel_width:" << args.kernel.width << " stride_h:" << args.kernel.stride_h << " stride_w:" << args.kernel.stride_w; - DLOG << " out_address:" << args.output.address - << " out_scale_address:" << args.output.scale_address; + DLOG << " out_address:" << args.output.address; #endif #ifndef PADDLE_MOBILE_ZU5 return 0; #endif - return 0; + + uint32_t filter_num_align = 0; + filter_num_align = args.image.channels; + + DLOG << "______db_______: begin to set registers. "; + uint64_t ifm_pixel_num = + ((args.image.width) * (args.image.height) * args.image.channels); + uint64_t ifm_memory_size = ifm_pixel_num * sizeof(short); // NOLINT + uint64_t flt_pixel_num = 0; + uint64_t filter_memory_size = 0; + //!! ??? + uint64_t bn_pixel_num = (filter_num_align * 2); + uint64_t bn_memory_size = bn_pixel_num * sizeof(uint16_t); + + uint64_t ofm_width = + ((args.image.width) + 2 * args.image.pad_width - args.kernel.width) / + (args.kernel.stride_w) + + 1; + uint64_t ofm_height = ((args.image.height) + 2 * (args.image.pad_height) - + (args.kernel.height)) / + (args.kernel.stride_h) + + 1; + + uint32_t filter_num = filter_num_align; + uint32_t image_channels = args.image.channels; + + uint64_t ifm_src_paddr = vaddr_to_paddr((args.image.address)); + uint64_t flt_src_paddr = 0; + uint64_t sb_src_paddr = 0; + uint64_t ifm_dst_paddr = vaddr_to_paddr((args.output.address)); + + /**********BN******************/ + float image_inv_scale = 0; + float filter_inv_scale = 0; + int idx = 0; + DLOG << "______db_______: reset registers. "; + reg_writeq(1, MUL8(24)); + usleep(1); + reg_writeq(0, MUL8(24)); + /*********configuring registers*************/ + uint32_t cmd_image_vir_base_addr = (uint32_t)ifm_src_paddr; + uint32_t cmd_filter_vir_base_addr = (uint32_t)flt_src_paddr; + uint32_t cmd_scale_base_addr = (uint32_t)sb_src_paddr; + uint32_t conv_ofm_addr_base = (uint32_t)ifm_dst_paddr; + uint64_t cmd_group_num = 1; // args.group_num; + uint64_t cmd_filter_per_group = filter_num / cmd_group_num; + + uint64_t cmd_flt_sqr_len = (args.kernel.width) * (args.kernel.height); + uint64_t cmd_ifm_pre_row_num = args.kernel.height; + if ((args.kernel.height == args.image.height) && + (0 == args.image.pad_height)) { + cmd_ifm_pre_row_num = (args.kernel.height); + } else { + cmd_ifm_pre_row_num = + (args.kernel.height) - (args.image.pad_height) + (args.kernel.stride_h); + } + uint64_t cmd_flt_pre_batch_num = 1; + uint64_t cmd_ifm_pack_num_per_row_mns1 = + (uint64_t)(((args.image.channels) + 63) / 64) - 1; + uint64_t cmd_bn_num = filter_num; + uint64_t cmd_bias_num = filter_num; + uint64_t cmd_ifm_stride_row_length = args.image.width * args.kernel.stride_h; + uint64_t cmd_flt_pack_num_per_kernel_mns1 = + (uint64_t)(((args.image.channels) + 63) / 64) - 1; + uint64_t cmd_ofm_width_mns1 = (uint64_t)( + ((args.image.width) - (args.kernel.width) + 2 * (args.image.pad_width)) / + (args.kernel.stride_w)); + uint64_t cmd_ofm_height = + (uint64_t)(((args.image.height) - (args.kernel.height) + + 2 * (args.image.pad_height)) / + (args.kernel.stride_h)) + + 1; + + uint64_t cmd_channel_num = 0; + uint64_t cmd_ifm_pack_len = 0; + uint64_t cmd_channel_per_group = 0; + uint64_t cmd_flt_batch_num_mns1 = 0; + uint64_t cmd_flt_N_impl = 8; + uint64_t cmd_ifm_C_impl = 16; + uint64_t cmd_flt_pack_length = 0; + uint64_t cmd_step_h_mul_row_byte_len = 0; + uint64_t cmd_pad_h_mul_row_byte_len = 0; + uint64_t cmd_ifm_pack_byte_length = 16 * ((((args.image.width) + 7) / 8) * 8); + uint64_t row_len_align = args.image.width; + uint64_t cmd_flt_cycle_num_mns1 = 0; + if (image_channels > 32) { + cmd_channel_num = (uint64_t)((((args.image.channels) + 63)) / 64) * 64; + cmd_ifm_pack_len = 64 * (args.image.width); + cmd_channel_per_group = 64; + cmd_flt_batch_num_mns1 = (uint64_t)(((filter_num + 7)) / 8 - 1); + cmd_flt_N_impl = 8; + cmd_ifm_C_impl = 64; + cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 64; + cmd_step_h_mul_row_byte_len = + (args.kernel.stride_h) * cmd_channel_num * args.image.width; + cmd_pad_h_mul_row_byte_len = + (args.image.pad_height) * cmd_channel_num * args.image.width; + cmd_ifm_pack_byte_length = 64 * args.image.width; + row_len_align = args.image.width * (cmd_ifm_pack_num_per_row_mns1 + 1); + cmd_flt_cycle_num_mns1 = (cmd_channel_num / 64) - 1; + } else if (image_channels > 16) { + cmd_channel_num = 32; + cmd_ifm_pack_len = 32 * (args.image.width); + cmd_channel_per_group = 32; + cmd_flt_batch_num_mns1 = (uint64_t)((((filter_num) + 15)) / 16 - 1); + cmd_flt_N_impl = 16; + cmd_ifm_C_impl = 32; + cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 32; + cmd_step_h_mul_row_byte_len = (args.kernel.stride_h) * cmd_channel_num * + ((((args.image.width) + 1)) / 2) * 2; + cmd_pad_h_mul_row_byte_len = (args.image.pad_height) * cmd_channel_num * + ((((args.image.width) + 1)) / 2) * 2; + cmd_ifm_pack_byte_length = + 32 * (uint64_t)((((args.image.width) + 1)) / 2) * 2; + row_len_align = (uint64_t)((((args.image.width) + 1)) / 2); + cmd_flt_cycle_num_mns1 = 0; + } else if (image_channels > 8) { + cmd_channel_num = 16; + cmd_ifm_pack_len = 16 * (args.image.width); + cmd_channel_per_group = 16; + cmd_flt_batch_num_mns1 = (uint64_t)((((filter_num) + 15)) / 16 - 1); + cmd_flt_N_impl = 32; + cmd_ifm_C_impl = 16; + cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 16; + cmd_step_h_mul_row_byte_len = (args.kernel.stride_h) * cmd_channel_num * + ((((args.image.width) + 3)) / 4) * 4; + cmd_pad_h_mul_row_byte_len = (args.image.pad_height) * cmd_channel_num * + ((((args.image.width) + 3)) / 4) * 4; + cmd_ifm_pack_byte_length = + 16 * (uint64_t)((((args.image.width) + 3)) / 4) * 4; + row_len_align = (uint64_t)((((args.image.width) + 3)) / 4); + cmd_flt_cycle_num_mns1 = 0; + } + + cmd_flt_N_impl = 16; + cmd_flt_batch_num_mns1 = 0; + cmd_flt_pack_length = 64; + uint64_t cmd_flt_N_len = 0; + uint64_t cmd_flt_length = 64; + + uint64_t cmd_ifm_row_byte_length = cmd_channel_num * (args.image.width); + + uint64_t cmd_ifm_buf_col_len = 0; + + uint64_t ifm_one_batch_len = + (1048576 / ((args.image.width) * cmd_channel_num)); + uint64_t cmd_ifm_batch_num_tmp = (uint64_t)( + ((args.image.height) + ifm_one_batch_len - 1) / ifm_one_batch_len); + if (1 == cmd_ifm_batch_num_tmp) { + cmd_ifm_buf_col_len = args.image.height; + } else { + if (((args.image.height) / (cmd_ifm_batch_num_tmp) % 2) == 0) { + cmd_ifm_buf_col_len = (args.image.height) / cmd_ifm_batch_num_tmp; + } else { + cmd_ifm_buf_col_len = (args.image.height) / cmd_ifm_batch_num_tmp - 1; + } + } + uint64_t cmd_ifm_batch_num_mns1 = + (((args.image.height) + cmd_ifm_buf_col_len - 1) / cmd_ifm_buf_col_len) - + 1; + + uint64_t cmd_flt_total_batch_num = 1; + uint64_t cmd_ifm_buf_col_len_rem = + (args.image.height) - + cmd_ifm_batch_num_mns1 * cmd_ifm_buf_col_len; //= -4; + + //-------- ofm batch number reg && initial URAM reading address + uint64_t cmd_init_raddr_cnt = 1; + uint64_t cmd_init_raddr_flag = 0; + int64_t cmd_init_raddr_index = -8; + int64_t cmd_init_raddr_col_0 = -4; + int64_t cmd_init_raddr_col_1 = -4; + int64_t conv_ofm_buf_col_len = 0; + int64_t conv_ofm_buf_col_len_rem = 0; + + if (((args.image.pad_height) % (2 * (args.kernel.stride_h))) == 0) { + cmd_init_raddr_cnt = 0; + cmd_init_raddr_flag = 0; + cmd_init_raddr_index = + 0 - (int64_t)row_len_align * (((args.image.pad_height) + 1) / 2); + cmd_init_raddr_col_0 = cmd_init_raddr_index; + cmd_init_raddr_col_1 = cmd_init_raddr_index; + } else if (((args.image.pad_height) - + 2 * ((args.image.pad_height) / (2 * (args.kernel.stride_h)))) <= + (args.kernel.stride_h)) { + cmd_init_raddr_cnt = + (args.kernel.stride_h) - + ((args.image.pad_height) - + ((args.image.pad_height) / (2 * (args.kernel.stride_h)))); + cmd_init_raddr_flag = 1; + cmd_init_raddr_index = + 0 - (int64_t)row_len_align * (int64_t)(args.image.pad_height) - + (int64_t)row_len_align * + ((args.image.pad_height) / (2 * args.kernel.stride_h)); + cmd_init_raddr_col_0 = + 0 - (int64_t)row_len_align * (int64_t)(args.image.pad_height) - + (int64_t)row_len_align * + ((args.image.pad_height) / (2 * (args.kernel.stride_h))); + cmd_init_raddr_col_1 = + cmd_init_raddr_col_0 + args.kernel.stride_h * (int64_t)row_len_align; + } else if (((args.image.pad_height) - + 2 * ((args.image.pad_height) / (2 * (args.kernel.stride_h)))) <= + 2 * (args.kernel.stride_h)) { + cmd_init_raddr_cnt = + 2 * (args.kernel.stride_h) * + (((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) / + (2 * (args.kernel.stride_h))) - + (args.image.pad_height); + cmd_init_raddr_flag = 0; + cmd_init_raddr_index = + 0 - (int64_t)row_len_align * (int64_t)(args.kernel.stride_h) * + (((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) / + (2 * (args.kernel.stride_h))); + cmd_init_raddr_col_0 = + 0 - + (int64_t)row_len_align * + ((args.image.pad_height) / (2 * (args.kernel.stride_h))) - + (int64_t)row_len_align * + (2 * (args.kernel.stride_h) * + (((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) / + (2 * (args.kernel.stride_h))) - + (args.image.pad_height)); + cmd_init_raddr_col_1 = cmd_init_raddr_col_0; + } + + if (cmd_ifm_batch_num_mns1 == 0) { + if ((args.kernel.height) <= (args.kernel.stride_h)) { + conv_ofm_buf_col_len = (args.image.height) + 2 * (args.image.pad_height) - + 3 * (args.kernel.stride_h); + } else { + conv_ofm_buf_col_len = (args.image.height) + 2 * (args.image.pad_height) - + 2 * (args.kernel.stride_h) - (args.kernel.height); + } + conv_ofm_buf_col_len_rem = conv_ofm_buf_col_len; + } else { + int N_rem = 0; + int row_rem = 0; + + if ((args.kernel.height) <= (args.kernel.stride_h)) { + conv_ofm_buf_col_len = cmd_ifm_buf_col_len - 3 * (args.kernel.stride_h); + N_rem = (cmd_ifm_buf_col_len - (args.kernel.height)) / + (args.kernel.stride_h) + + 1; + row_rem = cmd_ifm_buf_col_len - (args.kernel.stride_h) * N_rem; + conv_ofm_buf_col_len_rem = cmd_ifm_buf_col_len_rem + + 2 * (args.image.pad_height) + row_rem - + 3 * (args.kernel.stride_h); + } else { + conv_ofm_buf_col_len = cmd_ifm_buf_col_len + 2 * (args.image.pad_height) - + 2 * (args.kernel.stride_h) - (args.kernel.height); + N_rem = (cmd_ifm_buf_col_len - (args.kernel.height)) / + (args.kernel.stride_h) + + 1; + row_rem = cmd_ifm_buf_col_len - (args.kernel.stride_h) * N_rem; + conv_ofm_buf_col_len_rem = + cmd_ifm_buf_col_len_rem + (args.image.pad_height) + row_rem - + 2 * (args.kernel.stride_h) - (args.kernel.height); + } + } + + //----------------------- para functions -------------------------------- + uint64_t cmd_filter_quant_scale = 0x3c00; + uint64_t cmd_image_quant_scale = 0x3c00; + uint64_t wParallelsim = cmd_ifm_C_impl >> 3; + uint64_t wParallelsim_num = cmd_flt_cycle_num_mns1; + uint64_t win_size = (args.kernel.width) * (args.kernel.height) * + (cmd_ifm_pack_num_per_row_mns1 + 1) - + 1; // + uint64_t conv_ofm_width = (((args.image.width) - (args.kernel.width) + + (args.image.pad_width) + (args.image.pad_width)) / + (args.kernel.stride_w)); + uint64_t conv_ofm_dma_length = cmd_channel_num * sizeof(short); // NOLINT + uint64_t conv_ofm_dma_stride = conv_ofm_dma_length; + uint64_t conv_ofm_height_batch_tmp = + (args.image.height + 2 * args.image.pad_height - args.kernel.height) / + args.kernel.stride_h + + 1; + + uint64_t conv_ofm_height_batch = (conv_ofm_height_batch_tmp + 1) / 2 - 1; + uint64_t o_ust_rst = 0; + uint64_t conv_ofm_dma_repeat = + (uint64_t)(((((args.image.width) - (args.kernel.width) + + (args.image.pad_width) + (args.image.pad_width))) / + (args.kernel.stride_w)) + + 1); + uint64_t conv_ofm_dma_offset = + args.image.channels * conv_ofm_dma_repeat * sizeof(short); // NOLINT + uint64_t conv_ofm_inter_stride = conv_ofm_dma_offset * 2; + //----------------- register contation ------------------ + uint64_t cmd_ifm_flt_base_addr = ((uint64_t)cmd_filter_vir_base_addr << 32) | + ((uint64_t)cmd_image_vir_base_addr); + uint64_t cmd_ifm_flt_dim = ((uint64_t)(args.kernel.height) << 48) | + ((uint64_t)(args.kernel.width) << 32) | + ((uint64_t)(args.image.height) << 16) | + ((uint64_t)(args.image.width)); + uint64_t cmd_pad_step_size = ((uint64_t)(args.kernel.stride_h) << 48) | + ((uint64_t)(args.kernel.stride_w) << 32) | + ((uint64_t)(args.image.pad_height) << 16) | + ((uint64_t)(args.image.pad_width)); + uint64_t cmd_param1 = ((uint64_t)cmd_filter_per_group << 48) | + ((uint64_t)cmd_channel_num << 32) | + ((uint64_t)filter_num << 16) | + ((uint64_t)cmd_group_num); + uint64_t cmd_param2 = + ((uint64_t)cmd_flt_sqr_len << 48) | ((uint64_t)cmd_ifm_pack_len << 32) | + ((uint64_t)cmd_ifm_pre_row_num << 16) | ((uint64_t)cmd_channel_per_group); + uint64_t cmd_param3 = ((uint64_t)cmd_flt_batch_num_mns1 << 48) | + ((uint64_t)cmd_flt_total_batch_num << 32) | + ((uint64_t)cmd_flt_N_impl << 16) | + ((uint64_t)cmd_flt_pre_batch_num); + uint64_t cmd_param4 = ((uint64_t)cmd_ifm_pack_num_per_row_mns1 << 48) | + ((uint64_t)cmd_bn_num << 32) | + ((uint64_t)cmd_bias_num << 16) | + ((uint64_t)cmd_flt_N_len); + uint64_t cmd_param5 = ((uint64_t)cmd_ifm_stride_row_length << 48) | + ((uint64_t)cmd_flt_pack_length << 32) | + ((uint64_t)cmd_flt_cycle_num_mns1 << 16) | + ((uint64_t)cmd_flt_pack_num_per_kernel_mns1); + uint64_t cmd_param6 = ((uint64_t)cmd_ofm_width_mns1 << 48) | + ((uint64_t)cmd_ifm_batch_num_mns1 << 32) | + ((uint64_t)cmd_ifm_buf_col_len << 16) | + ((uint64_t)cmd_ifm_C_impl); + uint64_t cmd_param7 = ((uint64_t)conv_ofm_inter_stride << 32) | + ((uint64_t)cmd_ifm_buf_col_len_rem << 16) | + ((uint64_t)cmd_ofm_height); + uint64_t cmd_param8 = + ((uint64_t)cmd_flt_length << 32) | ((uint64_t)cmd_ifm_row_byte_length); + uint64_t cmd_ifm_flt_quant_scale = ((uint64_t)cmd_filter_quant_scale << 32) | + ((uint64_t)cmd_image_quant_scale); + uint64_t cmd_step_pad_mul_row_len = + ((uint64_t)cmd_pad_h_mul_row_byte_len << 32) | + ((uint64_t)cmd_step_h_mul_row_byte_len); + //---- ofm paras ---- + uint64_t cmd_conv_param_reg = ((uint64_t)wParallelsim_num << 32) | + ((uint64_t)wParallelsim << 16) | + ((uint64_t)win_size); + uint64_t cmd_ofm_addr_width_reg = + ((uint64_t)conv_ofm_width << 32) | ((uint64_t)conv_ofm_addr_base); + uint64_t cmd_intra_stride_atoms_reg = + ((uint64_t)conv_ofm_dma_length << 32) | ((uint64_t)conv_ofm_dma_stride); + uint64_t cmd_ofm_height_batch_reg = + ((uint64_t)(conv_ofm_buf_col_len_rem & 0xffff) << 48) | + ((uint64_t)(conv_ofm_buf_col_len & 0xffff) << 32) | + ((uint64_t)conv_ofm_height_batch + 0x80000000); + uint64_t cmd_user_ctrl_reg = ((uint64_t)o_ust_rst); + uint64_t cmd_wdma_param_reg = + ((uint64_t)(conv_ofm_dma_repeat | 0x80000000) << 32) | + ((uint64_t)conv_ofm_dma_offset); + uint64_t cmd_init_raddr_reg = ((cmd_init_raddr_col_1 & 0xffff) << 48) | + ((cmd_init_raddr_col_0 & 0xffff) << 32) | + (((cmd_init_raddr_index & 0xffff) << 16)) | + (cmd_init_raddr_flag & 0xffff) << 15 | + ((cmd_init_raddr_cnt & 0xffff)); + + DLOG << "cmd_init_raddr_col_1 = " << hex << cmd_init_raddr_col_1; + + DLOG << "cmd_init_raddr_col_0 = " << hex << cmd_init_raddr_col_0; + DLOG << "cmd_init_raddr_index = " << hex << cmd_init_raddr_index; // + DLOG << "cmd_init_raddr_cnt = " << hex << cmd_init_raddr_cnt; + DLOG << "conv_ofm_buf_col_len = " << hex << conv_ofm_buf_col_len; + DLOG << "conv_ofm_buf_col_len_rem = " << hex << conv_ofm_buf_col_len_rem; + DLOG << "cmd_ifm_flt_base_addr = " << hex << cmd_ifm_flt_base_addr; + DLOG << "cmd_scale_base_addr = " << hex << cmd_scale_base_addr; + DLOG << "cmd_ifm_flt_dim = " << hex << cmd_ifm_flt_dim; + DLOG << "cmd_pad_step_size = " << hex << cmd_pad_step_size; + DLOG << "cmd_param1 = " << hex << cmd_param1; + DLOG << "cmd_param2 = " << hex << cmd_param2; + DLOG << "cmd_param3 = " << hex << cmd_param3; + DLOG << "cmd_param4 = " << hex << cmd_param4; + DLOG << "cmd_param5 = " << hex << cmd_param5; + DLOG << "cmd_param6 = " << hex << cmd_param6; + DLOG << "cmd_param7 = " << hex << cmd_param7; + DLOG << "cmd_param8 = " << hex << cmd_param8; + DLOG << "cmd_ifm_flt_quant_scale = " << hex << cmd_ifm_flt_quant_scale; + DLOG << "cmd_step_pad_mul_row_len = " << hex << cmd_step_pad_mul_row_len; + DLOG << "cmd_ifm_pack_byte_length = " << hex << cmd_ifm_pack_byte_length; + DLOG << "cmd_conv_param_reg = " << hex << cmd_conv_param_reg; + DLOG << "cmd_ofm_addr_width_reg = " << hex << cmd_ofm_addr_width_reg; + DLOG << "cmd_intra_stride_atoms_reg = " << hex << cmd_intra_stride_atoms_reg; + DLOG << "cmd_init_raddr_reg = " << hex << cmd_init_raddr_reg; + DLOG << "cmd_ofm_height_batch_reg = " << hex << cmd_ofm_height_batch_reg; + DLOG << "cmd_wdma_param_reg = " << hex << cmd_wdma_param_reg; + DLOG << "pooling_mode = " << hex << args.mode; + + reg_writeq(cmd_ifm_flt_base_addr, MUL8(1)); + reg_writeq(cmd_scale_base_addr, MUL8(2)); + reg_writeq(cmd_ifm_flt_dim, MUL8(3)); + reg_writeq(cmd_pad_step_size, MUL8(4)); + reg_writeq(cmd_param1, MUL8(5)); + reg_writeq(cmd_param2, MUL8(6)); + reg_writeq(cmd_param3, MUL8(7)); + reg_writeq(cmd_param4, MUL8(8)); + reg_writeq(cmd_param5, MUL8(9)); + reg_writeq(cmd_param6, MUL8(10)); + reg_writeq(cmd_param7, MUL8(11)); + reg_writeq(cmd_param8, MUL8(12)); + reg_writeq(cmd_ifm_flt_quant_scale, MUL8(13)); + reg_writeq(cmd_step_pad_mul_row_len, MUL8(14)); + reg_writeq(cmd_ifm_pack_byte_length, MUL8(15)); + reg_writeq(cmd_conv_param_reg, MUL8(16)); + reg_writeq(cmd_ofm_addr_width_reg, MUL8(17)); + reg_writeq(cmd_intra_stride_atoms_reg, MUL8(18)); + + reg_writeq(cmd_init_raddr_reg, MUL8(29)); + + reg_writeq(0, MUL8(19)); + reg_writeq(cmd_ofm_height_batch_reg, MUL8(19)); + reg_writeq(cmd_ofm_height_batch_reg & 0xffffffff00000000, MUL8(19)); + + reg_writeq(cmd_wdma_param_reg, MUL8(25)); + + /******************************************************************/ + uint64_t cmd_mult_factor = ((uint64_t)args.kernel_reciprocal) | + ((uint64_t)args.kernel_reciprocal << 16); + reg_writeq(cmd_mult_factor, MUL8(30)); + /******************************************************************/ + + reg_writeq(0, MUL8(0)); + if (args.mode == 0) { // max pooling + reg_writeq(0x2200000000000000, MUL8(0)); + } else { // average pooling + reg_writeq(0x2400000000000000, MUL8(0)); + } + int ret = -1; + ret = fpga_regpoll(MUL8(48), CONV_DONE, 0x00ffff); + if (ret == -1) { + DLOG << "fpga pooling no interrupt!!"; + return ret; + } + reg_readq(MUL8(63)); + usleep(10); + // get max value + float scale = Findfp16Max(); + (args.output.scale_address)[0] = scale; // NOLINT + (args.output.scale_address)[1] = (float)(1.0 / scale); // NOLINT + DLOG << "Findfp16Max scale = " << scale; + DLOG << "ret=" << ret; + return ret; +} + +int get_ofm_batch_size(int width, int channel) { + int pad_channel, row_size; + + if (64 < channel) { + pad_channel = (int)((channel + 127) / 128) * 128; // NOLINT + } else if (32 < channel && channel <= 64) { + pad_channel = ((channel + 63) / (64)) * 64; + } else if (16 < channel && channel <= 32) { + pad_channel = ((channel + 31) / (32)) * 32; + } else if (channel <= 16) { + pad_channel = ((channel + 15) / (16)) * 16; + } + + row_size = pad_channel * width; + + return row_size; } int ComputeFpgaEWAdd(const struct EWAddArgs &args) { @@ -123,26 +1056,525 @@ int ComputeFpgaEWAdd(const struct EWAddArgs &args) { << " const0:" << fp16_2_fp32(int16_t(args.const0)) << " const1:" << fp16_2_fp32(int16_t(args.const1)); DLOG << " image0_address:" << args.image0.address - << " image0_scale_address:" << args.image0.scale_address << " image0_channels:" << args.image0.channels << " image0_height:" << args.image0.height - << " image0_width:" << args.image0.width - << " pad0_height:" << args.image0.pad_height - << " pad0_width:" << args.image0.pad_width; + << " image0_width:" << args.image0.width; DLOG << " image1_address:" << args.image1.address - << " image1_scale_address:" << args.image1.scale_address << " image1_channels:" << args.image1.channels << " image1_height:" << args.image1.height - << " image1_width:" << args.image1.width - << " pad1_height:" << args.image1.pad_height - << " pad_width:" << args.image1.pad_width; - DLOG << " out_address:" << args.output.address - << " out_scale_address:" << args.output.scale_address; + << " image1_width:" << args.image1.width; + DLOG << " out_address:" << args.output.address; #endif #ifndef PADDLE_MOBILE_ZU5 return 0; #endif - return 0; + uint32_t filter_num_align = args.image0.channels; + + uint32_t const_kernel_width_1 = 1; + uint32_t const_stride_width_1 = 1; + uint32_t const_kernel_height_2 = 2; + uint32_t const_stride_height_2 = 2; + uint32_t const_pad_height_0 = 0; + uint32_t const_pad_width_0 = 0; + uint32_t ew_image_height = args.image0.height * 2; + + DLOG << "______db_______: begin to set registers. "; + uint64_t ifm_pixel_num = + ((args.image0.width) * (args.image0.height) * args.image0.channels); + uint64_t ifm_memory_size = ifm_pixel_num * sizeof(short); // NOLINT + uint64_t flt_pixel_num = 0; + uint64_t filter_memory_size = 0; + uint64_t bn_pixel_num = (filter_num_align * 2); + uint64_t bn_memory_size = bn_pixel_num * sizeof(uint16_t); + + uint64_t ofm_width = + ((args.image0.width) + 2 * const_pad_width_0 - const_kernel_width_1) / + (const_stride_width_1) + + 1; + uint64_t ofm_height = + ((ew_image_height) + 2 * (const_pad_height_0) - (const_kernel_height_2)) / + (const_stride_height_2) + + 1; + + uint32_t filter_num = filter_num_align; + uint32_t image_channels = args.image0.channels; + + uint64_t ifm_src_paddr = vaddr_to_paddr((args.image0.address)); + uint64_t flt_src_paddr = vaddr_to_paddr((args.image1.address)); + uint64_t ifm_dst_paddr = vaddr_to_paddr((args.output.address)); + float image_inv_scale = 0; + float filter_inv_scale = 0; + int idx = 0; + + DLOG << "______db_______: reset registers. "; + + reg_writeq(1, MUL8(24)); + usleep(1); + reg_writeq(0, MUL8(24)); + + /*********configuring registers*************/ + uint32_t cmd_image_vir_base_addr = (uint32_t)ifm_src_paddr; + uint32_t cmd_filter_vir_base_addr = (uint32_t)flt_src_paddr; + uint32_t cmd_scale_base_addr = 0; + uint32_t conv_ofm_addr_base = (uint32_t)ifm_dst_paddr; + uint64_t cmd_group_num = 1; + uint64_t cmd_filter_per_group = filter_num / cmd_group_num; + + uint64_t cmd_flt_sqr_len = (const_kernel_width_1) * (const_kernel_height_2); + uint64_t cmd_ifm_pre_row_num = const_kernel_height_2; + if ((const_kernel_height_2 == ew_image_height) && (0 == const_pad_height_0)) { + cmd_ifm_pre_row_num = (const_kernel_height_2); + } else { + cmd_ifm_pre_row_num = (const_kernel_height_2) - (const_pad_height_0) + + (const_stride_height_2); + } + uint64_t cmd_flt_pre_batch_num = 1; + uint64_t cmd_ifm_pack_num_per_row_mns1 = + (uint64_t)(((args.image0.channels) + 63) / 64) - 1; + uint64_t cmd_bn_num = filter_num; + uint64_t cmd_bias_num = filter_num; + uint64_t cmd_ifm_stride_row_length = + args.image0.width * const_stride_height_2; + uint64_t cmd_flt_pack_num_per_kernel_mns1 = + (uint64_t)(((args.image0.channels) + 63) / 64) - 1; + uint64_t cmd_ofm_width_mns1 = (uint64_t)( + ((args.image0.width) - (const_kernel_width_1) + 2 * (const_pad_width_0)) / + (const_stride_width_1)); + uint64_t cmd_ofm_height = + (uint64_t)(((args.image0.height) * 2 - (const_kernel_height_2) + + 2 * (const_pad_height_0)) / + (const_stride_height_2)) + + 1; + + uint64_t cmd_channel_num = 0; + uint64_t cmd_ifm_pack_len = 0; + uint64_t cmd_channel_per_group = 0; + uint64_t cmd_flt_batch_num_mns1 = 0; + uint64_t cmd_flt_N_impl = 8; + uint64_t cmd_ifm_C_impl = 16; + uint64_t cmd_flt_pack_length = 0; + uint64_t cmd_step_h_mul_row_byte_len = 0; + uint64_t cmd_pad_h_mul_row_byte_len = 0; + uint64_t cmd_ifm_pack_byte_length = + 16 * ((((args.image0.width) + 7) / 8) * 8); + uint64_t row_len_align = args.image0.width; + uint64_t cmd_flt_cycle_num_mns1 = 0; + if (image_channels > 32) { + cmd_channel_num = (uint64_t)((((args.image0.channels) + 63)) / 64) * 64; + cmd_ifm_pack_len = 64 * (args.image0.width); + cmd_channel_per_group = 64; + cmd_flt_batch_num_mns1 = (uint64_t)(((filter_num + 7)) / 8 - 1); + cmd_flt_N_impl = 8; + cmd_ifm_C_impl = 64; + cmd_flt_pack_length = (const_kernel_width_1) * (const_kernel_height_2)*64; + cmd_step_h_mul_row_byte_len = + (const_stride_height_2)*cmd_channel_num * args.image0.width; + cmd_pad_h_mul_row_byte_len = + (const_pad_height_0)*cmd_channel_num * args.image0.width; + cmd_ifm_pack_byte_length = 64 * args.image0.width; + row_len_align = args.image0.width; + cmd_flt_cycle_num_mns1 = (cmd_channel_num / 64) - 1; + } else if (image_channels > 16) { + cmd_channel_num = 32; + cmd_ifm_pack_len = 32 * (args.image0.width); + cmd_channel_per_group = 32; + cmd_flt_batch_num_mns1 = (uint64_t)((((filter_num) + 15)) / 16 - 1); + cmd_flt_N_impl = 16; + cmd_ifm_C_impl = 32; + cmd_flt_pack_length = (const_kernel_width_1) * (const_kernel_height_2)*32; + cmd_step_h_mul_row_byte_len = (const_stride_height_2)*cmd_channel_num * + ((((args.image0.width) + 1)) / 2) * 2; + cmd_pad_h_mul_row_byte_len = (const_pad_height_0)*cmd_channel_num * + ((((args.image0.width) + 1)) / 2) * 2; + cmd_ifm_pack_byte_length = + 32 * (uint64_t)((((args.image0.width) + 1)) / 2) * 2; + row_len_align = (uint64_t)((((args.image0.width) + 1)) / 2); + cmd_flt_cycle_num_mns1 = 0; + } else if (image_channels > 8) { + cmd_channel_num = 16; + cmd_ifm_pack_len = 16 * (args.image0.width); + cmd_channel_per_group = 16; + cmd_flt_batch_num_mns1 = (uint64_t)((((filter_num) + 15)) / 16 - 1); + cmd_flt_N_impl = 32; + cmd_ifm_C_impl = 16; + cmd_flt_pack_length = (const_kernel_width_1) * (const_kernel_height_2)*16; + cmd_step_h_mul_row_byte_len = (const_stride_height_2)*cmd_channel_num * + ((((args.image0.width) + 3)) / 4) * 4; + cmd_pad_h_mul_row_byte_len = (const_pad_height_0)*cmd_channel_num * + ((((args.image0.width) + 3)) / 4) * 4; + cmd_ifm_pack_byte_length = + 16 * (uint64_t)((((args.image0.width) + 3)) / 4) * 4; + row_len_align = (uint64_t)((((args.image0.width) + 3)) / 4); + cmd_flt_cycle_num_mns1 = 0; + } + + cmd_flt_N_impl = 16; + cmd_flt_batch_num_mns1 = 0; + cmd_flt_pack_length = 64; + uint64_t cmd_flt_N_len = 0; + uint64_t cmd_flt_length = 64; + uint64_t cmd_ifm_row_byte_length = cmd_channel_num * (args.image0.width); + uint64_t cmd_ifm_buf_col_len = 0; + uint64_t ifm_one_batch_len = + (1048576 / ((2 * row_len_align) * cmd_channel_num)); + uint64_t cmd_ifm_batch_num_tmp = (uint64_t)( + ((ew_image_height) + ifm_one_batch_len - 1) / ifm_one_batch_len); + DLOG << "ifm_one_batch_len = " << hex << ifm_one_batch_len; + DLOG << "cmd_ifm_batch_num_tmp = " << hex << cmd_ifm_batch_num_tmp; + + if (1 == cmd_ifm_batch_num_tmp) { + cmd_ifm_buf_col_len = ew_image_height; + } else { + cmd_ifm_buf_col_len = ifm_one_batch_len; + } + uint64_t cmd_ifm_batch_num_mns1 = + (((ew_image_height) + cmd_ifm_buf_col_len - 1) / cmd_ifm_buf_col_len) - 1; + DLOG << "___db____ew____:cmd_ifm_batch_num_mns1 = " << hex + << cmd_ifm_batch_num_mns1; + + uint64_t cmd_flt_total_batch_num = 1; + uint64_t cmd_ifm_buf_col_len_rem = + (ew_image_height)-cmd_ifm_batch_num_mns1 * cmd_ifm_buf_col_len; + //-------- ofm batch number reg && initial URAM reading address + // logic----------------- + uint64_t cmd_init_raddr_cnt = 1; + uint64_t cmd_init_raddr_flag = 0; + int64_t cmd_init_raddr_index = -8; + int64_t cmd_init_raddr_col_0 = -4; + int64_t cmd_init_raddr_col_1 = -4; + int64_t conv_ofm_buf_col_len = 0; + int64_t conv_ofm_buf_col_len_rem = 0; + + if (((const_pad_height_0) % (2 * (const_stride_height_2))) == 0) { + cmd_init_raddr_cnt = 0; + cmd_init_raddr_flag = 0; + cmd_init_raddr_index = + 0 - (int64_t)row_len_align * (((const_pad_height_0) + 1) / 2); + cmd_init_raddr_col_0 = cmd_init_raddr_index; + cmd_init_raddr_col_1 = cmd_init_raddr_index; + } else if (((const_pad_height_0)-2 * + ((const_pad_height_0) / (2 * (const_stride_height_2)))) <= + (const_stride_height_2)) { + cmd_init_raddr_cnt = + (const_stride_height_2) - + ((const_pad_height_0) - + ((const_pad_height_0) / (2 * (const_stride_height_2)))); + cmd_init_raddr_flag = 1; + cmd_init_raddr_index = + 0 - (int64_t)row_len_align * (int64_t)(const_pad_height_0) - + (int64_t)row_len_align * + ((const_pad_height_0) / (2 * const_stride_height_2)); + cmd_init_raddr_col_0 = + 0 - (int64_t)row_len_align * (int64_t)(const_pad_height_0) - + (int64_t)row_len_align * + ((const_pad_height_0) / (2 * (const_stride_height_2))); + cmd_init_raddr_col_1 = + cmd_init_raddr_col_0 + + const_stride_height_2 * (int64_t)row_len_align; // 0; + } else if (((const_pad_height_0)-2 * + ((const_pad_height_0) / (2 * (const_stride_height_2)))) <= + 2 * (const_stride_height_2)) { + cmd_init_raddr_cnt = + 2 * (const_stride_height_2) * + (((const_pad_height_0) + 2 * (const_stride_height_2)-1) / + (2 * (const_stride_height_2))) - + (const_pad_height_0); + cmd_init_raddr_flag = 0; + cmd_init_raddr_index = + 0 - (int64_t)row_len_align * (int64_t)(const_stride_height_2) * + (((const_pad_height_0) + 2 * (const_stride_height_2)-1) / + (2 * (const_stride_height_2))); + cmd_init_raddr_col_0 = + 0 - + (int64_t)row_len_align * + ((const_pad_height_0) / (2 * (const_stride_height_2))) - + (int64_t)row_len_align * + (2 * (const_stride_height_2) * + (((const_pad_height_0) + 2 * (const_stride_height_2)-1) / + (2 * (const_stride_height_2))) - + (const_pad_height_0)); + cmd_init_raddr_col_1 = cmd_init_raddr_col_0; + } + + if (cmd_ifm_batch_num_mns1 == 0) { + if ((const_kernel_height_2) <= (const_stride_height_2)) { + conv_ofm_buf_col_len = cmd_ifm_buf_col_len + 2 * (const_pad_height_0)-3 * + (const_stride_height_2); + } else { + conv_ofm_buf_col_len = + cmd_ifm_buf_col_len + + 2 * (const_pad_height_0)-3 * (const_stride_height_2) - + (const_kernel_height_2); + } + conv_ofm_buf_col_len_rem = conv_ofm_buf_col_len; + } else { + int N_rem = 0; + int row_rem = 0; + + if ((const_kernel_height_2) <= (const_stride_height_2)) { + conv_ofm_buf_col_len = cmd_ifm_buf_col_len - 3 * (const_stride_height_2); + N_rem = (cmd_ifm_buf_col_len - (const_kernel_height_2)) / + (const_stride_height_2) + + 1; + row_rem = cmd_ifm_buf_col_len - (const_stride_height_2)*N_rem; + conv_ofm_buf_col_len_rem = cmd_ifm_buf_col_len_rem + + 2 * (const_pad_height_0) + row_rem - + 3 * (const_stride_height_2); + } else { + conv_ofm_buf_col_len = + cmd_ifm_buf_col_len + + 2 * (const_pad_height_0)-3 * (const_stride_height_2) - + (const_kernel_height_2); + N_rem = (cmd_ifm_buf_col_len - (const_kernel_height_2)) / + (const_stride_height_2) + + 1; + row_rem = cmd_ifm_buf_col_len - (const_stride_height_2)*N_rem; + conv_ofm_buf_col_len_rem = + cmd_ifm_buf_col_len_rem + (const_pad_height_0) + row_rem - + 3 * (const_stride_height_2) - (const_kernel_height_2); + } + } + + //************************* + uint64_t ifm_height_raw_batch = 0; + uint64_t cmd_ofm_height_batch_reg; + uint64_t conv_ofm_height_batch_tmp = 0; + uint64_t conv_ofm_height_batch[16]; + int ofm_height_norm_batch; + int height_batch_num; + + int row_norm_size = get_ofm_batch_size(args.image0.width, cmd_channel_num); + int ifm_norm_size = + ew_image_height * row_norm_size * sizeof(short); // NOLINT + + if (ifm_norm_size <= (1024 * 1024)) { + conv_ofm_height_batch[0] = + get_image_out_axis(ew_image_height, const_pad_height_0, + const_kernel_height_2, const_stride_height_2); + height_batch_num = 0; + } else if (row_norm_size < (1024 * 1024)) { + // raw ifm batch ,should make ofm be 2*N + ifm_height_raw_batch = + (int)(((double)(1024 * 1024) - row_norm_size + 1) / // NOLINT + (double)(2 * row_norm_size)); // NOLINT + ofm_height_norm_batch = get_image_out_axis( + ifm_height_raw_batch, 0, const_kernel_height_2, const_stride_height_2); + if (ofm_height_norm_batch % 2 == 0) { + ofm_height_norm_batch = ofm_height_norm_batch; + } else { + ofm_height_norm_batch = ofm_height_norm_batch - 1; + } + + DLOG << "ofm_height_norm_batch = " << hex << ofm_height_norm_batch; + int ofm_height_rems = cmd_ofm_height; + int i = 0; + for (i = 0; 0 < ofm_height_rems; i++) { + if (ofm_height_norm_batch <= ofm_height_rems) { + ofm_height_rems = ofm_height_rems - ofm_height_norm_batch; + conv_ofm_height_batch[i] = ofm_height_norm_batch; + DLOG << "ofm_height_norm_batch[i] = " << hex + << conv_ofm_height_batch[i]; + } else { + conv_ofm_height_batch[i] = ofm_height_rems; + break; + } + } + height_batch_num = i; + } + //************************* + + //----------------------- para functions -------------------------------- + uint64_t cmd_filter_quant_scale = 0x3c00; + uint64_t cmd_image_quant_scale = 0x3c00; + uint64_t wParallelsim = cmd_ifm_C_impl >> 3; + uint64_t wParallelsim_num = cmd_flt_cycle_num_mns1; + uint64_t win_size = (const_kernel_width_1) * (const_kernel_height_2) * + (cmd_ifm_pack_num_per_row_mns1 + 1) - + 1; // + uint64_t conv_ofm_width = (((args.image0.width) - (const_kernel_width_1) + + (const_pad_width_0) + (const_pad_width_0)) / + (const_stride_width_1)); + uint64_t conv_ofm_dma_length = cmd_channel_num * sizeof(short); // NOLINT + uint64_t conv_ofm_dma_stride = cmd_channel_num * sizeof(short); // NOLINT + uint64_t cmd_image_addr_low = 0; + uint64_t cmd_image_addr_high = 0; + uint64_t cmd_image_addr_diff = 0; + + if (cmd_filter_vir_base_addr < cmd_image_vir_base_addr) { + cmd_image_addr_low = (uint64_t)cmd_filter_vir_base_addr; + cmd_image_addr_high = (uint64_t)cmd_image_vir_base_addr; + } else { + cmd_image_addr_low = (uint64_t)cmd_image_vir_base_addr; + cmd_image_addr_high = (uint64_t)cmd_filter_vir_base_addr; + } + + cmd_image_addr_diff = cmd_image_addr_high - cmd_image_addr_low; + uint64_t o_ust_rst = 0; + uint64_t conv_ofm_dma_repeat = + (uint64_t)(((((args.image0.width) - (const_kernel_width_1) + + (const_pad_width_0) + (const_pad_width_0))) / + (const_stride_width_1)) + + 1); + uint64_t conv_ofm_dma_offset = + cmd_channel_num * conv_ofm_dma_repeat * sizeof(short); // NOLINT + uint64_t conv_ofm_inter_stride = conv_ofm_dma_offset * 2; + //----------------- register contation ------------------ + uint64_t cmd_ifm_flt_base_addr = + (cmd_image_addr_high << 32) | (cmd_image_addr_low); + + uint64_t cmd_ifm_flt_dim = ((uint64_t)(const_kernel_height_2) << 48) | + ((uint64_t)(const_kernel_width_1) << 32) | + ((uint64_t)(ew_image_height) << 16) | + ((uint64_t)(args.image0.width)); + uint64_t cmd_pad_step_size = ((uint64_t)(const_stride_height_2) << 48) | + ((uint64_t)(const_stride_width_1) << 32) | + ((uint64_t)(const_pad_height_0) << 16) | + ((uint64_t)(const_pad_width_0)); + uint64_t cmd_param1 = ((uint64_t)cmd_filter_per_group << 48) | + ((uint64_t)cmd_channel_num << 32) | + ((uint64_t)filter_num << 16) | + ((uint64_t)cmd_group_num); + uint64_t cmd_param2 = + ((uint64_t)cmd_flt_sqr_len << 48) | ((uint64_t)cmd_ifm_pack_len << 32) | + ((uint64_t)cmd_ifm_pre_row_num << 16) | ((uint64_t)cmd_channel_per_group); + uint64_t cmd_param3 = ((uint64_t)cmd_flt_batch_num_mns1 << 48) | + ((uint64_t)cmd_flt_total_batch_num << 32) | + ((uint64_t)cmd_flt_N_impl << 16) | + ((uint64_t)cmd_flt_pre_batch_num); + uint64_t cmd_param4 = ((uint64_t)cmd_ifm_pack_num_per_row_mns1 << 48) | + ((uint64_t)cmd_bn_num << 32) | + ((uint64_t)cmd_bias_num << 16) | + ((uint64_t)cmd_flt_N_len); + uint64_t cmd_param5 = ((uint64_t)cmd_ifm_stride_row_length << 48) | + ((uint64_t)cmd_flt_pack_length << 32) | + ((uint64_t)cmd_flt_cycle_num_mns1 << 16) | + ((uint64_t)cmd_flt_pack_num_per_kernel_mns1); + uint64_t cmd_param6 = ((uint64_t)cmd_ofm_width_mns1 << 48) | + ((uint64_t)cmd_ifm_batch_num_mns1 << 32) | + ((uint64_t)cmd_ifm_buf_col_len << 16) | + ((uint64_t)cmd_ifm_C_impl); + uint64_t cmd_param7 = ((uint64_t)conv_ofm_inter_stride << 32) | + ((uint64_t)cmd_ifm_buf_col_len_rem << 16) | + ((uint64_t)cmd_ofm_height); + uint64_t cmd_param8 = + ((uint64_t)cmd_flt_length << 32) | ((uint64_t)cmd_ifm_row_byte_length); + uint64_t cmd_ifm_flt_quant_scale = ((uint64_t)cmd_filter_quant_scale << 32) | + ((uint64_t)cmd_image_quant_scale); + uint64_t cmd_step_pad_mul_row_len = + ((uint64_t)cmd_pad_h_mul_row_byte_len << 32) | + ((uint64_t)cmd_step_h_mul_row_byte_len); + //---- ofm paras ---- + uint64_t cmd_conv_param_reg = ((uint64_t)wParallelsim_num << 32) | + ((uint64_t)wParallelsim << 16) | + ((uint64_t)win_size); + uint64_t cmd_ofm_addr_width_reg = + ((uint64_t)conv_ofm_width << 32) | ((uint64_t)conv_ofm_addr_base); + uint64_t cmd_intra_stride_atoms_reg = + ((uint64_t)conv_ofm_dma_length << 32) | ((uint64_t)conv_ofm_dma_stride); + uint64_t cmd_user_ctrl_reg = ((uint64_t)o_ust_rst); + uint64_t cmd_wdma_param_reg = + ((uint64_t)(conv_ofm_dma_repeat | 0x80000000) << 32) | + ((uint64_t)conv_ofm_dma_offset); + uint64_t cmd_init_raddr_reg = ((cmd_init_raddr_col_1 & 0xffff) << 48) | + ((cmd_init_raddr_col_0 & 0xffff) << 32) | + (((cmd_init_raddr_index & 0xffff) << 16)) | + (cmd_init_raddr_flag & 0xffff) << 15 | + ((cmd_init_raddr_cnt & 0xffff)); + uint64_t cmd_mult_factor = + ((uint64_t)args.const0) | ((uint64_t)args.const1 << 16); + uint64_t cmd_para31 = (cmd_para31 & 0x1) | args.relu_enabled; + + DLOG << "cmd_init_raddr_col_1 = " << hex << cmd_init_raddr_col_1; + DLOG << "cmd_init_raddr_col_0 = " << hex << cmd_init_raddr_col_0; + DLOG << "cmd_init_raddr_index = " << hex << cmd_init_raddr_index; // + DLOG << "cmd_init_raddr_cnt = " << hex << cmd_init_raddr_cnt; + DLOG << "cmd_ifm_buf_col_len = " << hex << cmd_ifm_buf_col_len; + DLOG << "cmd_ifm_buf_col_len_rem = " << hex << cmd_ifm_buf_col_len_rem; + DLOG << "conv_ofm_buf_col_len = " << hex << conv_ofm_buf_col_len; + DLOG << "conv_ofm_buf_col_len_rem = " << hex << conv_ofm_buf_col_len_rem; + DLOG << "cmd_ifm_flt_base_addr = " << hex << cmd_ifm_flt_base_addr; + DLOG << "cmd_scale_base_addr = " << hex << cmd_scale_base_addr; + DLOG << "cmd_ifm_flt_dim = " << hex << cmd_ifm_flt_dim; + DLOG << "cmd_pad_step_size = " << hex << cmd_pad_step_size; + DLOG << "cmd_param1 = " << hex << cmd_param1; + DLOG << "cmd_param2 = " << hex << cmd_param2; + DLOG << "cmd_param3 = " << hex << cmd_param3; + DLOG << "cmd_param4 = " << hex << cmd_param4; + DLOG << "cmd_param5 = " << hex << cmd_param5; + DLOG << "cmd_param6 = " << hex << cmd_param6; + DLOG << "cmd_param7 = " << hex << cmd_param7; + DLOG << "cmd_param8 = " << hex << cmd_param8; + DLOG << "cmd_ifm_flt_quant_scale = " << hex << cmd_ifm_flt_quant_scale; + DLOG << "cmd_step_pad_mul_row_len = " << hex << cmd_step_pad_mul_row_len; + DLOG << "cmd_ifm_pack_byte_length = " << hex << cmd_ifm_pack_byte_length; + DLOG << "cmd_conv_param_reg = " << hex << cmd_conv_param_reg; + DLOG << "cmd_ofm_addr_width_reg = " << hex << cmd_ofm_addr_width_reg; + DLOG << "cmd_intra_stride_atoms_reg = " << hex << cmd_intra_stride_atoms_reg; + DLOG << "cmd_init_raddr_reg = " << hex << cmd_init_raddr_reg; + DLOG << "cmd_mult_factor = " << hex << cmd_mult_factor; + DLOG << "cmd_wdma_param_reg = " << hex << cmd_wdma_param_reg; + DLOG << "cmd_para31 = " << hex << cmd_para31; + + reg_writeq(cmd_ifm_flt_base_addr, MUL8(1)); + reg_writeq(cmd_scale_base_addr, MUL8(2)); + reg_writeq(cmd_ifm_flt_dim, MUL8(3)); + reg_writeq(cmd_pad_step_size, MUL8(4)); + reg_writeq(cmd_param1, MUL8(5)); + reg_writeq(cmd_param2, MUL8(6)); + reg_writeq(cmd_param3, MUL8(7)); + reg_writeq(cmd_param4, MUL8(8)); + reg_writeq(cmd_param5, MUL8(9)); + reg_writeq(cmd_param6, MUL8(10)); + reg_writeq(cmd_param7, MUL8(11)); + reg_writeq(cmd_param8, MUL8(12)); + reg_writeq(cmd_ifm_flt_quant_scale, MUL8(13)); + reg_writeq(cmd_step_pad_mul_row_len, MUL8(14)); + reg_writeq(cmd_ifm_pack_byte_length, MUL8(15)); + reg_writeq(cmd_conv_param_reg, MUL8(16)); + reg_writeq(cmd_ofm_addr_width_reg, MUL8(17)); + reg_writeq(cmd_intra_stride_atoms_reg, MUL8(18)); + + reg_writeq(cmd_init_raddr_reg, MUL8(29)); + reg_writeq(cmd_para31, MUL8(31)); + + reg_writeq(0, MUL8(19)); + for (int i = 0; i < height_batch_num + 1; i++) { + conv_ofm_height_batch_tmp = + int((conv_ofm_height_batch[i] + 1) / 2) - 1; // NOLINT + cmd_ofm_height_batch_reg = + ((uint64_t)(conv_ofm_buf_col_len_rem & 0xffff) << 48) | + ((uint64_t)(conv_ofm_buf_col_len & 0xffff) << 32) | + ((uint64_t)conv_ofm_height_batch_tmp + 0x80000000); + reg_writeq(cmd_ofm_height_batch_reg, MUL8(19)); + reg_writeq(cmd_ofm_height_batch_reg & 0xffffffff00000000, MUL8(19)); + usleep(1); + } + reg_writeq(cmd_wdma_param_reg, MUL8(25)); + DLOG << "cmd_ofm_height_batch_reg = " << hex << cmd_ofm_height_batch_reg; + + /******************************************************************/ + reg_writeq(cmd_mult_factor, MUL8(30)); + /******************************************************************/ + + reg_writeq(0, MUL8(0)); + + reg_writeq(0x2100000000000000, MUL8(0)); + + int ret = fpga_regpoll(MUL8(48), CONV_DONE, 0xffffff); + if (ret == -1) { + DLOG << "fpga EW no interrupt!!"; + return ret; + } + reg_readq(MUL8(63)); + usleep(10); + // get max value + float scale = Findfp16Max(); + (args.output.scale_address)[0] = scale; // NOLINT + (args.output.scale_address)[1] = (float)(1.0 / scale); // NOLINT + DLOG << "Findfp16Max scale = " << scale; + + DLOG << "ret=" << ret; + return ret; } int PerformBypass(const struct BypassArgs &args) { @@ -166,60 +1598,63 @@ int PerformBypass(const struct BypassArgs &args) { return 0; #endif - // uint64_t ifm_src_paddr = driver::vaddr_to_paddr(args.image.address); - // uint64_t ifm_dst_paddr = driver::vaddr_to_paddr(args.output.address); - // uint64_t bp_enable; - // int64_t length; - // uint64_t pixels; - // - // // fp32->fp16 - // if ((args.input_data_type) && (!args.output_data_type)) { - // pixels = (args.image.channels) * (args.image.width) * - // (args.image.height); length = pixels * sizeof(float); bp_enable = - // 0x8800000000000000 + length; - // } - // // fp16->fp32 - // else if ((!args.input_data_type) && (args.output_data_type)) { - // pixels = filter::calc_aligned_channel((args.image.channels)) * - // (args.image.width) * (args.image.height); - // length = pixels * sizeof(short); - // length = align_to_x((int)length, 64); // NOLINT - // bp_enable = 0x8a00000000000000 + length; - // } - // // fp16->fp16 findmax - // else if ((!args.input_data_type) && (!args.output_data_type)) { - // pixels = (args.image.channels) * (args.image.width) * - // (args.image.height); length = pixels * sizeof(short); bp_enable = - // 0x8900000000000000 + length; - // } else { - // return -1; - // } - // - // // start bypass - // driver::reg_writeq(ifm_src_paddr, MUL8(27)); - // driver::reg_writeq(ifm_dst_paddr, MUL8(28)); - // driver::reg_writeq(0, MUL8(0)); - // driver::reg_writeq(bp_enable, MUL8(0)); - // // poll - // int ret = -1; - // ret = driver::fpga_regpoll(MUL8(48), BYPASS_DONE, 0xffffffff); - // if (ret != -1) { - // // clear "irq" - // driver::reg_readq(MUL8(63)); - // } - // // get max value - // if ((!args.input_data_type) && (!args.output_data_type)) { - // float scale = Findfp16Max(); - // args.output.scale_address[0] = (float)(1.0 / scale); // NOLINT - // args.output.scale_address[1] = scale; - // } - // return ret; + uint64_t ifm_src_paddr = vaddr_to_paddr(args.image.address); + uint64_t ifm_dst_paddr = vaddr_to_paddr(args.output.address); + uint64_t bp_enable; + int64_t length; + uint64_t pixels; + + // fp32->fp16 + if ((args.input_data_type) && (!args.output_data_type)) { + DLOG << "fp32-fp16"; + pixels = (args.image.channels) * (args.image.width) * (args.image.height); + length = pixels * sizeof(float); + bp_enable = 0x8800000000000000UL + (uint64_t)length; + } + // fp16->fp32 + else if ((!args.input_data_type) && (args.output_data_type)) { // NOLINT + DLOG << "fp16-fp32"; + pixels = filter::calc_aligned_channel((args.image.channels)) * + (args.image.width) * (args.image.height); + length = pixels * sizeof(short); // NOLINT + length = align_to_x((int)length, 64); // NOLINT + bp_enable = 0x8a00000000000000UL + length; + } + // fp16->fp16 findmax + else if ((!args.input_data_type) && (!args.output_data_type)) { // NOLINT + DLOG << "16-16"; + pixels = (args.image.channels) * (args.image.width) * (args.image.height); + length = pixels * sizeof(short); // NOLINT + bp_enable = 0x8900000000000000 + length; + } else { + return -1; + } + // start bypass + reg_writeq(0, MUL8(0)); + reg_writeq(ifm_src_paddr, MUL8(27)); + reg_writeq(ifm_dst_paddr, MUL8(28)); + reg_writeq(bp_enable, MUL8(0)); + int ret = -1; + ret = fpga_regpoll(MUL8(48), BYPASS_DONE, 0xffffff); + + if (ret != -1) { + DLOG << "test done"; + } + reg_readq(MUL8(63)); + usleep(10); + // get max value + float scale = Findfp16Max(); + args.output.scale_address[0] = scale; // NOLINT + args.output.scale_address[1] = (float)(1.0 / scale); // NOLINT + DLOG << "ret=" << ret; + return ret; } int ComputeFPGAConcat(const struct ConcatArgs &args) { #ifdef FPGA_PRINT_MODE DLOG << "=============ComputeFpgaConcat==========="; DLOG << " Image_num: " << args.image_num + << " out_address:" << args.image_out << " out_scale_address:" << args.scale_out << " out_channel:" << args.out_channel; diff --git a/src/fpga/common/fpga_common.cpp b/src/fpga/common/fpga_common.cpp old mode 100644 new mode 100755 index 53c9173723e8868d8701cfd665e39fddeb97bbe5..16be003955622afd206704d32e090ea9bace743e --- a/src/fpga/common/fpga_common.cpp +++ b/src/fpga/common/fpga_common.cpp @@ -113,6 +113,12 @@ int fpga_invalidate(void *address, size_t size) { return 0; #endif } - +uint64_t vaddr_to_paddr(void *address) { +#ifdef PADDLE_MOBILE_ZU5 + return driver::vaddr_to_paddr(address); +#else + return 0; +#endif +} } // namespace fpga } // namespace paddle_mobile diff --git a/src/operators/kernel/arm/quantize_kernel.cpp b/src/operators/kernel/arm/quantize_kernel.cpp index 1f76e604e70e69aae6bb4bd78662ffff1c38162c..03f4ac81fbb4a43a01826db317a5027527766fde 100644 --- a/src/operators/kernel/arm/quantize_kernel.cpp +++ b/src/operators/kernel/arm/quantize_kernel.cpp @@ -197,21 +197,21 @@ void QuantizeKernel::Compute(const QuantizeParam ¶m) { } max_abs = std::max(max_abs, 1e-6f); param.online_scale_->mutable_data()[0] = max_abs; - // switch (param.round_type_) { - // case ROUND_NEAREST_TO_EVEN: - // Quantize(input, scale, output); - // break; - // case ROUND_NEAREST_TOWARDS_ZERO: - // Quantize(input, scale, output); - // break; - // case ROUND_NEAREST_AWAY_ZERO: - // Quantize(input, scale, output); - // break; - // default: - // LOG(kLOG_ERROR) << "round type is not supported."; - // break; - // } - Quantize(input, max_abs, param.offline_, output); + switch (param.round_type_) { + case ROUND_NEAREST_TO_EVEN: + Quantize(input, max_abs, param.offline_, output); + break; + case ROUND_NEAREST_TOWARDS_ZERO: + Quantize(input, max_abs, param.offline_, + output); + break; + case ROUND_NEAREST_AWAY_ZERO: + Quantize(input, max_abs, param.offline_, output); + break; + default: + LOG(kLOG_ERROR) << "round type is not supported."; + break; + } } } // namespace operators diff --git a/src/operators/kernel/fpga/V2/feed_kernel.cpp b/src/operators/kernel/fpga/V2/feed_kernel.cpp index d1a721b5eb02a775498c17adcae84ce560ac1135..7c4b999e7c0eba150e52116c90600764dc863d53 100644 --- a/src/operators/kernel/fpga/V2/feed_kernel.cpp +++ b/src/operators/kernel/fpga/V2/feed_kernel.cpp @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "operators/kernel/feed_kernel.h" - +#include "fpga/V2/filter.h" namespace paddle_mobile { namespace operators { @@ -24,7 +24,6 @@ bool FeedKernel::Init(FeedParam *param) { fpga::format_fp16_ofm(output, aligned_channel); return true; } - template <> void FeedKernel::Compute(const FeedParam ¶m) { auto input = @@ -33,6 +32,9 @@ void FeedKernel::Compute(const FeedParam ¶m) { auto input_ptr = input->data(); Tensor *output = param.Out(); auto output_ptr = output->data(); + auto channel = input->dims()[1]; + uint32_t aligned_channels = + fpga::filter::calc_aligned_channel((int)channel); // NOLINT fpga::BypassArgs args = {fpga::DATA_TYPE_FP32}; @@ -41,7 +43,7 @@ void FeedKernel::Compute(const FeedParam ¶m) { args.input_layout_type = fpga::LAYOUT_CHW; args.output_layout_type = fpga::LAYOUT_HWC; args.image.address = reinterpret_cast(input_ptr); - args.image.channels = (uint32_t)input->dims()[1]; + args.image.channels = aligned_channels; args.image.height = (uint32_t)input->dims()[2]; args.image.width = (uint32_t)input->dims()[3]; args.image.pad_height = 0; diff --git a/src/operators/kernel/fpga/V2/softmax_kernel.cpp b/src/operators/kernel/fpga/V2/softmax_kernel.cpp old mode 100644 new mode 100755 index bbdb35b715b60b25079c007a74b8b1e901cc9a59..5232364ac2be8d35cc20a47b5abf5cba09b14e32 --- a/src/operators/kernel/fpga/V2/softmax_kernel.cpp +++ b/src/operators/kernel/fpga/V2/softmax_kernel.cpp @@ -25,7 +25,7 @@ bool SoftmaxKernel::Init(SoftmaxParam *param) { auto input_ptr = input->data(); auto float_input = new Tensor; float_input->mutable_data({1, input->dims()[1]}); - fpga::format_fp32_ofm(float_input, 8); + fpga::format_fp32_ofm(float_input, 1024); fpga::BypassArgs args = {fpga::DATA_TYPE_FP16}; args.input_layout_type = fpga::LAYOUT_HWC;