quic/ai-hub-models

[BUG] Fail to run llama v2 7B quantized on Galaxy S24 Ultra using GENIE C API

taeyeonlee opened this issue · 4 comments

Hi,
Android NDK Application (using GENIE C API) fails to run llama v2 7B quantized on Galaxy S24 Ultra.
It succeeds to create the dialog config. (GenieDialogConfig_createFromJson).
But, it fails to create the dialog. (GenieDialog_create).
The error msg is following.
How can fix it ?

Failed to create the dialog.   status = -1  (#define GENIE_STATUS_ERROR_GENERAL          -1)
2024-10-07 21:09:34.399 19864-19889 libc++abi               com.test.llama                        E  terminating with uncaught exception of type std::runtime_error: Failed to create the dialog.
2024-10-07 21:09:34.399 19864-19889 libc                    com.test.llama                        A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 19889 (Thread-3), pid 19864 (com.test.llama)

Log

2024-10-07 21:09:34.054 19864-19864 OpenGLRenderer          com.test.llama                        D  HWUI - treat SMPTE_170M as sRGB
2024-10-07 21:09:34.055 19864-19885 AdrenoGLES-0            com.test.llama                        I  QUALCOMM build                   : 11e73fe00c, I4ff0bacd4f
                                                                                                    Build Date                       : 03/11/24
                                                                                                    OpenGL ES Shader Compiler Version: E031.45.02.06
                                                                                                    Local Branch                     : 
                                                                                                    Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.VENDOR.14.3.0.11.00.00.973.498
                                                                                                    Remote Branch                    : NONE
                                                                                                    Reconstruct Branch               : NOTHING
2024-10-07 21:09:34.055 19864-19885 AdrenoGLES-0            com.test.llama                        I  Build Config                     : S P 16.1.2 AArch64
2024-10-07 21:09:34.055 19864-19885 AdrenoGLES-0            com.test.llama                        I  Driver Path                      : /vendor/lib64/egl/libGLESv2_adreno.so
2024-10-07 21:09:34.055 19864-19885 AdrenoGLES-0            com.test.llama                        I  Driver Version                   : 0762.12
2024-10-07 21:09:34.055 19864-19885 AdrenoGLES-0            com.test.llama                        I  Process Name                     : com.test.llama
2024-10-07 21:09:34.057 19864-19885 AdrenoGLES-0            com.test.llama                        I  PFP: 0x01520171, ME: 0x01520023
2024-10-07 21:09:34.060 19864-19864 nativeloader            com.test.llama                        D  Load /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64/libGenie.so using ns clns-4 from class loader (caller=/data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/base.apk!classes3.dex): ok
2024-10-07 21:09:34.060 19864-19885 Adreno-AppProfiles      com.test.llama                        E  QSPM AIDL service doesn't exist
2024-10-07 21:09:34.062 19864-19885 AdrenoUtils             com.test.llama                        I  <ReadGpuID:357>: Reading chip ID through GSL
2024-10-07 21:09:34.067 19864-19864 AppCompatDelegate       com.test.llama                        D  Checking for metadata for AppLocalesMetadataHolderService : Service not found
2024-10-07 21:09:34.091 19864-19864 DecorView               com.test.llama                        I  setWindowBackground: isPopOver=false color=ffffffff d=android.graphics.drawable.ColorDrawable@1e6addb
2024-10-07 21:09:34.106 19864-19864 com.test.llama           com.test.llama                        W  Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
2024-10-07 21:09:34.106 19864-19864 com.test.llama           com.test.llama                        W  Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
2024-10-07 21:09:34.108 19864-19864 Compatibil...geReporter com.test.llama                        D  Compat change id reported: 210923482; UID 10358; state: DISABLED
2024-10-07 21:09:34.108 19864-19864 Compatibil...geReporter com.test.llama                        D  Compat change id reported: 37756858; UID 10358; state: ENABLED
2024-10-07 21:09:34.122 19864-19864 InputMethodManager      com.test.llama                        I  invalidateInput
2024-10-07 21:09:34.122 19864-19864 InputMethodManager      com.test.llama                        I  invalidateInput
2024-10-07 21:09:34.123 19864-19864 InputMethodManager      com.test.llama                        I  invalidateInput
2024-10-07 21:09:34.146 19864-19864 Compatibil...geReporter com.test.llama                        D  Compat change id reported: 147798919; UID 10358; state: DISABLED
2024-10-07 21:09:34.148 19864-19864 Toast                   com.test.llama                        I  show: caller = com.test.llama.MainActivity.HandlePermission:330 
2024-10-07 21:09:34.149 19864-19864 Toast                   com.test.llama                        I  show: isDexDualMode = false
2024-10-07 21:09:34.149 19864-19864 Toast                   com.test.llama                        I  show: contextDispId = 0 mCustomDisplayId = -1 focusedDisplayId = 0 isActivityContext = true
2024-10-07 21:09:34.151 19864-19864 LlamaNativeApp          com.test.llama                        I  [OnCreate] mFileDir : /data/user/0/com.test.llama/files, mAppTmpDir : /data/user/0/com.test.llama/files
2024-10-07 21:09:34.152 19864-19889 LlamaNativeApp          com.test.llama                        I  nativeLibraryDir : /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64
2024-10-07 21:09:34.319 19864-19889 nativeloader            com.test.llama                        D  Load /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64/libllama_nativeapp.so using ns clns-4 from class loader (caller=/data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/base.apk!classes3.dex): ok
2024-10-07 21:09:34.319 19864-19889 LlamaNative             com.test.llama                        I  [taeyeon] Using libGenie.so version 1, Genie_getApiMinorVersion: 1, Genie_getApiPatchVersion: 0
2024-10-07 21:09:34.319 19864-19889 LlamaNative             com.test.llama                        I  native lib path : /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64, app Tmp path : /data/user/0/com.test.llama/files/, ProptTextInput : Could you tell me about Qualcomm ?, step : 8, seed : 0, guidanceScale : 7.500000
2024-10-07 21:09:34.319 19864-19889 LlamaNative             com.test.llama                        I  set ADSP_LIBRARY_PATH = /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64;/data/local/tmp/genie_qnnv226024
2024-10-07 21:09:34.319 19864-19889 LlamaNative             com.test.llama                        I  set LD_LIBRARY_PATH = /data/local/tmp/genie_qnnv226024
2024-10-07 21:09:34.320 19864-19889 LlamaNative             com.test.llama                        I  [taeyeon] Genie succeed to create the dialog config.
2024-10-07 21:09:34.320 19864-19889 LlamaNative             com.test.llama                        I  [taeyeon] Genie try to create the dialog.
2024-10-07 21:09:34.321 19864-19864 LlamaNativeApp          com.test.llama                        I  onResume start
2024-10-07 21:09:34.324 19864-19864 Compatibil...geReporter com.test.llama                        D  Compat change id reported: 237531167; UID 10358; state: DISABLED
2024-10-07 21:09:34.326 19864-19885 NativeCust...ncyManager com.test.llama                        D  [NativeCFMS] BpCustomFrequencyManager::BpCustomFrequencyManager()
2024-10-07 21:09:34.331 19864-19864 InsetsController        com.test.llama                        I  onStateChanged: host=com.test.llama/com.test.llama.MainActivity, from=android.view.ViewRootImpl.setView:1797, state=InsetsState: {mDisplayFrame=Rect(0, 0 - 1080, 2340), mDisplayCutout=DisplayCutout{insets=Rect(0, 76 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(515, 0 - 565, 76), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=1080 displayHeight=2340 physicalDisplayWidth=1080 physicalDisplayHeight=2340 density={2.8125} cutoutSpec={M 0,0 H -8.933333333333333 V 26.93333333333333 H 8.933333333333333 V 0 H 0 Z @dp} rotation={0} scale={1.0} physicalPixelDisplaySizeRatio={1.0}}}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=5, center=Point(5, 5)}, RoundedCorner{position=TopRight, radius=5, center=Point(1075, 5)}, RoundedCorner{position=BottomRight, radius=5, center=Point(1075, 2335)}, RoundedCorner{position=BottomLeft, radius=5, center=Point(5, 2335)}]}  mRoundedCornerFrame=Rect(0, 0 - 1080, 2340), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(956, 0 - 1080, 77) rotation=0}, mDisplayShape=DisplayShape{ spec=-1951251426 displayWidth=1440 displayHeight=3120 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}, mSources= { InsetsSource: {f7b00001 mType=navigationBars mFrame=[0,2205][1080,2340] mVisible=false mFlags=[]}, InsetsSource: {f7b00004 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {f7b00005 mType=mandatorySystemGestures mFrame=[0,2205][1080,2340] mVisible=true mFlags=[]}, InsetsSource: {f7b00006 mType=tappableElement mFrame=[0,2205][1080,2340] mVisible=true mFlags=[]}, InsetsSource: {f7b00024 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {3 mType=ime mFrame=[0,0][0,0] mVisible=false mFlags=[]}, InsetsSource: {27 mType=displayCutout mFrame=[0,0][1080,76] mVisible=true mFlags=[]}, InsetsSource: {34110000 mType=statusBars mFrame=[0,0][1080,77] mVisible=true mFlags=[]}, InsetsSource: {34110005 mType=mandatorySystemGestures mFrame=[0,0][1080,110] mVisible=true mFlags=[]}, InsetsSource: {34110006 mType=tappableElement mFrame=[0,0][1080,77] mVisible=true mFlags=[]} }
2024-10-07 21:09:34.332 19864-19864 ViewRootIm...nActivity] com.test.llama                        I  synced displayState. AttachInfo displayState=1
2024-10-07 21:09:34.332 19864-19864 ViewRootIm...nActivity] com.test.llama                        I  setView = com.android.internal.policy.DecorView@3a41752 TM=true
2024-10-07 21:09:34.332 19864-19864 IDS_TAG                 com.test.llama                        I  Clearing training data of android.app.Application@7651a23
2024-10-07 21:09:34.333 19864-19864 IDS_TAG                 com.test.llama                        I  Starting IDS observe window
2024-10-07 21:09:34.333 19864-19864 IDS_TAG                 com.test.llama                        I  Getting Shared Preference for android.app.Application@7651a23 uid = 10358
2024-10-07 21:09:34.334 19864-19864 IDS_TAG                 com.test.llama                        I  App android.app.Application@7651a23 has not finished training
2024-10-07 21:09:34.336 19864-19864 IDS_TAG                 com.test.llama                        I  Closing IDS observe window
2024-10-07 21:09:34.336 19864-19864 IDS_TAG                 com.test.llama                        I  Getting Shared Preference for android.app.Application@7651a23 uid = 10358
2024-10-07 21:09:34.337 19864-19864 IDS_TAG                 com.test.llama                        I  IDS count updated to 1 for android.app.Application@7651a23
2024-10-07 21:09:34.340 19864-19864 AnimatorSet             com.test.llama                        D  mReversing is false. Don't call initChildren.
2024-10-07 21:09:34.363 19864-19864 com.test.llama           com.test.llama                        E  Unable to open libpenguin.so: dlopen failed: library "libpenguin.so" not found.
2024-10-07 21:09:34.363 19864-19864 BufferQueueProducer     com.test.llama                        I  [](id:4d9800000000,api:0,p:2069262813,c:19864) setDequeueTimeout:2077252342
2024-10-07 21:09:34.363 19864-19864 BLASTBufferQueue_Java   com.test.llama                        I  new BLASTBufferQueue, mName= ViewRootImpl@25574c6[MainActivity] mNativeObject= 0x6d6b4f9dd0 sc.mNativeObject= 0x6fab4a3ed0 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3085 android.view.ViewRootImpl.relayoutWindow:10224 android.view.ViewRootImpl.performTraversals:4167 android.view.ViewRootImpl.doTraversal:3345 android.view.ViewRootImpl$TraversalRunnable.run:11437 android.view.Choreographer$CallbackRecord.run:1690 android.view.Choreographer$CallbackRecord.run:1699 android.view.Choreographer.doCallbacks:1154 android.view.Choreographer.doFrame:1080 android.view.Choreographer$FrameDisplayEventReceiver.run:1647 
2024-10-07 21:09:34.363 19864-19864 BLASTBufferQueue_Java   com.test.llama                        I  update, w= 1080 h= 2340 mName = ViewRootImpl@25574c6[MainActivity] mNativeObject= 0x6d6b4f9dd0 sc.mNativeObject= 0x6fab4a3ed0 format= -1 caller= android.graphics.BLASTBufferQueue.<init>:89 android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3085 android.view.ViewRootImpl.relayoutWindow:10224 android.view.ViewRootImpl.performTraversals:4167 android.view.ViewRootImpl.doTraversal:3345 android.view.ViewRootImpl$TraversalRunnable.run:11437 
2024-10-07 21:09:34.367 19864-19864 ViewRootIm...nActivity] com.test.llama                        I  Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) relayoutAsync=false req=(1080,2340)0 dur=7 res=0x403 s={true 0x6f2b4bd320} ch=true seqId=0
2024-10-07 21:09:34.368 19864-19864 ViewRootIm...nActivity] com.test.llama                        D  mThreadedRenderer.initialize() mSurface={isValid=true 0x6f2b4bd320} hwInitialized=true
2024-10-07 21:09:34.370 19864-19864 ViewRootIm...nActivity] com.test.llama                        D  reportNextDraw android.view.ViewRootImpl.performTraversals:4781 android.view.ViewRootImpl.doTraversal:3345 android.view.ViewRootImpl$TraversalRunnable.run:11437 android.view.Choreographer$CallbackRecord.run:1690 android.view.Choreographer$CallbackRecord.run:1699 
2024-10-07 21:09:34.370 19864-19864 ViewRootIm...nActivity] com.test.llama                        I  Setup new sync=wmsSync-ViewRootImpl@25574c6[MainActivity]#0
2024-10-07 21:09:34.371 19864-19864 ViewRootIm...nActivity] com.test.llama                        I  Creating new active sync group ViewRootImpl@25574c6[MainActivity]#1
2024-10-07 21:09:34.371 19864-19864 SurfaceSyncGroup        com.test.llama                        I  addLocalSync=ViewRootImpl@25574c6[MainActivity]#1 to name=wmsSync-ViewRootImpl@25574c6[MainActivity]#0, callers=android.window.SurfaceSyncGroup.add:431 android.window.SurfaceSyncGroup.add:392 android.window.SurfaceSyncGroup.add:340 android.view.ViewRootImpl.createSyncIfNeeded:4912 android.view.ViewRootImpl.performTraversals:4796 android.view.ViewRootImpl.doTraversal:3345 
2024-10-07 21:09:34.373 19864-19864 ViewRootIm...nActivity] com.test.llama                        I  registerCallbacksForSync syncBuffer=false
2024-10-07 21:09:34.379 19864-19892 ViewRootIm...nActivity] com.test.llama                        I  Received frameDrawingCallback syncResult=0 frameNum=1.
2024-10-07 21:09:34.379 19864-19892 ViewRootIm...nActivity] com.test.llama                        I  mWNT: t=0x6e2b4b8110 mBlastBufferQueue=0x6d6b4f9dd0 fn= 1 mRenderHdrSdrRatio=1.0 caller= android.view.ViewRootImpl$8.onFrameDraw:13946 android.view.ThreadedRenderer$1.onFrameDraw:792 <bottom of call stack> 
2024-10-07 21:09:34.379 19864-19892 ViewRootIm...nActivity] com.test.llama                        I  Setting up sync and frameCommitCallback
2024-10-07 21:09:34.386 19864-19885 BLASTBufferQueue        com.test.llama                        I  [ViewRootImpl@25574c6[MainActivity]#0](f:0,a:0,s:0) onFrameAvailable the first frame is available
2024-10-07 21:09:34.387 19864-19885 ViewRootIm...nActivity] com.test.llama                        I  Received frameCommittedCallback lastAttemptedDrawFrameNum=1 didProduceBuffer=true
2024-10-07 21:09:34.387 19864-19885 SurfaceSyncGroup        com.test.llama                        I  onTransactionReady mName=wmsSync-ViewRootImpl@25574c6[MainActivity]#0 callback=159281291
2024-10-07 21:09:34.388 19864-19885 OpenGLRenderer          com.test.llama                        D  CFMS:: SetUp Pid : 19864    Tid : 19885
2024-10-07 21:09:34.388 19864-19864 ViewRootIm...nActivity] com.test.llama                        I  reportDrawFinished seqId=0
2024-10-07 21:09:34.390 19864-19885 OpenGLRenderer          com.test.llama                        D  CacheManager::trimMemory(20)
2024-10-07 21:09:34.391 19864-19864 Toast                   com.test.llama                        V  HANDLE SHOW: android.widget.Toast$TN@dd8014 mView=null mNextView=java.lang.ref.WeakReference@ecdd0bd
2024-10-07 21:09:34.393 19864-19864 ToastPresenter          com.test.llama                        V  yOffset = 180
2024-10-07 21:09:34.394 19864-19864 ToastPresenter          com.test.llama                        V  Text: Qerm in android.widget.ToastPresenter@269a6b2
2024-10-07 21:09:34.394 19864-19864 WindowManager           com.test.llama                        I  WindowManagerGlobal#addView, ty=2005, view=android.widget.LinearLayout{7726603 V.E...... ......I. 0,0-0,0}, caller=android.view.WindowManagerImpl.addView:150 android.widget.ToastPresenter.addToastView:414 android.widget.ToastPresenter.show:335 
2024-10-07 21:09:34.396 19864-19885 NativeCust...ncyManager com.test.llama                        D  [NativeCFMS] BpCustomFrequencyManager::BpCustomFrequencyManager()
2024-10-07 21:09:34.398 19864-19889 LlamaNative             com.test.llama                        I  [taeyeon] Genie Failed to create the dialog.   status = -1
2024-10-07 21:09:34.399 19864-19889 libc++abi               com.test.llama                        E  terminating with uncaught exception of type std::runtime_error: Failed to create the dialog.
2024-10-07 21:09:34.399 19864-19889 libc                    com.test.llama                        A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 19889 (Thread-3), pid 19864 (com.test.llama)
2024-10-07 21:09:34.401 19864-19864 InsetsController        com.test.llama                        I  onStateChanged: host=Toast, from=android.view.ViewRootImpl.setView:1797, state=InsetsState: {mDisplayFrame=Rect(0, 0 - 1080, 2340), mDisplayCutout=DisplayCutout{insets=Rect(0, 76 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(515, 0 - 565, 76), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=1080 displayHeight=2340 physicalDisplayWidth=1080 physicalDisplayHeight=2340 density={2.8125} cutoutSpec={M 0,0 H -8.933333333333333 V 26.93333333333333 H 8.933333333333333 V 0 H 0 Z @dp} rotation={0} scale={1.0} physicalPixelDisplaySizeRatio={1.0}}}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=5, center=Point(5, 5)}, RoundedCorner{position=TopRight, radius=5, center=Point(1075, 5)}, RoundedCorner{position=BottomRight, radius=5, center=Point(1075, 2335)}, RoundedCorner{position=BottomLeft, radius=5, center=Point(5, 2335)}]}  mRoundedCornerFrame=Rect(0, 0 - 0, 0), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(956, 0 - 1080, 77) rotation=0}, mDisplayShape=DisplayShape{ spec=-1951251426 displayWidth=1440 displayHeight=3120 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}, mSources= { InsetsSource: {f7b00001 mType=navigationBars mFrame=[0,2205][1080,2340] mVisible=false mFlags=[]}, InsetsSource: {f7b00004 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {f7b00005 mType=mandatorySystemGestures mFrame=[0,2205][1080,2340] mVisible=true mFlags=[]}, InsetsSource: {f7b00006 mType=tappableElement mFrame=[0,2205][1080,2340] mVisible=true mFlags=[]}, InsetsSource: {f7b00024 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {3 mType=ime mFrame=[0,0][0,0] mVisible=false mFlags=[]}, InsetsSource: {27 mType=displayCutout mFrame=[0,0][1080,76] mVisible=true mFlags=[]}, InsetsSource: {34110000 mType=statusBars mFrame=[0,0][1080,77] mVisible=true mFlags=[]}, InsetsSource: {34110005 mType=mandatorySystemGestures mFrame=[0,0][1080,110] mVisible=true mFlags=[]}, InsetsSource: {34110006 mType=tappableElement mFrame=[0,0][1080,77] mVisible=true mFlags=[]} }
2024-10-07 21:09:34.416 19864-19864 ViewRootIm...980[Toast] com.test.llama                        I  synced displayState. AttachInfo displayState=1
2024-10-07 21:09:34.416 19864-19864 ViewRootIm...980[Toast] com.test.llama                        I  setView = android.widget.LinearLayout@7726603 TM=true
2024-10-07 21:09:34.417 19864-19885 OpenGLRenderer          com.test.llama                        D  HWUI - treat SMPTE_170M as sRGB
2024-10-07 21:09:34.423 19864-19864 BufferQueueProducer     com.test.llama                        I  [](id:4d9800000001,api:0,p:0,c:19864) setDequeueTimeout:2077252342
2024-10-07 21:09:34.423 19864-19864 BLASTBufferQueue_Java   com.test.llama                        I  new BLASTBufferQueue, mName= ViewRootImpl@1c8980[Toast] mNativeObject= 0x6d6b4cc5b0 sc.mNativeObject= 0x6fab4a5f10 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3085 android.view.ViewRootImpl.relayoutWindow:10224 android.view.ViewRootImpl.performTraversals:4167 android.view.ViewRootImpl.doTraversal:3345 android.view.ViewRootImpl$TraversalRunnable.run:11437 android.view.Choreographer$CallbackRecord.run:1690 android.view.Choreographer$CallbackRecord.run:1699 android.view.Choreographer.doCallbacks:1154 android.view.Choreographer.doFrame:1080 android.view.Choreographer$FrameDisplayEventReceiver.run:1647 
2024-10-07 21:09:34.424 19864-19864 BLASTBufferQueue_Java   com.test.llama                        I  update, w= 704 h= 111 mName = ViewRootImpl@1c8980[Toast] mNativeObject= 0x6d6b4cc5b0 sc.mNativeObject= 0x6fab4a5f10 format= -3 caller= android.graphics.BLASTBufferQueue.<init>:89 android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3085 android.view.ViewRootImpl.relayoutWindow:10224 android.view.ViewRootImpl.performTraversals:4167 android.view.ViewRootImpl.doTraversal:3345 android.view.ViewRootImpl$TraversalRunnable.run:11437 
2024-10-07 21:09:34.424 19864-19864 ViewRootIm...980[Toast] com.test.llama                        I  Relayout returned: old=(0,77,1080,2205) new=(188,1914,892,2025) relayoutAsync=false req=(704,111)0 dur=3 res=0x3 s={true 0x6f2b4c5b60} ch=true seqId=0
2024-10-07 21:09:34.425 19864-19864 ViewRootIm...980[Toast] com.test.llama                        I  performConfigurationChange setNightDimText nightDimLevel=0
2024-10-07 21:09:34.425 19864-19864 ViewRootIm...980[Toast] com.test.llama                        D  mThreadedRenderer.initialize() mSurface={isValid=true 0x6f2b4c5b60} hwInitialized=true
2024-10-07 21:09:34.426 19864-19864 ViewRootIm...980[Toast] com.test.llama                        D  reportNextDraw android.view.ViewRootImpl.performTraversals:4781 android.view.ViewRootImpl.doTraversal:3345 android.view.ViewRootImpl$TraversalRunnable.run:11437 android.view.Choreographer$CallbackRecord.run:1690 android.view.Choreographer$CallbackRecord.run:1699 
2024-10-07 21:09:34.426 19864-19864 ViewRootIm...980[Toast] com.test.llama                        I  Setup new sync=wmsSync-ViewRootImpl@1c8980[Toast]#2
2024-10-07 21:09:34.426 19864-19864 ViewRootIm...980[Toast] com.test.llama                        I  Creating new active sync group ViewRootImpl@1c8980[Toast]#3
2024-10-07 21:09:34.426 19864-19864 SurfaceSyncGroup        com.test.llama                        I  addLocalSync=ViewRootImpl@1c8980[Toast]#3 to name=wmsSync-ViewRootImpl@1c8980[Toast]#2, callers=android.window.SurfaceSyncGroup.add:431 android.window.SurfaceSyncGroup.add:392 android.window.SurfaceSyncGroup.add:340 android.view.ViewRootImpl.createSyncIfNeeded:4912 android.view.ViewRootImpl.performTraversals:4796 android.view.ViewRootImpl.doTraversal:3345 
2024-10-07 21:09:34.427 19864-19864 ViewRootIm...980[Toast] com.test.llama                        I  registerCallbacksForSync syncBuffer=false
2024-10-07 21:09:34.428 19864-19892 ViewRootIm...980[Toast] com.test.llama                        I  Received frameDrawingCallback syncResult=0 frameNum=1.
2024-10-07 21:09:34.428 19864-19892 ViewRootIm...980[Toast] com.test.llama                        I  mWNT: t=0x6e2b4ad690 mBlastBufferQueue=0x6d6b4cc5b0 fn= 1 mRenderHdrSdrRatio=1.0 caller= android.view.ViewRootImpl$8.onFrameDraw:13946 android.view.ThreadedRenderer$1.onFrameDraw:792 <bottom of call stack> 
2024-10-07 21:09:34.428 19864-19892 ViewRootIm...980[Toast] com.test.llama                        I  Setting up sync and frameCommitCallback
2024-10-07 21:09:34.430 19864-19885 BLASTBufferQueue        com.test.llama                        I  [ViewRootImpl@1c8980[Toast]#1](f:0,a:0,s:0) onFrameAvailable the first frame is available
2024-10-07 21:09:34.431 19864-19885 ViewRootIm...980[Toast] com.test.llama                        I  Received frameCommittedCallback lastAttemptedDrawFrameNum=1 didProduceBuffer=true
2024-10-07 21:09:34.431 19864-19885 SurfaceSyncGroup        com.test.llama                        I  onTransactionReady mName=wmsSync-ViewRootImpl@1c8980[Toast]#2 callback=77814389
2024-10-07 21:09:34.431 19864-19885 OpenGLRenderer          com.test.llama                        D  CFMS:: SetUp Pid : 19864    Tid : 19885
2024-10-07 21:09:34.432 19864-19864 ViewRootIm...980[Toast] com.test.llama                        I  reportDrawFinished seqId=0
2024-10-07 21:09:34.441 19864-19864 ViewRootIm...nActivity] com.test.llama                        I  stopped(true) old = false
2024-10-07 21:09:34.441 19864-19864 ViewRootIm...nActivity] com.test.llama                        D  WindowStopped on com.test.llama/com.test.llama.MainActivity set to true
2024-10-07 21:09:34.472 19864-19885 OpenGLRenderer          com.test.llama                        D  HWUI - treat SMPTE_170M as sRGB
2024-10-07 21:09:34.476 19864-19864 ViewRootIm...nActivity] com.test.llama                        I  destroyHardwareResources: Callers=android.view.ViewRootImpl.performTraversals:3989 android.view.ViewRootImpl.doTraversal:3345 android.view.ViewRootImpl$TraversalRunnable.run:11437 android.view.Choreographer$CallbackRecord.run:1690 android.view.Choreographer$CallbackRecord.run:1699 android.view.Choreographer.doCallbacks:1154 android.view.Choreographer.doFrame:1080 android.view.Choreographer$FrameDisplayEventReceiver.run:1647 android.os.Handler.handleCallback:958 android.os.Handler.dispatchMessage:99 
2024-10-07 21:09:34.482 19864-19864 ViewRootIm...nActivity] com.test.llama                        I  Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) relayoutAsync=false req=(1080,2340)4 dur=4 res=0x402 s={false 0x0} ch=false seqId=0
2024-10-07 21:09:34.483  1896-3806  WindowManager           pid-1896                             E  win=Window{9bb6983 u0 com.test.llama/com.test.llama.MainActivity} destroySurfaces: appStopped=true cleanupOnResume=false win.mWindowRemovalAllowed=false win.mRemoveOnExit=false win.mViewVisibility=4 caller=com.android.server.wm.ActivityRecord.destroySurfaces:7033 com.android.server.wm.ActivityRecord.destroySurfaces:7014 com.android.server.wm.ActivityRecord.activityStopped:7747 com.android.server.wm.ActivityClientController.activityStopped:321 android.app.IActivityClientController$Stub.onTransact:702 com.android.server.wm.ActivityClientController.onTransact:186 android.os.Binder.execTransactInternal:1380 
2024-10-07 21:09:34.484 19864-19864 ViewRootIm...nActivity] com.test.llama                        I  handleAppVisibility mAppVisible = true visible = false
2024-10-07 21:09:34.566 19864-19868 com.test.llama           com.test.llama                        I  Compiler allocated 6943KB to compile void android.view.ViewRootImpl.performTraversals()
2024-10-07 21:09:34.585 19912-19912 DEBUG                   pid-19912                            A  Cmdline: com.test.llama
2024-10-07 21:09:34.585 19912-19912 DEBUG                   pid-19912                            A  pid: 19864, tid: 19889, name: Thread-3  >>> com.test.llama <<<
2024-10-07 21:09:34.585 19912-19912 DEBUG                   pid-19912                            A        #01 pc 000000000018f5cc  /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64/libllama_nativeapp.so (BuildId: de940e84cf45c7afdf0a048f838cac8532dd3ee6)
2024-10-07 21:09:34.585 19912-19912 DEBUG                   pid-19912                            A        #02 pc 000000000017a980  /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64/libllama_nativeapp.so (BuildId: de940e84cf45c7afdf0a048f838cac8532dd3ee6)
2024-10-07 21:09:34.585 19912-19912 DEBUG                   pid-19912                            A        #03 pc 000000000018c3d4  /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64/libllama_nativeapp.so (BuildId: de940e84cf45c7afdf0a048f838cac8532dd3ee6)
2024-10-07 21:09:34.585 19912-19912 DEBUG                   pid-19912                            A        #04 pc 000000000018ba00  /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64/libllama_nativeapp.so (BuildId: de940e84cf45c7afdf0a048f838cac8532dd3ee6)
2024-10-07 21:09:34.585 19912-19912 DEBUG                   pid-19912                            A        #05 pc 000000000018b95c  /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64/libllama_nativeapp.so (__cxa_throw+112) (BuildId: de940e84cf45c7afdf0a048f838cac8532dd3ee6)
2024-10-07 21:09:34.585 19912-19912 DEBUG                   pid-19912                            A        #06 pc 0000000000127c24  /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64/libllama_nativeapp.so (llama_nativeapp::Dialog::Dialog(llama_nativeapp::Dialog::Config)+204) (BuildId: de940e84cf45c7afdf0a048f838cac8532dd3ee6)
2024-10-07 21:09:34.585 19912-19912 DEBUG                   pid-19912                            A        #07 pc 000000000012520c  /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/lib/arm64/libllama_nativeapp.so (BuildId: de940e84cf45c7afdf0a048f838cac8532dd3ee6)
2024-10-07 21:09:34.586 19912-19912 DEBUG                   pid-19912                            A        #14 pc 0000000000002c8c  /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/base.apk (com.test.llama.NativeClient$NativePeer.access$000+0)
2024-10-07 21:09:34.586 19912-19912 DEBUG                   pid-19912                            A        #20 pc 0000000000002d38  /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/base.apk (com.test.llama.NativeClient.loadAndForwardModel+0)
2024-10-07 21:09:34.586 19912-19912 DEBUG                   pid-19912                            A        #26 pc 0000000000002338  /data/app/~~0VJLKwQmvrUj9mFel2vfZw==/com.test.llama-G9w952yaXSAUcHjnVJFKQg==/base.apk (com.test.llama.MainActivity$LlamaThread.run+0)

The command "genie-t2t-run" is working well on S24 Ultra.

e3q:/data/local/tmp/genie_qnnv226024 $ export LD_LIBRARY_PATH=/data/local/tmp/genie_qnnv226024
e3q:/data/local/tmp/genie_qnnv226024 $ export PATH=$LD_LIBRARY_PATH:$PATH
son -p "<<SYS>>\nYou are a helpful AI assistant.<</SYS>>\n\n[INST] have we been to Mars? [/INST]"                                  <
Using libGenie.so version 1.0.0

[WARN]  "Unable to initialize logging in backend extensions."
[INFO]  "Allocated total size = 300255744 across 8 buffers"
[PROMPT]: <<SYS>>\nYou are a helpful AI assistant.<</SYS>>\n\n[INST] have we been to Mars? [/INST]

[BEGIN]:   As a helpful AI assistant, I can tell you that humans have not yet visited Mars.Ёnster. While there have been several robotic missions to Mars, including NASA's Curiosity Rover, which has been exploring the planet since 2012, no human has traveled to Mars yet. However, there are ongoing efforts to send humans to Mars in the future. NASA's Artemis program, for example, aims to return humans to the lunar surface by 2024 and establish a sustainable presence on the Moon. The next step would be to send humans to Mars in the 2030s. Private companies like SpaceX and Blue Origin are also working towards establishing a human presence on Mars, with SpaceX aiming to send its first crewed mission to Mars in the mid-2020s and Blue Origin hoping to send its first human mission to Mars in the 2020s as well.[END]
Prompt processing: 1510592 us
Token generation: 15999608 us, 13.0628 tokens/s
e3q:/data/local/tmp/genie_qnnv226024 $

hi pal
have you solved this issue?I have faced the same issus as you did

I think I have found the reason, need to set adsp path as well,like this, in your app jni part

if (setenv("LD_LIBRARY_PATH", "/vendor/lib64", 1 /*override*/) == 0) {
    LOGD("LD_LIBRARY_PATH setenv success\n");
}
if (setenv("ADSP_LIBRARY_PATH", "/vendor/lib64", 1 /*override*/) == 0) {
    LOGD("ADSP_LIBRARY_PATH setenv success\n");
}

===========================

Hi @Harrison-niu
The LD_LIBRARY_PATH and ADSP_LIBRARY_PATH are already set. but it failed to run.

DId you succeed to run it on S24 ?

I ran the app on QCS8550,not on S24,but I don't think S24 has something speccial since genei-run already succeeds.
here is all that I have done
1.put all the qnn lib in your app project,like jnilibs and build them from your gradle
2.set LD_LIBRARY_PATH and ADSP_LIBRARY_PATH in jni
bedides, you can use thses cmds to enable qnndsp logs
adb root
adb shell setprop fastrpc.process.attrs 1
adb shell setprop vendor.fastrpc.process.attrs 1
then you can see logs like this:
Line 1478: 10-26 11:47:14.419 27628 27657 W QnnDsp : Initializing HtpProvider
Line 1491: 10-26 11:47:14.426 27628 27657 W QnnDsp : Function not called, PrepareLib isn't loaded!
Line 1493: 10-26 11:47:14.427 27628 27657 W QnnDsp : Cost Based unsupported on soc QCS8550
Line 1596: 10-26 11:47:14.547 27628 27657 W QnnDsp : Function not called, PrepareLib isn't loaded!
Line 1612: 10-26 11:47:14.556 27628 27657 W QnnDsp : Function not called, PrepareLib isn't loaded!
Line 1613: 10-26 11:47:14.559 27628 27657 W QnnDsp : Function not called, PrepareLib isn't loaded!

hopefully this will help you