Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- script: sudo chmod go+rw /dev/kvm
displayName: Update permissions to KVM

- template: templates/jobs/download_linux_qnn_sdk.yml
- template: templates/jobs/init_linux_qnn_sdk_x64.yml
parameters:
QnnSDKVersion: ${{ parameters.QnnSdk }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
- template: use-android-ndk.yml

- ${{ if contains(parameters.packageName, 'qnn') }}:
- template: jobs/download_linux_qnn_sdk.yml
- template: jobs/init_linux_qnn_sdk_x64.yml
parameters:
QnnSDKVersion: '${{parameters.QnnSDKVersion}}'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
parameters:
- name: QnnSDKVersion
type: string
default: '2.36.1.250708'

steps:
- bash: |
echo "##vso[task.setvariable variable=QnnSDKRootDir]/data/qnnsdk/qnn-v${{ parameters.QnnSDKVersion }}"
displayName: Set QnnSDKRootDir

- script: |
echo $(QnnSDKRootDir)
displayName: 'Print QnnSDKRootDir after downloading QNN SDK'

- script: |
set -x
sdk_file="$(QnnSDKRootDir)/sdk.yaml"
# Parse the sdk.yaml file to get the QNN SDK version downloaded
downloaded_qnn_sdk_version=$(grep '^version:' "$sdk_file" | head -n 1 | cut -d':' -f2 | xargs | cut -d'.' -f1-3 | tr -d '\r')

# Extract major.minor.patch part from QnnSDKVersion passed as parameter
expected_qnn_sdk_version=$(echo ${{ parameters.QnnSDKVersion }} | cut -d'.' -f1-3)

if [[ -z "$downloaded_qnn_sdk_version" ]]; then
echo "QNN version not found in sdk.yaml."
exit 1
fi

# Compare provided version with version from sdk.yaml
if [[ "$downloaded_qnn_sdk_version" == "$expected_qnn_sdk_version" ]]; then
echo "Success: QnnSDKVersion matches sdk.yaml version ($downloaded_qnn_sdk_version)."
else
echo "Error: QnnSDKVersion ($expected_qnn_sdk_version) does not match sdk.yaml version ($downloaded_qnn_sdk_version) in the QNN SDK directory"
exit 1
fi
displayName: "Sanity Check: QnnSDKVersion vs sdk.yaml version"



- script: |
ls -al $(QnnSDKRootDir)
displayName: 'Print contents of QNN SDK'
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
clean: true
submodules: none

- template: jobs/download_linux_qnn_sdk.yml
- template: jobs/init_linux_qnn_sdk_x64.yml
parameters:
QnnSDKVersion: ${{ parameters.QnnSdk }}

Expand Down
Loading