voize-gmbh / pytorch-lite-multiplatform

A Kotlin multi-platform wrapper around the PyTorch Lite libraries on Android and iOS.
Apache License 2.0
35 stars 4 forks source link

Unable to run sample code in pytorch-lite-multiplatform library on phone using KMM library #20

Closed RahulThink closed 1 year ago

RahulThink commented 1 year ago

Hello Team, I used same code to create Library in KMM and export that library to Xcode as mentioned in following link https://kotlinlang.org/docs/apple-framework.html but while I build app from Xcode I get Following error 1) for simulator I am getting Simulator

Undefined symbols for architecture x86_64: "_OBJCCLASS$_TorchModule", referenced from: objc-class-ref in ObjectDetection(result.o) "_OBJCCLASS$_Tensor", referenced from: objc-class-ref in ObjectDetection(result.o) "_OBJCCLASS$_IValueWrapper", referenced from: objc-class-ref in ObjectDetection(result.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

2) and for iphone 6s plus (Arm64) I am getting

d: warning: ignoring file /Users/rahulkundaliklokhande/Desktop/Rahul/thinksysWorkspace/StreamingWithKMM/StreamingWithKMM/ObjectDetection.framework/ObjectDetection, building for iOS-arm64 but attempting to link with file built for iOS Simulator-x86_64 Undefined symbols for architecture arm64: "_OBJCCLASS$_ObjectDetectionYolo5PostProcessSize", referenced from: objc-class-ref in ViewController.o objc-class-ref in MainViewController.o "_OBJCCLASS$_ObjectDetectionInference", referenced from: objc-class-ref in ViewController.o objc-class-ref in MainViewController.o "_OBJCCLASS$_ObjectDetectionFloat", referenced from: objc-class-ref in ViewController.o objc-class-ref in MainViewController.o "_OBJCCLASS$_ObjectDetectionPrePostProcessor", referenced from: objc-class-ref in ViewController.o objc-class-ref in MainViewController.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

erksch commented 1 year ago

Can you provide us with a reproducer project?

Legion2 commented 1 year ago

closing issue because of lack of response