| 92 | | == SDK |
| 93 | | |
| 94 | | Download the SDK from the Kinara support site. |
| 95 | | |
| 96 | | The file will be something like dv-sdk...tar |
| 97 | | |
| 98 | | Extract this file. |
| 99 | | |
| 100 | | |
| | 92 | Program the Flash (one time only): |
| | 93 | {{{ |
| | 94 | ./bins/program_flash_aarch64 -e 0 -f ./boot_img/willow_therm.hex |
| | 95 | <reboot the host/ reset ara device to get new firmware loaded on ara device> |
| | 96 | }}} |
| | 97 | |
| | 98 | |
| | 99 | Activate the chip: |
| | 100 | {{{ |
| | 101 | root@noble-venice:~/art/linux/aarch64/hw_utils# ./bins/active_enable_aarch64 -e 0 -m 2 |
| | 102 | Kinara Inc. Silicon utilities version 0.5.9 |
| | 103 | |
| | 104 | Run directory: /root/art/linux/aarch64/hw_utils |
| | 105 | ./bins/active_enable_aarch64 -e 0 -m 2 |
| | 106 | |
| | 107 | [I:20260129:17:16:09:595108] [] [kinara_main_678][Active_Enable] In run phase of Flash image |
| | 108 | [I:20260129:17:16:09:595458] [] [kinara_main_678][Active_Enable] Device Found Done ara-physical-id= 0 |
| | 109 | [I:20260129:17:16:09:595487] [] [kinara_main_678][IODeviceManager] enumerate ara2 pci devices |
| | 110 | [I:20260129:17:16:09:794621] [] [kinara_main_678][IODeviceManager] path= /sys/devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ |
| | 111 | [I:20260129:17:16:09:794732] [] [kinara_main_678][IODeviceManager] instance name: IODeviceManager, found an ara2 pci device at: /sys/devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ |
| | 112 | [I:20260129:17:16:09:794880] [] [kinara_main_678][pci_io_00:01.0] cache management 0 |
| | 113 | [I:20260129:17:16:09:794901] [] [kinara_main_678][pci_io_00:01.0] instance name: Ara2PcieIO_0, ara2 pci device folder path: /sys/devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ |
| | 114 | [I:20260129:17:16:09:795008] [] [kinara_main_678][pci_io_00:01.0] instance name: Ara2PcieIO_0, phy0=0x18300000 phy1=0x18100000 phy2=0x18200000 |
| | 115 | [I:20260129:17:16:09:798594] [] [kinara_main_678][pci_io_00:01.0] enabling pcie_ste_dma for device |
| | 116 | [W:20260129:17:16:09:798675] [] [kinara_main_678][pci_io_00:01.0] instance name: Ara2PcieIO_0, uiodma addr is : 0xf0a00000 |
| | 117 | [I:20260129:17:16:09:798777] [] [kinara_main_678][pci_io_00:01.0] successfully enabled pcie_ste_dma for pcie device |
| | 118 | [I:20260129:17:16:09:805173] [] [kinara_main_678][pci_io_00:01.0] instance name: Ara2PcieIO_0, vendor=0x1e58 product=0x2 |
| | 119 | [I:20260129:17:16:09:807783] [] [kinara_main_678][pci_io_00:01.0] Calling pcie tl clock programming, removing pcie clock from bypass |
| | 120 | [I:20260129:17:16:09:808154] [] [kinara_main_678][Active_Enable] [CTEST]: SBP Ready for Runtime Command |
| | 121 | |
| | 122 | [I:20260129:17:16:09:808182] [] [kinara_main_678][Active_Enable] [CTEST]: HIF is SETUP |
| | 123 | [I:20260129:17:16:09:808197] [] [kinara_main_678][Active_Enable] Entering State Full PRD 2 |
| | 124 | [I:20260129:17:16:09:808214] [] [kinara_main_678][Active_Enable] {} 4 |
| | 125 | [I:20260129:17:16:09:808251] [] [kinara_main_678][Active_Enable] [CTEST]: Pushed HIF req Type : 211 1 1 |
| | 126 | [I:20260129:17:16:09:808265] [] [kinara_main_678][Active_Enable] [CTEST]: Pushed HIF req occ : 32 |
| | 127 | [I:20260129:17:16:09:808629] [] [kinara_main_678][Active_Enable] {} 4 |
| | 128 | [I:20260129:17:16:09:808673] [] [kinara_main_678][Active_Enable] [CTEST]: HIF response 0 |
| | 129 | [I:20260129:17:16:09:808693] [] [kinara_main_678][Active_Enable] [CTEST]: CMD_TYPE 211 |
| | 130 | [I:20260129:17:16:09:808711] [] [kinara_main_678][Active_Enable] [CTEST]: CMD_ID 1 |
| | 131 | [I:20260129:17:16:09:808728] [] [kinara_main_678][Active_Enable] [CTEST]: QID_ID 1 |
| | 132 | [I:20260129:17:16:09:808746] [] [kinara_main_678][Active_Enable] [CTEST]: HIF PS Read Response |
| | 133 | [I:20260129:17:16:09:808765] [] [kinara_main_678][Active_Enable] [CTEST]: Status : 0 |
| | 134 | [I:20260129:17:16:09:808782] [] [kinara_main_678][Active_Enable] [CTEST]: PS Response Data Status : 0 |
| | 135 | [I:20260129:17:16:09:808799] [] [kinara_main_678][Active_Enable] [CTEST]: PS Response Data Current Power State : 2 |
| | 136 | [I:20260129:17:16:09:808816] [] [kinara_main_678][Active_Enable] [CTEST]: PS Response Data PVT_LOCK : 0 |
| | 137 | [I:20260129:17:16:09:808836] [] [kinara_main_678][Active_Enable] [CTEST]: TEST PASSED |
| | 138 | }}} |
| | 139 | |
| | 140 | Configure the DRAM: |
| | 141 | {{{ |
| | 142 | root@noble-venice:~/art/linux/aarch64/hw_utils# ./bins/ddr_unified_config_aarch64 -e 0 -s 1 -g 1 -l 3 -w 2 -f 0 -n 0 -u 0 -m 0 -r 0 -b willow -o ./ddr_config/ddr_cfg_35.bin |
| | 143 | Kinara Inc. Silicon utilities version 0.5.9 |
| | 144 | |
| | 145 | Run directory: /root/art/linux/aarch64/hw_utils |
| | 146 | ./bins/ddr_unified_config_aarch64 -e 0 -s 1 -g 1 -l 3 -w 2 -f 0 -n 0 -u 0 -m 0 -r 0 -b willow -o ./ddr_config/ddr_cfg_35.bin |
| | 147 | |
| | 148 | [I:20260129:17:17:05:155740] [] [kinara_main_706][IODeviceManager] enumerate ara2 pci devices |
| | 149 | [I:20260129:17:17:05:343281] [] [kinara_main_706][IODeviceManager] path= /sys/devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ |
| | 150 | [I:20260129:17:17:05:343392] [] [kinara_main_706][IODeviceManager] instance name: IODeviceManager, found an ara2 pci device at: /sys/devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ |
| | 151 | [I:20260129:17:17:05:343538] [] [kinara_main_706][pci_io_00:01.0] cache management 0 |
| | 152 | [I:20260129:17:17:05:343558] [] [kinara_main_706][pci_io_00:01.0] instance name: Ara2PcieIO_0, ara2 pci device folder path: /sys/devices/platform/soc@0/33800000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ |
| | 153 | [I:20260129:17:17:05:343663] [] [kinara_main_706][pci_io_00:01.0] instance name: Ara2PcieIO_0, phy0=0x18300000 phy1=0x18100000 phy2=0x18200000 |
| | 154 | [I:20260129:17:17:05:346269] [] [kinara_main_706][pci_io_00:01.0] enabling pcie_ste_dma for device |
| | 155 | [W:20260129:17:17:05:346327] [] [kinara_main_706][pci_io_00:01.0] instance name: Ara2PcieIO_0, uiodma addr is : 0xf0a00000 |
| | 156 | [I:20260129:17:17:05:346428] [] [kinara_main_706][pci_io_00:01.0] successfully enabled pcie_ste_dma for pcie device |
| | 157 | [I:20260129:17:17:05:351159] [] [kinara_main_706][pci_io_00:01.0] instance name: Ara2PcieIO_0, vendor=0x1e58 product=0x2 |
| | 158 | [I:20260129:17:17:05:353537] [] [kinara_main_706][pci_io_00:01.0] Calling pcie tl clock programming, removing pcie clock from bypass |
| | 159 | [I:20260129:17:17:05:353868] [] [kinara_main_706][ddr_unified_config] Configuring DDR now. Approxmiate time to complete: 60 seconds. |
| | 160 | [I:20260129:17:17:05:353894] [] [kinara_main_706][ddr_unified_config] UNIFIED CFG BIN LOADING |
| | 161 | [I:20260129:17:17:36:009795] [] [kinara_main_706][ddr_unified_config] DDR configuation successful. DDR BIST: PASSED |
| | 162 | }}} |
| | 163 | |
| | 164 | |
| | 165 | Activate Proxy: (change config/proxy_config.yaml if you want to run in background) |
| | 166 | |
| | 167 | {{{ |
| | 168 | root@noble-venice:~/art/linux/aarch64/proxy# sudo ./proxy_aarch64 -c ../../config/proxy_config.yaml |
| | 169 | |
| | 170 | Kinara Inc. Silicon utilities version 0.5.9 |
| | 171 | |
| | 172 | Run directory: /root/art/linux/aarch64/proxy |
| | 173 | ./proxy_aarch64 -c ../../config/proxy_config.yaml |
| | 174 | |
| | 175 | [I:20260129:17:23:04:425472] [] [kinara_main_764][GlobalLogger] |
| | 176 | root@noble-venice:~/art/linux/aarch64/proxy# ps -aef | grep prox |
| | 177 | root 766 1 9 17:23 ? 00:00:00 ./proxy_aarch64 -c ../../config/proxy_config.yaml |
| | 178 | }}} |
| | 179 | |
| | 180 | Download a sample yolov8n model (.dvm file) and untar: |
| | 181 | * Download [https://workdrive.zohoexternal.com/external/8c92f49dc6ba6e433a99801eef80363a46c7c8b74c9907bd47b0f3c4b9eccf14 URL] (may require access to support.kinara.ai portal) |
| | 182 | * Transfer to Gateworks SBC and untar: |
| | 183 | {{{ |
| | 184 | root@noble-venice:~/art/linux/aarch64/nnapp# wget 172.24.20.26/kinara/sdk_model_compile.tar.gz |
| | 185 | --2026-01-29 17:26:52-- http://192.168.1.1/kinara/sdk_model_compile.tar.gz |
| | 186 | Connecting to 172.24.20.26:80... connected. |
| | 187 | HTTP request sent, awaiting response... 200 OK |
| | 188 | Length: 23754978 (23M) [application/x-gtar-compressed] |
| | 189 | Saving to: ‘sdk_model_compile.tar.gz’ |
| | 190 | |
| | 191 | sdk_model_compile.tar.gz 100%[=====================================================================================================>] 22.65M 112MB/s in 0.2s |
| | 192 | |
| | 193 | 2026-01-29 17:26:52 (112 MB/s) - ‘sdk_model_compile.tar.gz’ saved [23754978/23754978] |
| | 194 | root@noble-venice:~/art/linux/aarch64/nnapp# tar -xvf sdk_model_compile.tar.gz |
| | 195 | }}} |
| | 196 | |
| | 197 | Either change the input path to the model, or move the model to /tmp |
| | 198 | |
| | 199 | Modify the ../../config/nnapp_config.yaml and change the input_path in the async section: |
| | 200 | {{{ |
| | 201 | async: |
| | 202 | # if this flag is TRUE, then the input directory of each model is iterated only once. |
| | 203 | # else, the input directory is iterated for model_param.batch_size * model_param.iterations times |
| | 204 | run_once_and_for_all: False |
| | 205 | utilization_stats: False |
| | 206 | # dump outputs with timestamp |
| | 207 | dump_with_timestamp: False |
| | 208 | # this section contains all the model related params for infer async mode |
| | 209 | models: |
| | 210 | 0: |
| | 211 | name: "model1" |
| | 212 | path: "/tmp/model.dvm" |
| | 213 | input_path: "" |
| | 214 | output_path: "" |
| | 215 | |
| | 216 | }}} |
| | 217 | |
| | 218 | Execute the sample model run: |
| | 219 | {{{ |
| | 220 | root@noble-venice:~/art/linux/aarch64/nnapp# ./nnapp_aarch64 --config ../../config/nnapp_config.yaml |
| | 221 | [W:20260129:17:29:41:832406] [] [n/a_-1][config] default YAML file not found ./config.yaml , specify yaml path |
| | 222 | Kinara, Inc. |
| | 223 | |
| | 224 | *---------------------------------------------------------------* |
| | 225 | * Neural Network Inference Application * |
| | 226 | * Copyright(c) 2018-23, Kinara, Inc. All rights reserved. * |
| | 227 | *---------------------------------------------------------------* |
| | 228 | |
| | 229 | Run: |
| | 230 | working directory: /root/art/linux/aarch64/nnapp |
| | 231 | ./nnapp_aarch64 --config ../../config/nnapp_config.yaml |
| | 232 | the app expects the inputs as raw tensors. The inputs are assumed to be preprocessed and written to a file |
| | 233 | the inputs have to be in the below format: |
| | 234 | <input_image_name>/quantized/layer<layer_id>-<blob_name>-<blob_id>_input_dv.dat |
| | 235 | and the golden inputs in the below format: |
| | 236 | <input_image_name>/quantized/<layer_name>-<layer_id>-<blob_name>-<blob_id> |
| | 237 | [I:20260129:17:29:41:898866] [] [main_807][model_parameters] empty input_path for model= model1 , setting output_path and golden_output_path to none |
| | 238 | [I:20260129:17:29:41:903483] [] [main_807][BaseApp] connected to proxy socket: IP_Address= 127.0.0.1 port= 5000 |
| | 239 | [I:20260129:17:29:41:904161] [] [main_807][BaseApp] |
| | 240 | +------------+-----------------+ |
| | 241 | | Product | Current Version | |
| | 242 | +------------+-----------------+ |
| | 243 | | client_lib | 1.3.0.0 | |
| | 244 | | firmware | 0.128.11.0 | |
| | 245 | | proxy | 1.3.0.0 | |
| | 246 | | sysapi | 1.1.61.0 | |
| | 247 | +------------+-----------------+ |
| | 248 | |
| | 249 | [I:20260129:17:29:41:904950] [] [main_807][BaseApp] |
| | 250 | +------------+--------------------+ |
| | 251 | | Product | Supported Versions | |
| | 252 | +------------+--------------------+ |
| | 253 | | client_lib | 1.0.0.0 | |
| | 254 | | client_lib | 1.1.1.0 | |
| | 255 | | client_lib | 1.1.2.0 | |
| | 256 | | client_lib | 1.3.0.0 | |
| | 257 | | cnn_model | 2.0.0.0 | |
| | 258 | | cnn_model | 2.1.0.0 | |
| | 259 | | firmware | 0.5.2.0 | |
| | 260 | | firmware | 1.1.2.0 | |
| | 261 | | llm_model | 3.0.0.0 | |
| | 262 | | llm_model | 3.1.0.0 | |
| | 263 | | pci_driver | 1.0.4.0 | |
| | 264 | | pci_driver | 1.0.6.6 | |
| | 265 | | proxy | 0.8.0.0 | |
| | 266 | | proxy | 0.9.0.0 | |
| | 267 | | proxy | 1.1.1.0 | |
| | 268 | | proxy | 1.3.0.0 | |
| | 269 | +------------+--------------------+ |
| | 270 | |
| | 271 | [I:20260129:17:29:41:905463] [] [main_807][BaseApp] found endpoints: count= 1 |
| | 272 | [I:20260129:17:29:41:905908] [] [main_807][BaseApp] creation of endpoint group successful: model= model1 |
| | 273 | [I:20260129:17:29:41:984637] [] [main_807][BaseApp] model load successful: model= model1 |
| | 274 | [I:20260129:17:29:42:011215] [] [task_print_device_stats_812][Stats] temperature= 36.2557 ep status: DV_ENDPOINT_STATE_ACTIVE 0x1000608c: 15d0200 |
| | 275 | [I:20260129:17:29:42:072253] [] [main_807][AsyncApp] completed iteration= 1 |
| | 276 | [I:20260129:17:29:42:145357] [] [main_807][AsyncApp] completed iteration= 2 |
| | 277 | [I:20260129:17:29:42:218729] [] [main_807][AsyncApp] completed iteration= 3 |
| | 278 | [I:20260129:17:29:42:291966] [] [main_807][AsyncApp] completed iteration= 4 |
| | 279 | [I:20260129:17:29:42:365203] [] [main_807][AsyncApp] completed iteration= 5 |
| | 280 | [I:20260129:17:29:42:437872] [] [main_807][AsyncApp] completed iteration= 6 |
| | 281 | [I:20260129:17:29:42:510537] [] [main_807][AsyncApp] completed iteration= 7 |
| | 282 | [I:20260129:17:29:42:584005] [] [main_807][AsyncApp] completed iteration= 8 |
| | 283 | [I:20260129:17:29:42:656563] [] [main_807][AsyncApp] completed iteration= 9 |
| | 284 | [I:20260129:17:29:42:729354] [] [main_807][AsyncApp] completed iteration= 10 |
| | 285 | [I:20260129:17:29:42:802121] [] [main_807][AsyncApp] completed iteration= 11 |
| | 286 | [I:20260129:17:29:42:874931] [] [main_807][AsyncApp] completed iteration= 12 |
| | 287 | [I:20260129:17:29:42:947354] [] [main_807][AsyncApp] completed iteration= 13 |
| | 288 | [I:20260129:17:29:43:012893] [] [task_print_device_stats_812][Stats] temperature= 36.2557 ep status: DV_ENDPOINT_STATE_ACTIVE 0x1000608c: 15d0200 |
| | 289 | [I:20260129:17:29:43:020108] [] [main_807][AsyncApp] completed iteration= 14 |
| | 290 | [I:20260129:17:29:43:094043] [] [main_807][AsyncApp] completed iteration= 15 |
| | 291 | [I:20260129:17:29:43:166269] [] [main_807][AsyncApp] completed iteration= 16 |
| | 292 | [I:20260129:17:29:43:238760] [] [main_807][AsyncApp] completed iteration= 17 |
| | 293 | [I:20260129:17:29:43:311065] [] [main_807][AsyncApp] completed iteration= 18 |
| | 294 | [I:20260129:17:29:43:383388] [] [main_807][AsyncApp] completed iteration= 19 |
| | 295 | [I:20260129:17:29:43:455880] [] [main_807][AsyncApp] completed iteration= 20 |
| | 296 | [I:20260129:17:29:43:456773] [] [main_807][Stats] summary stats |
| | 297 | ╔════════╤════════════════════════════╤═════════════════════════╤═══════════════════════════╤══════════════════╗ |
| | 298 | ║ Model │ hw_time (ms) │ ip_time (ms) │ op_time (ms) │ app_time (ms) ║ |
| | 299 | ╠════════╪════════╤═════════╤═════════╪═══════╤═══════╤═════════╪════════╤════════╤═════════╪═════╤═════╤══════╣ |
| | 300 | ║ │ max │ min │ mean │ max │ min │ mean │ max │ min │ mean │ max │ min │ mean ║ |
| | 301 | ╟────────┼────────┼─────────┼─────────┼───────┼───────┼─────────┼────────┼────────┼─────────┼─────┼─────┼──────╢ |
| | 302 | ║ model1 │ 3.1052 │ 3.08395 │ 3.09515 │ 4.365 │ 2.346 │ 3.17945 │ 12.187 │ 10.369 │ 11.3023 │ 76 │ 71 │ 71.9 ║ |
| | 303 | ╚════════╧════════╧═════════╧═════════╧═══════╧═══════╧═════════╧════════╧════════╧═════════╧═════╧═════╧══════╝ |
| | 304 | |
| | 305 | model_name=model1 iteration=20 batch_size=5 num_ip=1 num_op=1 total_ip_size=122880000 total_op_size=120960000 num_inferences=100 |
| | 306 | |
| | 307 | [I:20260129:17:29:43:457176] [] [main_807][Stats] endpoint load distribution: [0,100] |
| | 308 | [I:20260129:17:29:43:457195] [] [main_807][Stats] total number of inferences: 100 |
| | 309 | [I:20260129:17:29:43:457221] [] [main_807][Stats] Performance: HW IPS= 323.086 App IPS= 69.541 |
| | 310 | root@noble-venice:~/art/linux/aarch64/nnapp# |
| | 311 | }}} |
| | 312 | |
| | 313 | Note the final line that shows Performance: HW IPS= 323.086. |
| | 314 | |
| | 315 | |