Paddle-Lite
Paddle-Lite copied to clipboard
Mac M1 编译opt工具报错
Hi, 我使用最新版本release/v2.10,编译OPT工具时,编译报错
电脑环境是MacBook Pro (13-inch, M1, 2020)
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/build.opt/all_kernel_faked_dir/calib_kX86_kInt8_kNCHW_fp32_to_int8_class.cc:3:65: error: no type named 'calib_kX86_kInt8_kNCHW_fp32_to_int8_class' in namespace 'paddle::lite'
REGISTER_LITE_KERNEL(calib, kX86, kInt8, kNCHW, ::paddle::lite::calib_kX86_kInt8_kNCHW_fp32_to_int8_class, fp32_to_int8)
~~~~~~~~~~~~~~~~^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/lite/core/op_registry.h:277:48: note: expanded from macro 'REGISTER_LITE_KERNEL'
std::unique_ptr<KernelClass> x(new KernelClass); \
^~~~~~~~~~~
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/build.opt/all_kernel_faked_dir/calib_kX86_kInt8_kNCHW_fp32_to_int8_class.cc:3:1: error: function definition is not allowed here
REGISTER_LITE_KERNEL(calib, kX86, kInt8, kNCHW, ::paddle::lite::calib_kX86_kInt8_kNCHW_fp32_to_int8_class, fp32_to_int8)
^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/lite/core/op_registry.h:282:69: note: expanded from macro 'REGISTER_LITE_KERNEL'
int touch_##op_type__##target__##precision__##layout__##alias__() { \
^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/build.opt/all_kernel_faked_dir/calib_kX86_kInt8_kNCHW_fp32_to_int8_class.cc:6:17: error: expected '}'
.Finalize();
^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/build.opt/all_kernel_faked_dir/calib_kX86_kInt8_kNCHW_fp32_to_int8_class.cc:3:1: note: to match this '{'
REGISTER_LITE_KERNEL(calib, kX86, kInt8, kNCHW, ::paddle::lite::calib_kX86_kInt8_kNCHW_fp32_to_int8_class, fp32_to_int8)
^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/lite/core/op_registry.h:276:16: note: expanded from macro 'REGISTER_LITE_KERNEL'
[]() { \
^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/build.opt/all_kernel_faked_dir/calib_kX86_kInt8_kNCHW_fp32_to_int8_class.cc:6:17: error: expected ')'
.Finalize();
^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/build.opt/all_kernel_faked_dir/calib_kX86_kInt8_kNCHW_fp32_to_int8_class.cc:3:1: note: to match this '('
REGISTER_LITE_KERNEL(calib, kX86, kInt8, kNCHW, ::paddle::lite::calib_kX86_kInt8_kNCHW_fp32_to_int8_class, fp32_to_int8)
^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/lite/core/op_registry.h:271:76: note: expanded from macro 'REGISTER_LITE_KERNEL'
op_type__##target__##precision__##layout__##alias__##_kernel_registry( \
^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/build.opt/all_kernel_faked_dir/calib_kX86_kInt8_kNCHW_fp32_to_int8_class.cc:3:1: error: no matching constructor for initialization of 'paddle::lite::KernelRegistrar'
REGISTER_LITE_KERNEL(calib, kX86, kInt8, kNCHW, ::paddle::lite::calib_kX86_kInt8_kNCHW_fp32_to_int8_class, fp32_to_int8)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/lite/core/op_registry.h:271:7: note: expanded from macro 'REGISTER_LITE_KERNEL'
op_type__##target__##precision__##layout__##alias__##_kernel_registry( \
^
<scratch space>:87:1: note: expanded from here
calibkX86kInt8kNCHWfp32_to_int8_kernel_registry
^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/lite/core/op_registry.h:199:3: note: candidate constructor not viable: no known conversion from '(lambda at /Users/yangjun/jerome/paddle-lite/Paddle-Lite/build.opt/all_kernel_faked_dir/calib_kX86_kInt8_kNCHW_fp32_to_int8_class.cc:3:1)' to 'std::function<std::unique_ptr<KernelBase> ()>' for 5th argument
KernelRegistrar(const std::string& op_type,
^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/lite/core/op_registry.h:197:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 5 were provided
class KernelRegistrar {
^
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/lite/core/op_registry.h:197:7: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 5 were provided
/Users/yangjun/jerome/paddle-lite/Paddle-Lite/build.opt/all_kernel_faked_dir/calib_kX86_kInt8_kNCHW_fp32_to_int8_class.cc:6:17: error: expected ';' after top level declarator
.Finalize();
^
;
64 warnings and 3 errors generated.
make[3]: *** [lite/kernels/CMakeFiles/kernels.dir/__/__/all_kernel_faked_dir/calib_kX86_kFloat_kNCHW_int32_to_int64_class.cc.o] Error 1
64 warnings and 3 errors generated.
make[3]: *** [lite/kernels/CMakeFiles/kernels.dir/__/__/all_kernel_faked_dir/calib_kX86_kFloat_kNCHW_fp32_to_int32_class.cc.o] Error 1
64 warnings and 3 errors generated.
make[3]: *** [lite/kernels/CMakeFiles/kernels.dir/__/__/all_kernel_faked_dir/calib_kX86_kFloat_kNCHW_int32_to_fp32_class.cc.o] Error 1
64 warnings and 3 errors generated.
make[3]: *** [lite/kernels/CMakeFiles/kernels.dir/__/__/all_kernel_faked_dir/calib_kX86_kFloat_kNCHW_int64_to_fp32_class.cc.o] Error 1
64 warnings generated.
64 warnings and 3 errors generated.
make[3]: *** [lite/kernels/CMakeFiles/kernels.dir/__/__/all_kernel_faked_dir/calib_kX86_kFloat_kNCHW_int64_to_int32_class.cc.o] Error 1
64 warnings generated.
64 warnings and 7 errors generated.
64 warnings generated.
make[3]: *** [lite/kernels/CMakeFiles/kernels.dir/__/__/all_kernel_faked_dir/calib_kX86_kInt8_kNCHW_int8_to_fp32_class.cc.o] Error 1
64 warnings and 7 errors generated.
make[3]: *** [lite/kernels/CMakeFiles/kernels.dir/__/__/all_kernel_faked_dir/calib_kX86_kInt8_kNCHW_fp32_to_int8_class.cc.o] Error 1
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网文档、常见问题、历史Issue来寻求解答。祝您生活愉快~
Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API,FAQ and Github Issue to get the answer.Have a nice day!
我这边编译的步骤为. git clone https://github.com/PaddlePaddle/Paddle-Lite.git git checkout release/v2.10 rm -rf third-party arch -x86_64 ./lite/tools/build.sh build_optimize_tool
我在同样的M1机器上复现了下编译流程,中间没有报错。要不你再检查下编译器版本等信息,我的编译器信息如下:Apple clang version 13.0.0 (clang-1300.0.29.3) Target: arm64-apple-darwin20.6.0 或者你不用自己编译,直接下载发布的opt工具。 https://github.com/PaddlePaddle/Paddle-Lite/releases/download/v2.10/opt_mac
@weishengying Hi, 当我使用你提供的opt_mac时,报错日志如下:
yangjun@yangjun ocr % file ../../Paddle-Lite/opt_mac ../../Paddle-Lite/opt_mac: Mach-O 64-bit executable x86_64 yangjun@yangjun ocr % ../../Paddle-Lite/opt_mac zsh: illegal hardware instruction ../../Paddle-Lite/opt_mac
然后我这边的编译器信息如下: Apple clang version 13.0.0 (clang-1300.0.29.3) Target: arm64-apple-darwin21.1.0
请问下你的M1安装的python版本是多少
@weishengying Hi, Python 3.7.9
@weishengying Hi, Python 3.7.9
换一种方式,不编译opt可执行工具。用python安装paddlelite包。 python3.7 -m pip install paddlelite。然后使用python中的opt工具。参考文档 Opt
@weishengying Hi, 当我使用OPT 脚本的方式,出现崩溃,以下是系统的错误日志
Translated Report (Full Report Below)
Process: Python [35151] Path: /Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python Identifier: org.python.python Version: 3.7.9 (3.7.9) Code Type: X86-64 (Translated) Parent Process: zsh [34328] Responsible: Terminal [2148] User ID: 501
Date/Time: 2022-03-02 20:51:34.3599 +0800 OS Version: macOS 12.0.1 (21A559) Report Version: 12 Anonymous UUID: 27CF5C4C-E38B-6CDB-BBC1-64E1D6A1B558
Sleep/Wake UUID: ADF569CD-3986-4E40-811A-F409058F4B33
Time Awake Since Boot: 370000 seconds Time Since Wake: 18224 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4 Terminating Process: exc handler [35151]
Kernel Triage: VM - pmap_enter failed with resource shortage VM - pmap_enter failed with resource shortage
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 lite.so 0x10cf7fd57 _GLOBAL__sub_I_pybind.cc + 23 1 dyld 0x202c26b49 invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 182 2 dyld 0x202c4d0ff invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 129 3 dyld 0x202c44893 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 566 4 dyld 0x202c13d91 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 129 5 dyld 0x202c4461b dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 179 6 dyld 0x202c4cb30 dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const + 118 7 dyld 0x202c4cda2 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 386 8 dyld 0x202c26a7c dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144 9 dyld 0x202c26c08 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 178 10 dyld 0x202c26cac dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 108 11 dyld 0x202c359b5 dyld4::APIs::dlopen_from(char const*, int, void*) + 563 12 Python 0x10b59a08e _PyImport_FindSharedFuncptr + 302 13 Python 0x10b56f836 _PyImport_LoadDynamicModuleWithSpec + 598 14 Python 0x10b56f209 _imp_create_dynamic + 329 15 Python 0x10b48f556 _PyMethodDef_RawFastCallDict + 246 16 Python 0x10b48f231 PyCFunction_Call + 209 17 Python 0x10b54c46f _PyEval_EvalFrameDefault + 26351 18 Python 0x10b54fb63 _PyEval_EvalCodeWithName + 2467 19 Python 0x10b48ef31 _PyFunction_FastCallKeywords + 257 20 Python 0x10b54f012 call_function + 738 21 Python 0x10b54bfdd _PyEval_EvalFrameDefault + 25181 22 Python 0x10b48f3a0 function_code_fastcall + 128 23 Python 0x10b54f012 call_function + 738 24 Python 0x10b54bfc3 _PyEval_EvalFrameDefault + 25155 25 Python 0x10b48f3a0 function_code_fastcall + 128 26 Python 0x10b54f012 call_function + 738 27 Python 0x10b54c07e _PyEval_EvalFrameDefault + 25342 28 Python 0x10b48f3a0 function_code_fastcall + 128 29 Python 0x10b54f012 call_function + 738 30 Python 0x10b54c07e _PyEval_EvalFrameDefault + 25342 31 Python 0x10b48f3a0 function_code_fastcall + 128 32 Python 0x10b54f012 call_function + 738 33 Python 0x10b54c07e _PyEval_EvalFrameDefault + 25342 34 Python 0x10b48f3a0 function_code_fastcall + 128 35 Python 0x10b48e994 _PyFunction_FastCallDict + 148 36 Python 0x10b490abc object_vacall + 316 37 Python 0x10b490bb1 _PyObject_CallMethodIdObjArgs + 177 38 Python 0x10b56e18f PyImport_ImportModuleLevelObject + 1535 39 Python 0x10b54a955 _PyEval_EvalFrameDefault + 19413 40 Python 0x10b54fb63 _PyEval_EvalCodeWithName + 2467 41 Python 0x10b545ca4 PyEval_EvalCode + 100 42 Python 0x10b5833b1 PyRun_FileExFlags + 209 43 Python 0x10b582c2a PyRun_SimpleFileExFlags + 890 44 Python 0x10b5a20c3 pymain_main + 6915 45 Python 0x10b5a262a _Py_UnixMain + 58 46 dyld 0x202c174fe start + 462 47 dyld 0x202c12000 ???
Thread 1:: com.apple.rosetta.exceptionserver 0 runtime 0x7ff7ffcc28e4 0x7ff7ffcbe000 + 18660 1 runtime 0x7ff7ffccf928 0x7ff7ffcbe000 + 71976 2 runtime 0x7ff7ffcd10a4 0x7ff7ffcbe000 + 77988
Thread 0 crashed with X86 Thread State (64-bit): rax: 0x92bceaccc2d10004 rbx: 0x00000003067e4c50 rcx: 0x00000003067e75f0 rdx: 0x00000003067e7500 rdi: 0x0000000000000002 rsi: 0x00000003067e74e8 rbp: 0x00000003067e4c40 rsp: 0x00000003067e4c10 r8: 0x00007ff8450194f0 r9: 0x0000000000000000 r10: 0x000000010cedf000 r11: 0x0000000202c4d07e r12: 0x00000003067e5130 r13: 0x000000010cedf3d0 r14: 0x000000010cf7fd40 r15: 0x000000010b04e060 rip: 0x000000010cf7fd57 rfl: 0x0000000000000202 tmp0: 0x000000010cf7fd57 tmp1: 0x4529f8c5c057f8c5 tmp2: 0x000000e045c748d0
Binary Images: 0x10cedf000 - 0x10db6afff lite.so () <6361e257-f3e0-3718-a7dd-2fd475634e96> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/paddlelite/lite.so 0x202c12000 - 0x202c7dfff dyld () <1a6ae033-9438-33c0-8077-988fd885250a> /usr/lib/dyld 0x10b46d000 - 0x10b648fff org.python.python (3.7.9, (c) 2001-2019 Python Software Foundation.) <98c0575f-9521-3790-9428-8a6a0bfa8161> /Library/Frameworks/Python.framework/Versions/3.7/Python 0x7ff7ffcbe000 - 0x7ff7ffcedfff runtime (*) <9f5d65be-d8d0-3979-bb05-e651a67e785c> /usr/libexec/rosetta/runtime
External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 5 thread_create: 0 thread_set_state: 0
VM Region Summary: ReadOnly portion of Libraries: Total=351.4M resident=0K(0%) swapped_out_or_unallocated=351.4M(100%) Writable regions: Total=821.4M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=821.4M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Kernel Alloc Once 8K 1 MALLOC 154.1M 14 MALLOC guard page 96K 4 MALLOC_MEDIUM (reserved) 120.0M 1 reserved VM address space (unallocated) MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated) Rosetta Arena 4096K 2 Rosetta Generic 752K 185 Rosetta IndirectBranch 96K 2 Rosetta JIT 128.0M 1 Rosetta Return Stack 20K 2 Rosetta Thread Context 20K 2 Stack 16.0M 1 Stack Guard 16K 1 VM_ALLOCATE 10.9M 7 VM_ALLOCATE (reserved) 92K 1 reserved VM address space (unallocated) __DATA 953K 52 __DATA_CONST 3383K 39 __DATA_DIRTY 79K 24 __LINKEDIT 324.2M 12 __OBJC_RO 81.6M 1 __OBJC_RW 3120K 2 __TEXT 27.3M 53 __UNICODE 588K 1 dyld private memory 1104K 3 mapped file 5.5G 113 shared memory 16K 1 unshared pmap 2128K 2 =========== ======= ======= TOTAL 6.8G 528 TOTAL, minus reserved VM space 6.3G 528
Full Report
{"app_name":"Python","timestamp":"2022-03-02 20:51:34.00 +0800","app_version":"3.7.9","slice_uuid":"4b030ec4-815e-34b7-90e7-d0720c31e072","build_version":"3.7.9","platform":1,"bundleID":"org.python.python","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.0.1 (21A559)","incident_id":"691CF432-285B-4661-85C7-F6551C1A50A1","name":"Python"} { "uptime" : 370000, "procLaunch" : "2022-03-02 20:51:34.2765 +0800", "procRole" : "Unspecified", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "MacBookPro17,1", "procStartAbsTime" : 9066038314390, "coalitionID" : 1268, "osVersion" : { "train" : "macOS 12.0.1", "build" : "21A559", "releaseType" : "User" }, "captureTime" : "2022-03-02 20:51:34.3599 +0800", "incident" : "691CF432-285B-4661-85C7-F6551C1A50A1", "bug_type" : "309", "pid" : 35151, "procExitAbsTime" : 9066040303573, "translated" : true, "cpuType" : "X86-64", "procName" : "Python", "procPath" : "/Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python", "bundleInfo" : {"CFBundleShortVersionString":"3.7.9","CFBundleVersion":"3.7.9","CFBundleIdentifier":"org.python.python"}, "storeInfo" : {"deviceIdentifierForVendor":"CDF822DC-64C6-59BA-A2D6-CA82CDFB23EF","thirdParty":true}, "parentProc" : "zsh", "parentPid" : 34328, "coalitionName" : "com.apple.Terminal", "crashReporterKey" : "27CF5C4C-E38B-6CDB-BBC1-64E1D6A1B558", "responsiblePid" : 2148, "responsibleProc" : "Terminal", "wakeTime" : 18224, "sleepWakeUUID" : "ADF569CD-3986-4E40-811A-F409058F4B33", "sip" : "enabled", "isCorpse" : 1, "exception" : {"codes":"0x0000000000000001, 0x0000000000000000","rawCodes":[1,0],"type":"EXC_BAD_INSTRUCTION","signal":"SIGILL"}, "termination" : {"flags":0,"code":4,"namespace":"SIGNAL","indicator":"Illegal instruction: 4","byProc":"exc handler","byPid":35151}, "ktriageinfo" : "VM - pmap_enter failed with resource shortage\nVM - pmap_enter failed with resource shortage\n", "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":5},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0}, "faultingThread" : 0, "threads" : [{"triggered":true,"id":60257007,"threadState":{"r13":{"value":4511888336},"rflags":{"value":514},"rax":{"value":10573584190321786884},"rosetta":{"tmp2":{"value":963243362512},"tmp1":{"value":4983787990881401029},"tmp0":{"value":4512546135}},"r14":{"value":4512546112,"symbolLocation":0,"symbol":"_GLOBAL__sub_I_pybind.cc"},"rsi":{"value":12993852648},"r8":{"value":140704286348528,"symbolLocation":16,"symbol":"dyld4::gDyld"},"rdx":{"value":12993852672},"r10":{"value":4511887360},"r9":{"value":0},"r15":{"value":4479836256},"rbx":{"value":12993842256},"r11":{"value":8636387454,"symbolLocation":0,"symbol":"invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const"},"rip":{"value":4512546135},"rbp":{"value":12993842240},"rsp":{"value":12993842192},"r12":{"value":12993843504},"rcx":{"value":12993852912},"flavor":"x86_THREAD_STATE","rdi":{"value":2}},"queue":"com.apple.main-thread","frames":[{"imageOffset":658775,"symbol":"_GLOBAL__sub_I_pybind.cc","symbolLocation":23,"imageIndex":0},{"imageOffset":84809,"symbol":"invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const","symbolLocation":182,"imageIndex":1},{"imageOffset":241919,"symbol":"invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const","symbolLocation":129,"imageIndex":1},{"imageOffset":206995,"symbol":"invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const","symbolLocation":566,"imageIndex":1},{"imageOffset":7569,"symbol":"dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const","symbolLocation":129,"imageIndex":1},{"imageOffset":206363,"symbol":"dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const","symbolLocation":179,"imageIndex":1},{"imageOffset":240432,"symbol":"dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const","symbolLocation":118,"imageIndex":1},{"imageOffset":241058,"symbol":"dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const","symbolLocation":386,"imageIndex":1},{"imageOffset":84604,"symbol":"dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const","symbolLocation":144,"imageIndex":1},{"imageOffset":85000,"symbol":"dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const","symbolLocation":178,"imageIndex":1},{"imageOffset":85164,"symbol":"dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const","symbolLocation":108,"imageIndex":1},{"imageOffset":145845,"symbol":"dyld4::APIs::dlopen_from(char const*, int, void*)","symbolLocation":563,"imageIndex":1},{"imageOffset":1233038,"symbol":"_PyImport_FindSharedFuncptr","symbolLocation":302,"imageIndex":2},{"imageOffset":1058870,"symbol":"_PyImport_LoadDynamicModuleWithSpec","symbolLocation":598,"imageIndex":2},{"imageOffset":1057289,"symbol":"_imp_create_dynamic","symbolLocation":329,"imageIndex":2},{"imageOffset":140630,"symbol":"_PyMethodDef_RawFastCallDict","symbolLocation":246,"imageIndex":2},{"imageOffset":139825,"symbol":"PyCFunction_Call","symbolLocation":209,"imageIndex":2},{"imageOffset":914543,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":26351,"imageIndex":2},{"imageOffset":928611,"symbol":"_PyEval_EvalCodeWithName","symbolLocation":2467,"imageIndex":2},{"imageOffset":139057,"symbol":"_PyFunction_FastCallKeywords","symbolLocation":257,"imageIndex":2},{"imageOffset":925714,"symbol":"call_function","symbolLocation":738,"imageIndex":2},{"imageOffset":913373,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":25181,"imageIndex":2},{"imageOffset":140192,"symbol":"function_code_fastcall","symbolLocation":128,"imageIndex":2},{"imageOffset":925714,"symbol":"call_function","symbolLocation":738,"imageIndex":2},{"imageOffset":913347,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":25155,"imageIndex":2},{"imageOffset":140192,"symbol":"function_code_fastcall","symbolLocation":128,"imageIndex":2},{"imageOffset":925714,"symbol":"call_function","symbolLocation":738,"imageIndex":2},{"imageOffset":913534,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":25342,"imageIndex":2},{"imageOffset":140192,"symbol":"function_code_fastcall","symbolLocation":128,"imageIndex":2},{"imageOffset":925714,"symbol":"call_function","symbolLocation":738,"imageIndex":2},{"imageOffset":913534,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":25342,"imageIndex":2},{"imageOffset":140192,"symbol":"function_code_fastcall","symbolLocation":128,"imageIndex":2},{"imageOffset":925714,"symbol":"call_function","symbolLocation":738,"imageIndex":2},{"imageOffset":913534,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":25342,"imageIndex":2},{"imageOffset":140192,"symbol":"function_code_fastcall","symbolLocation":128,"imageIndex":2},{"imageOffset":137620,"symbol":"_PyFunction_FastCallDict","symbolLocation":148,"imageIndex":2},{"imageOffset":146108,"symbol":"object_vacall","symbolLocation":316,"imageIndex":2},{"imageOffset":146353,"symbol":"_PyObject_CallMethodIdObjArgs","symbolLocation":177,"imageIndex":2},{"imageOffset":1053071,"symbol":"PyImport_ImportModuleLevelObject","symbolLocation":1535,"imageIndex":2},{"imageOffset":907605,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":19413,"imageIndex":2},{"imageOffset":928611,"symbol":"_PyEval_EvalCodeWithName","symbolLocation":2467,"imageIndex":2},{"imageOffset":887972,"symbol":"PyEval_EvalCode","symbolLocation":100,"imageIndex":2},{"imageOffset":1139633,"symbol":"PyRun_FileExFlags","symbolLocation":209,"imageIndex":2},{"imageOffset":1137706,"symbol":"PyRun_SimpleFileExFlags","symbolLocation":890,"imageIndex":2},{"imageOffset":1265859,"symbol":"pymain_main","symbolLocation":6915,"imageIndex":2},{"imageOffset":1267242,"symbol":"_Py_UnixMain","symbolLocation":58,"imageIndex":2},{"imageOffset":21758,"symbol":"start","symbolLocation":462,"imageIndex":1},{"imageOffset":0,"imageIndex":1}]},{"id":60257008,"name":"com.apple.rosetta.exceptionserver","frames":[{"imageOffset":18660,"imageIndex":3},{"imageOffset":71976,"imageIndex":3},{"imageOffset":77988,"imageIndex":3}]}], "usedImages" : [ { "source" : "P", "arch" : "x86_64", "base" : 4511887360, "size" : 13156352, "uuid" : "6361e257-f3e0-3718-a7dd-2fd475634e96", "path" : "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/paddlelite/lite.so", "name" : "lite.so" }, { "source" : "P", "arch" : "x86_64", "base" : 8636145664, "size" : 442368, "uuid" : "1a6ae033-9438-33c0-8077-988fd885250a", "path" : "/usr/lib/dyld", "name" : "dyld" }, { "source" : "P", "arch" : "x86_64", "base" : 4484157440, "CFBundleShortVersionString" : "3.7.9, (c) 2001-2019 Python Software Foundation.", "CFBundleIdentifier" : "org.python.python", "size" : 1949696, "uuid" : "98c0575f-9521-3790-9428-8a6a0bfa8161", "path" : "/Library/Frameworks/Python.framework/Versions/3.7/Python", "name" : "Python", "CFBundleVersion" : "3.7.9" }, { "source" : "P", "arch" : "arm64", "base" : 140703125200896, "size" : 196608, "uuid" : "9f5d65be-d8d0-3979-bb05-e651a67e785c", "path" : "/usr/libexec/rosetta/runtime", "name" : "runtime" } ], "sharedCache" : { "base" : 140703184355328, "size" : 15215640576, "uuid" : "b5084610-afe4-3485-bade-628c4468b057" }, "vmSummary" : "ReadOnly portion of Libraries: Total=351.4M resident=0K(0%) swapped_out_or_unallocated=351.4M(100%)\nWritable regions: Total=821.4M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=821.4M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nKernel Alloc Once 8K 1 \nMALLOC 154.1M 14 \nMALLOC guard page 96K 4 \nMALLOC_MEDIUM (reserved) 120.0M 1 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nRosetta Arena 4096K 2 \nRosetta Generic 752K 185 \nRosetta IndirectBranch 96K 2 \nRosetta JIT 128.0M 1 \nRosetta Return Stack 20K 2 \nRosetta Thread Context 20K 2 \nStack 16.0M 1 \nStack Guard 16K 1 \nVM_ALLOCATE 10.9M 7 \nVM_ALLOCATE (reserved) 92K 1 reserved VM address space (unallocated)\n__DATA 953K 52 \n__DATA_CONST 3383K 39 \n__DATA_DIRTY 79K 24 \n__LINKEDIT 324.2M 12 \n__OBJC_RO 81.6M 1 \n__OBJC_RW 3120K 2 \n__TEXT 27.3M 53 \n__UNICODE 588K 1 \ndyld private memory 1104K 3 \nmapped file 5.5G 113 \nshared memory 16K 1 \nunshared pmap 2128K 2 \n=========== ======= ======= \nTOTAL 6.8G 528 \nTOTAL, minus reserved VM space 6.3G 528 \n", "legacyInfo" : { "threadTriggered" : { "queue" : "com.apple.main-thread" } }, "trialInfo" : { "rollouts" : [ { "rolloutId" : "60da5e84ab0ca017dace9abf", "factorPackIds" : {
},
"deploymentId" : 240000008
},
{
"rolloutId" : "607844aa04477260f58a8077",
"factorPackIds" : {
"SIRI_MORPHUN_ASSETS" : "6103050cbfe6dc472e1c982a"
},
"deploymentId" : 240000066
},
{
"rolloutId" : "602ad4dac86151000cf27e46",
"factorPackIds" : {
"SIRI_DICTATION_ASSETS" : "61ae8d06da72d16a4beb762e"
},
"deploymentId" : 240000305
},
{
"rolloutId" : "601d9415f79519000ccd4b69",
"factorPackIds" : {
"SIRI_TEXT_TO_SPEECH" : "61ef3bd729647d394933a0a6"
},
"deploymentId" : 240000389
},
{
"rolloutId" : "5ffde50ce2aacd000d47a95f",
"factorPackIds" : {
},
"deploymentId" : 240000111
},
{
"rolloutId" : "5fc94383418129005b4e9ae0",
"factorPackIds" : {
},
"deploymentId" : 240000252
}
], "experiments" : [
] } }
Model: MacBookPro17,1, BootROM 7429.41.5, proc 8:4:4 processors, 16 GB, SMC Graphics: Apple M1, Apple M1, Built-In Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online Display: PHL 256P1, 2560 x 1440 (QHD/WQHD - Wide Quad High Definition), MirrorOff, Online Memory Module: LPDDR4 AirPort: Wi-Fi, wl0: Sep 13 2021 21:06:59 version 18.20.310.14.7.8.119 FWID 01-9d72ee4a Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: USB31Bus Thunderbolt Bus: MacBook Pro, Apple Inc. Thunderbolt Bus: MacBook Pro, Apple Inc.
@weishengying Hi, 当我使用你提供的opt_mac时,报错日志如下:
yangjun@yangjun ocr % file ../../Paddle-Lite/opt_mac ../../Paddle-Lite/opt_mac: Mach-O 64-bit executable x86_64 yangjun@yangjun ocr % ../../Paddle-Lite/opt_mac zsh: illegal hardware instruction ../../Paddle-Lite/opt_mac
然后我这边的编译器信息如下: Apple clang version 13.0.0 (clang-1300.0.29.3) Target: arm64-apple-darwin21.1.0
你好,我这边也遇到了和你相同的问题,请问你解决了吗?
@weishengying Hi, 当我使用你提供的opt_mac时,报错日志如下:
yangjun@yangjun ocr % file ../../Paddle-Lite/opt_mac ../../Paddle-Lite/opt_mac: Mach-O 64-bit executable x86_64 yangjun@yangjun ocr % ../../Paddle-Lite/opt_mac zsh: illegal hardware instruction ../../Paddle-Lite/opt_mac
然后我这边的编译器信息如下: Apple clang version 13.0.0 (clang-1300.0.29.3) Target: arm64-apple-darwin21.1.0
你好,我这边也遇到了和你相同的问题,请问你解决了吗?
用最新的2.11貌似没有问题了,然后github 2.11 release 的资源里面有m1的opt工具