File size: 39,148 Bytes
9037c05 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | [
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t0",
"text": "LLM-8850 ์นด๋์ ํฌ ์์์ ์ค์ด๋ ๋ฐฉ๋ฒ",
"prompt": "query",
"tokens": 24
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t0",
"text": "axcl-smi๋ก ํฌ ๋์ ์ํ๋ฅผ ๋ฎ์ถ๋ฉด ์นด๋ ์ฟจ๋งํฌ ์์์ด ์ค์ด๋ญ๋๋ค. ์จ๋๊ฐ ์ค๋ฅด๋ฉด ๋ค์ ๋์ผ ์ ์์ต๋๋ค.",
"prompt": "document",
"tokens": 44
},
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t1",
"text": "์๋์ฐ์์ AXCL ๋๋ผ์ด๋ฒ ์ค์น ํ ํ์จ์ด ๋ก๋ ์คํจ",
"prompt": "query",
"tokens": 27
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t1",
"text": "Windows์์ axcl_pcie.sys๋ฅผ ์ค์นํ ๋ค errno 87๋ก ํ์จ์ด ๋ก๋๊ฐ ์คํจํ๋ฉด ๊ด๋ฆฌ์ ๊ถํ์ผ๋ก pnputil /restart-device๋ฅผ ์คํํด ์ฅ์น๋ฅผ ๋ค์ ์์ํ์ธ์.",
"prompt": "document",
"tokens": 54
},
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t2",
"text": "How do I quantize a YOLO model for the Axera NPU?",
"prompt": "query",
"tokens": 24
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t2",
"text": "Pulsar2 converts an ONNX YOLO model to an axmodel; use a calibration set of a few dozen images and U8 or U16 quantization.",
"prompt": "document",
"tokens": 40
},
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t3",
"text": "์ค๋ ์ ๋
๋ฉ๋ด๋ก ๊น์น์ฐ๊ฐ ๋์ด๋ ๋ฒ",
"prompt": "query",
"tokens": 22
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t3",
"text": "๋ผ์ง๊ณ ๊ธฐ์ ์ ์ต์ ๊น์น๋ฅผ ๋ณถ๋ค๊ฐ ๋ฌผ์ ๋ถ๊ณ ๋๋ถ์ ๋ํ๋ฅผ ๋ฃ์ด ๋์ด๋ฉด ๊น์น์ฐ๊ฐ๊ฐ ์์ฑ๋ฉ๋๋ค.",
"prompt": "document",
"tokens": 41
},
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t4",
"text": "What causes the northern lights?",
"prompt": "query",
"tokens": 15
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t4",
"text": "The northern lights are caused by charged particles from the sun hitting gases in Earth's upper atmosphere.",
"prompt": "document",
"tokens": 28
},
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t5",
"text": "python function to compute cosine similarity",
"prompt": "query",
"tokens": 15
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t5",
"text": "def cosine(a, b):\n return float(a @ b / (np.linalg.norm(a) * np.linalg.norm(b)))",
"prompt": "document",
"tokens": 42
},
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t6",
"text": "์์ธ์์ ๋ถ์ฐ๊น์ง KTX ์์ ์๊ฐ",
"prompt": "query",
"tokens": 18
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t6",
"text": "KTX๋ฅผ ์ด์ฉํ๋ฉด ์์ธ์ญ์์ ๋ถ์ฐ์ญ๊น์ง ๋ณดํต 2์๊ฐ 30๋ถ ์ํ์ด ๊ฑธ๋ฆฝ๋๋ค.",
"prompt": "document",
"tokens": 33
},
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t7",
"text": "PCIe ๋์ญํญ์ด ์ถ๋ก ์๋์ ๋ฏธ์น๋ ์ํฅ",
"prompt": "query",
"tokens": 22
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t7",
"text": "์นด๋๊ฐ PCIe Gen2 x2๋ก ์ฐ๊ฒฐ๋๋ฉด ์
๋ ฅ๊ณผ ์ถ๋ ฅ ํ
์ ์ ์ก ์๊ฐ์ด ๋์ด๋ ์์ ๋ชจ๋ธ์์๋ NPU ์ฐ์ฐ๋ณด๋ค ์ ์ก์ด ๋ณ๋ชฉ์ด ๋ฉ๋๋ค.",
"prompt": "document",
"tokens": 45
},
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t8",
"text": "ๅฆไฝๅจ AX650 ไธ้จ็ฝฒๅคง่ฏญ่จๆจกๅ",
"prompt": "query",
"tokens": 20
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t8",
"text": "ไฝฟ็จ pulsar2 llm_build ๅฐๆจกๅ็ผ่ฏไธบ axmodel๏ผ็ถๅ็จ axllm ๅจ AX650 ๆ AXCL ๅ ้ๅกไธ่ฟ่กใ",
"prompt": "document",
"tokens": 41
},
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t9",
"text": "C++ RAII guard that restores a value on scope exit",
"prompt": "query",
"tokens": 21
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t9",
"text": "struct Guard { int &ref; int saved; ~Guard() { ref = saved; } }; // restores the original value when the scope ends",
"prompt": "document",
"tokens": 38
},
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t10",
"text": "๊ณ ์์ด๊ฐ ๋ฐค์ ์ฐ๋ ์ด์ ",
"prompt": "query",
"tokens": 17
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t10",
"text": "๊ณ ์์ด๋ ๋ฐ์ ๊ธฐ, ๋ฐฐ๊ณ ํ, ์์ญ ํ์, ๊ด์ฌ์ ๋๊ณ ์ถ์ ๋ ๋ฐค์ ํฐ ์๋ฆฌ๋ก ์ธ ์ ์์ต๋๋ค.",
"prompt": "document",
"tokens": 37
},
{
"kind": "text",
"group": "text",
"role": "query",
"answer": "t11",
"text": "battery life of electric cars in winter",
"prompt": "query",
"tokens": 16
},
{
"kind": "text",
"group": "text",
"role": "doc",
"id": "t11",
"text": "Cold weather reduces an electric car's range because the battery chemistry slows down and cabin heating draws extra power.",
"prompt": "document",
"tokens": 30
},
{
"kind": "text",
"group": "image",
"role": "query",
"answer": "cat",
"text": "๊ณ ์์ด ์ฌ์ง",
"prompt": "query",
"tokens": 12
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "cat",
"images": [
"cat_0.jpeg"
],
"tokens": 264
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "cat",
"images": [
"cat_1.jpeg"
],
"tokens": 256
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "cat",
"images": [
"cat_2.jpg"
],
"tokens": 264
},
{
"kind": "text",
"group": "image",
"role": "query",
"answer": "dog",
"text": "a photo of a dog",
"prompt": "query",
"tokens": 14
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "dog",
"images": [
"dog_0.jpeg"
],
"tokens": 264
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "dog",
"images": [
"dog_1.jpg"
],
"tokens": 270
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "dog",
"images": [
"dog_2.jpeg"
],
"tokens": 270
},
{
"kind": "text",
"group": "image",
"role": "query",
"answer": "fox",
"text": "์ฌ์ฐ ์ฌ์ง",
"prompt": "query",
"tokens": 12
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "fox",
"images": [
"fox_0.jpeg"
],
"tokens": 270
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "fox",
"images": [
"fox_1.jpeg"
],
"tokens": 264
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "fox",
"images": [
"fox_2.jpeg"
],
"tokens": 264
},
{
"kind": "text",
"group": "image",
"role": "query",
"answer": "rabbit",
"text": "a photo of a rabbit",
"prompt": "query",
"tokens": 14
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "rabbit",
"images": [
"rabbit_0.jpeg"
],
"tokens": 264
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "rabbit",
"images": [
"rabbit_1.jpeg"
],
"tokens": 260
},
{
"kind": "image",
"group": "image",
"role": "doc",
"id": "rabbit",
"images": [
"rabbit_2.jpeg"
],
"tokens": 260
},
{
"kind": "text",
"group": "audio",
"role": "query",
"answer": "ko_weather",
"text": "์ค๋ ์์ธ์ ์คํ๋ถํฐ ๋น๊ฐ ๋ด๋ฆฌ๊ฒ ๊ณ , ์ ๋
์๋ ๊ธฐ์จ์ด ํฌ๊ฒ ๋จ์ด์ง๊ฒ ์ต๋๋ค.",
"prompt": "query",
"tokens": 32
},
{
"kind": "audio",
"group": "audio",
"role": "doc",
"id": "ko_weather",
"audios": [
"ko_weather.wav"
],
"tokens": 148
},
{
"kind": "text",
"group": "audio",
"role": "query",
"answer": "ko_cooking",
"text": "๊น์น์ฐ๊ฐ๋ ๋ผ์ง๊ณ ๊ธฐ์ ์ ์ต์ ๊น์น๋ฅผ ๋ณถ์ ๋ค ๋ฌผ์ ๋ถ๊ณ ๋๋ถ๋ฅผ ๋ฃ์ด ๋์
๋๋ค.",
"prompt": "query",
"tokens": 38
},
{
"kind": "audio",
"group": "audio",
"role": "doc",
"id": "ko_cooking",
"audios": [
"ko_cooking.wav"
],
"tokens": 144
},
{
"kind": "text",
"group": "audio",
"role": "query",
"answer": "ko_train",
"text": "์์ธ์ญ์์ ๋ถ์ฐ์ญ๊น์ง ์ผ์ดํฐ์์ค๋ก ์ฝ ๋ ์๊ฐ ๋ฐ์ด ๊ฑธ๋ฆฝ๋๋ค.",
"prompt": "query",
"tokens": 28
},
{
"kind": "audio",
"group": "audio",
"role": "doc",
"id": "ko_train",
"audios": [
"ko_train.wav"
],
"tokens": 128
},
{
"kind": "text",
"group": "audio",
"role": "query",
"answer": "ko_cat",
"text": "์ฐ๋ฆฌ ์ง ๊ณ ์์ด๋ ๋ฐค๋ง๋ค ์ฐฝ๊ฐ์ ์์ ๋ฐ์ ๊ตฌ๊ฒฝํฉ๋๋ค.",
"prompt": "query",
"tokens": 28
},
{
"kind": "audio",
"group": "audio",
"role": "doc",
"id": "ko_cat",
"audios": [
"ko_cat.wav"
],
"tokens": 107
},
{
"kind": "text",
"group": "audio",
"role": "query",
"answer": "ko_npu",
"text": "์ด ์นด๋๋ ํผ์จ์์ด ์ต์คํ๋ ์ค ์ฌ๋กฏ์ ๊ฝ์์ ์ธ๊ณต์ง๋ฅ ๋ชจ๋ธ์ ๋น ๋ฅด๊ฒ ์คํํฉ๋๋ค.",
"prompt": "query",
"tokens": 35
},
{
"kind": "audio",
"group": "audio",
"role": "doc",
"id": "ko_npu",
"audios": [
"ko_npu.wav"
],
"tokens": 152
},
{
"kind": "text",
"group": "audio",
"role": "query",
"answer": "en_aurora",
"text": "The northern lights appear when charged particles from the sun hit the upper atmosphere.",
"prompt": "query",
"tokens": 24
},
{
"kind": "audio",
"group": "audio",
"role": "doc",
"id": "en_aurora",
"audios": [
"en_aurora.wav"
],
"tokens": 115
},
{
"kind": "text",
"group": "audio",
"role": "query",
"answer": "en_ev",
"text": "Electric cars lose some of their driving range in cold winter weather.",
"prompt": "query",
"tokens": 22
},
{
"kind": "audio",
"group": "audio",
"role": "doc",
"id": "en_ev",
"audios": [
"en_ev.wav"
],
"tokens": 99
},
{
"kind": "text",
"group": "audio",
"role": "query",
"answer": "en_dog",
"text": "My dog loves running on the beach and chasing the waves.",
"prompt": "query",
"tokens": 21
},
{
"kind": "audio",
"group": "audio",
"role": "doc",
"id": "en_dog",
"audios": [
"en_dog.wav"
],
"tokens": 84
},
{
"kind": "text",
"group": "audio",
"role": "query",
"answer": "en_code",
"text": "To sort a list in Python, call the sorted function or the sort method.",
"prompt": "query",
"tokens": 25
},
{
"kind": "audio",
"group": "audio",
"role": "doc",
"id": "en_code",
"audios": [
"en_code.wav"
],
"tokens": 111
},
{
"kind": "text",
"group": "audio",
"role": "query",
"answer": "en_bus",
"text": "The city bus stops at the station every ten minutes during rush hour.",
"prompt": "query",
"tokens": 23
},
{
"kind": "audio",
"group": "audio",
"role": "doc",
"id": "en_bus",
"audios": [
"en_bus.wav"
],
"tokens": 100
},
{
"kind": "mixed",
"text": "์ถ๊ตฌ ํ๋ จ ์ค์ธ ์ ์๋ค <|image|>",
"images": [
"football.jpg"
],
"prompt": "document",
"tokens": 279
},
{
"kind": "mixed",
"text": "A red city bus <|image|> and its announcement <|audio|>",
"images": [
"bus.jpg"
],
"audios": [
"en_bus.wav"
],
"prompt": "document",
"tokens": 383
},
{
"kind": "mixed",
"text": "",
"images": [
"ssd_horse.jpg",
"dog_1.jpg"
],
"tokens": 538
},
{
"kind": "long",
"text": "# AXCL ์ ํด์ฒด์ธ ์ฐ๋ ๊ฐ์ด๋\n\n[English](README_en.md) | [ไธญๆ](README.md) | **ํ๊ตญ์ด**\n\n> ์ค๊ตญ์ด ์๋ฌธ [README.md](README.md)๋ฅผ ๋ฒ์ญํ ๋ฌธ์์
๋๋ค. ๋ด์ฉ์ด ๋ค๋ฅด๋ฉด ์๋ฌธ์ ๊ธฐ์ค์ผ๋ก ํฉ๋๋ค.\n\n์ด ๋ฌธ์๋ AXCL์ ๊ธฐ์กด ๋น๋ ์์คํ
์ ์ ํธ์คํธ ํด์ฒด์ธ์ ์ฐ๋ํ๋ ๋ฐฉ๋ฒ์ ์ค๋ช
ํฉ๋๋ค. ์์ ์๋๋ฆฌ์ค๋ OpenWrt arm64 gcc์
๋๋ค.\n\n> **ํ**\n> ์ ํด์ฒด์ธ์ ์ถ๊ฐํ๊ธฐ ์ ์ ๋จผ์ ๊ธฐ์กด `host=x86` ๋น๋๋ฅผ ํ ๋ฒ ๋๊น์ง ์คํํ์ฌ ์ ์ ๋์ํ๋ ๊ธฐ์ค ๊ฒฐ๊ณผ๋ฅผ ๋จ๊ฒจ ๋๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค. ๊ทธ๋ฌ๋ฉด ์ดํ ๋น๊ต๊ฐ ๋ ์ฌ์์ง๋๋ค.\n\n## ๊ธฐ์กด ๋น๋ ์์คํ
๊ณผ x86_64 ์์\n\n### ์ฐธ๊ณ ๋น๋ ์ต์
\n\n| host ๋งค๊ฐ๋ณ์ | ์ค๋ช
| ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ |\n| --- | --- | --- |\n| `x86` | x86_64 | `out/axcl_linux_x86` |\n| `arm64` | aarch64 | `out/axcl_linux_arm64` |\n\n### ๊ธฐ์กด ๋น๋ ๋ช
๋ น\n\n| host | ๋น๋ ๋ช
๋ น | ์ฉ๋ |\n| --- | --- | --- |\n| `x86` | `cd build && make host=x86 clean all install -j128` | x86_64 ๊ธฐ์ค ๋น๋ |\n| `arm64` | `cd build && make host=arm64 clean all install -j128` | ๊ธฐ์กด arm64 ๋น๋ |\n\n### x86_64 ๋น๋ ๋ช
๋ น\n\n```bash\ncd build && make host=x86 clean all install -j128\n```\n\n์ด ๋จ๊ณ์ ๋ชฉ์ ์ ๊ฐ๋จํฉ๋๋ค. ๋จผ์ ํ์ฌ ๋น๋ ๊ณผ์ ์ด ์ฒ์๋ถํฐ ๋๊น์ง ์ ์์ ์ผ๋ก ๋์ํ๋์ง ํ์ธํ ๋ค์ ์ ํด์ฒด์ธ ์ถ๊ฐ๋ฅผ ์์ํฉ๋๋ค.\n\n### x86_64 ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ\n\n```text\nout/axcl_linux_x86/\nโโโ bin/ # ์คํ ํ์ผ\nโโโ lib/ # ๋ผ์ด๋ธ๋ฌ๋ฆฌ ํ์ผ\nโโโ include/ # ํค๋ ํ์ผ\nโโโ ko/ # ์ปค๋ ๋ชจ๋\nโโโ json/ # ์ค์ ํ์ผ\n```\n\n๋ณด์ถฉ ์ค๋ช
:\n- x86_64์ ์ฃผ ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ๋ `out/axcl_linux_x86`์
๋๋ค.\n- ํ์ฌ x86_64 ๋น๋์์ ํจ๊ป ์์ฑ๋๋ Python wheel์ ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ๋ `out/python`์
๋๋ค.\n\n## ๋น๋ ์์คํ
์ฃผ์ ํ๋ฆ\n\n| ๋จ๊ณ | ํ์ผ | ์ญํ |\n| --- | --- | --- |\n| ์ต์์ ์ง์
์ | `build/Makefile` | `host` ๋งค๊ฐ๋ณ์๋ฅผ ๋ฐ์ `clean`, `all`, `install` ์คํ |\n| ํธ์คํธ ๋ถ๊ธฐ | `build/config.mak` | `host`๋ฅผ ํด์ํ์ฌ `HOST`๋ฅผ ์ค์ ํ๊ณ ํด๋นํ๋ `*_config.mak` ํ์ผ์ ๋ก๋ |\n| ์ฌ์ฉ์ ๊ณต๊ฐ ๊ท์น | `build/rules.mak` | `HOST`์ ๋ฐ๋ผ ํด๋นํ๋ `*_rules.mak` ํ์ผ๋ก ์ ๋ฌ |\n| ์ปค๋ ๊ณต๊ฐ ๊ท์น | `build/krules.mak` | `HOST`์ ๋ฐ๋ผ ํด๋นํ๋ `*_krules.mak` ํ์ผ๋ก ์ ๋ฌ |\n| ํธ์คํธ ์ค์ ๋๋ ํฐ๋ฆฌ | `build/projects/` | ๊ฐ ํธ์คํธ์ `config`, `rules`, `krules` ํ์ผ ๋ณด๊ด |\n| 3rdparty ๊ฒฝ๋ก ์ ํ | `logger/Makefile`, `protocol/proto/static.mak`, `protocol/package/Makefile`, `test/*/Makefile` ๋ฑ | ์ด ํ์ผ๋ค์๋ `$(ARCH)`์ ๋ฐ๋ผ `3rdparty` ๋๋ ํฐ๋ฆฌ๋ฅผ ์ง์ ์ ํํ๋ ๊ฒฝ๋ก๊ฐ ๋ง์ |\n\n์ฌ๊ธฐ์๋ ๋ค์ ๋ ๋ณ์๋ฅผ ๊ตฌ๋ถํด์ ์ดํดํด์ผ ํฉ๋๋ค.\n- `HOST`๋ ์ ์ฒด ๋น๋ ๋์์ ๊ตฌ๋ถํ๋ ๋ฐ ์ฌ์ฉ๋๋ฉฐ, ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ ์ด๋ฆ๋ ๊ฒฐ์ ํฉ๋๋ค.\n- `ARCH`๋ ๊ธฐ๋ฐ ์ํคํ
์ฒ๋ฅผ ๋ํ๋ด๋ฉฐ, ๋ง์ 3rdparty ํค๋ ํ์ผ ๋ฐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๊ฒฝ๋ก ์ ํ์ด ์ฌ์ ํ ์ด ๋ณ์์ ์์กดํฉ๋๋ค.\n\nOpenWrt arm64 ์๋๋ฆฌ์ค์ ๊ฒฝ์ฐ ์ฒซ ๋ฒ์ ์์๋ ๋ค์ ๊ตฌ์ฑ์ ์ฌ์ฉํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค.\n\n| ๋ณ์ | ๊ถ์ฅ ๊ฐ | ์ค๋ช
|\n| --- | --- | --- |\n| `HOST` | `openwrt_arm64` | ์ ํด์ฒด์ธ์ ์ง์
์ ๊ณผ ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ๋ฅผ ๊ตฌ๋ถํ๋ ๋ฐ ์ฌ์ฉ |\n| `ARCH` | `arm64` | |\n\n## 3rdparty ์ฒ๋ฆฌ ๋ฐฉ์\n\n์๋ํํฐ ์ปดํฌ๋ํธ๋ ๋จผ์ ๋
๋ฆฝ์ ์ผ๋ก ๋น๋ํ ๋ค์, ์ค์น ๊ฒฐ๊ณผ๋ฅผ ์ํคํ
์ฒ๋ณ๋ก `3rdparty/` ๋๋ ํฐ๋ฆฌ์ ๋ฃ์ต๋๋ค. AXCL ๋ฉ์ธ ๋น๋ ๋จ๊ณ์์๋ ์ฃผ๋ก ์ด๋ ๊ฒ ๋ฏธ๋ฆฌ ๋ง๋ค์ด์ง ์ฐ์ถ๋ฌผ์ ์ฌ์ฉํฉ๋๋ค.\n\nํน์ํ ๊ฒฝ์ฐ๋ `ffmpeg`๋ฟ์
๋๋ค. ์ ์ฅ์์ ์ด๋ฏธ ์์ค ๋๋ ํฐ๋ฆฌ๊ฐ ํฌํจ๋์ด ์์ผ๋ฉฐ, ์ค์ ๋น๋๋ `3rdparty/ffmpeg/build.sh` ์คํฌ๋ฆฝํธ๋ก ๋ณ๋๋ก ์ํํฉ๋๋ค.\n\n### ์ฃผ์ํด์ผ ํ 3rdparty ์ปดํฌ๋ํธ\n\n| ์ปดํฌ๋ํธ | ํ์ฌ ๋ฐฉ์ | ํ์ฌ ๋ฒ์ | ๋ค์ด๋ก๋ ์ฃผ์ | ์ฐ๋ ์ฐธ๊ณ ์ฌํญ |\n| --- | --- | --- | --- | --- |\n| `ffmpeg` | ์ ์ฅ์ ๋ด ์์ค + ๋
๋ฆฝ ๋น๋ ์คํฌ๋ฆฝํธ | `n7.1` | `3rdparty/ffmpeg/FFmpeg-n7.1/` | OpenWrt ์ฐ๋ ์ `3rdparty/ffmpeg/build.sh`์ configure ์ธ์๋ฅผ ์ค์ ์ ์ผ๋ก ํ์ธํด์ผ ํจ |\n| `googletest` | ์ฌ์ ๋น๋๋ ์ค์น ๊ฒฐ๊ณผ | `1.15.0` | `https://github.com/google/googletest/releases/tag/v1.15.0` | ๊ธฐ์กด `arm64` ์ฐ์ถ๋ฌผ์ ์ฌ์ฌ์ฉํ ์ ์์ผ๋ฉด ๋ค์ ์ฌ์ ๋น๋ํ๊ณ ์๋ก์ด ๋๋ ํฐ๋ฆฌ ์ ํ ๋ก์ง์ ์ถ๊ฐํด์ผ ํจ |\n| `protobuf` | ์ฌ์ ๋น๋๋ ์ค์น ๊ฒฐ๊ณผ | `3.20.3` | `https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.3` | ๊ธฐ์กด `arm64` ์ฐ์ถ๋ฌผ์ ์ฌ์ฌ์ฉํ ์ ์์ผ๋ฉด ๋ค์ ์ฌ์ ๋น๋ํ๊ณ ์๋ก์ด ๋๋ ํฐ๋ฆฌ ์ ํ ๋ก์ง์ ์ถ๊ฐํด์ผ ํจ |\n| `spdlog` | ์ฌ์ ๋น๋๋ ์ค์น ๊ฒฐ๊ณผ | `1.14.1` | `https://github.com/gabime/spdlog/releases/tag/v1.14.1` | ๊ธฐ์กด `arm64` ์ฐ์ถ๋ฌผ์ ์ฌ์ฌ์ฉํ ์ ์์ผ๋ฉด ๋ค์ ์ฌ์ ๋น๋ํ๊ณ ์๋ก์ด ๋๋ ํฐ๋ฆฌ ์ ํ ๋ก์ง์ ์ถ๊ฐํด์ผ ํจ |\n\n## OpenWrt arm64 ํด์ฒด์ธ์ ์๋ก ๋ ์ ํด์ฒด์ธ ์ถ๊ฐ\n\n### ์์ ๋ฐ ์ถ๊ฐํด์ผ ํ ํ์ผ\n\n| ์ ํ | ํ์ผ ๋๋ ๋๋ ํฐ๋ฆฌ | ํ์ ์ฌ๋ถ | ์ค๋ช
|\n| --- | --- | --- | --- |\n| ์์ | `build/config.mak` | ์ | `openwrt_arm64` ๋ถ๊ธฐ๋ฅผ ์ถ๊ฐํ์ฌ ์ต์์ make๊ฐ ์ ํธ์คํธ๋ฅผ ์ธ์ํ๋๋ก ํจ |\n| ์ ๊ท | `build/projects/axcl_linux_openwrt_arm64_config.mak` | ์ | OpenWrt ํด์ฒด์ธ ๋ณ์ ์ ์ |\n| ์ ๊ท | `build/projects/axcl_linux_openwrt_arm64_rules.mak` | ์ | ์ฌ์ฉ์ ๊ณต๊ฐ ๊ท์น ํ์ผ. ์ฒซ ๋ฒ์ ์์๋ arm64 ํ
ํ๋ฆฟ์ ๊ทธ๋๋ก ์ฌ์ฌ์ฉ ๊ฐ๋ฅ |\n| ์ ๊ท | `build/projects/axcl_linux_openwrt_arm64_krules.mak` | ์ | ์ปค๋ ๊ณต๊ฐ ๊ท์น ํ์ผ. ์ฒซ ๋ฒ์ ์์๋ arm64 ํ
ํ๋ฆฟ์ ๊ทธ๋๋ก ์ฌ์ฌ์ฉ ๊ฐ๋ฅ |\n| ์์ | `3rdparty` | ์ | ์ฌ์ ๋น๋ ๋ฐ ๊ฒฝ๋ก ์์ |\n\n### ํ
ํ๋ฆฟ ์ถ์ฒ\n\n| ์ ํ์ผ | ๊ถ์ฅ ํ
ํ๋ฆฟ |\n| --- | --- |\n| `axcl_linux_openwrt_arm64_config.mak` | `build/projects/axcl_linux_arm64_config.mak` |\n| `axcl_linux_openwrt_arm64_rules.mak` | `build/projects/axcl_linux_arm64_rules.mak` |\n| `axcl_linux_openwrt_arm64_krules.mak` | `build/projects/axcl_linux_arm64_krules.mak` |\n\n### ์ฐ๋ ์ ์ฐจ\n\n| ๋จ๊ณ | ์์
| ์ค๋ช
|\n| --- | --- | --- |\n| 1 | `cd build && make host=x86 clean all install -j128` ์คํ | ๋จผ์ ์ ์ ๋์ํ๋ x86_64 ๊ธฐ์ค ๊ฒฐ๊ณผ๋ฅผ ํ๋ณด |\n| 2 | `build/config.mak`์ `openwrt_arm64` ๋ถ๊ธฐ ์ถ๊ฐ | `make host=openwrt_arm64`์์ ์ ํธ์คํธ๋ฅผ ์ธ์ํ ์ ์๋๋ก ํจ |\n| 3 | arm64 ํ
ํ๋ฆฟ์ ๋ณต์ฌํ์ฌ `axcl_linux_openwrt_arm64_config.mak`, `rules.mak`, `krules.mak` ์ถ๊ฐ | ์ ํธ์คํธ๋ฅผ ์ํ ์ ์ฒด ์ง์
์ ๊ตฌ์ฑ |\n| 4 | ์ `*_config.mak`์์ OpenWrt ํด์ฒด์ธ ์ ๋์ฌ๋ฅผ ์ค์ ํ๊ณ `ARCH=arm64` ์ ์ง | ์ฐ์ ํด์ฒด์ธ ์ฐจ์ด๋ฅผ ์ค์ ํ์ผ ์์์๋ง ์ฒ๋ฆฌ |\n| 5 | 3rdparty | ์ฌ์ ๋น๋ ๋ฐ ๊ฒฝ๋ก ์์ |\n| 9 | `cd build && make host=openwrt_arm64 clean all install -j128` ์คํ | ์ ํธ์คํธ ์ฐ๋์ด ์๋ฃ๋์๋์ง ๊ฒ์ฆ |\n| 10 | `out/axcl_linux_openwrt_arm64` ์๋์ `bin`, `lib`, `include`, `ko`, `json` ํ์ธ | ๋น๋ ๊ฒฐ๊ณผ๊ฐ ์์๊ณผ ์ผ์นํ๋์ง ํ์ธ |\n\n### OpenWrt config ํ์ผ ์ฃผ์ ๋ณ์\n\n| ๋ณ์ | ์ญํ | OpenWrt arm64 ์์์์์ ์ฒ๋ฆฌ ๋ฐฉ์ |\n| --- | --- | --- |\n| `CROSS` | ํด์ฒด์ธ ์ ๋์ฌ | OpenWrt arm64 musl gcc 12.3.0์ ํด๋นํ๋ ์ ๋์ฌ๋ก ๋ณ๊ฒฝ |\n| `CC` | C ์ปดํ์ผ๋ฌ | ์ผ๋ฐ์ ์ผ๋ก `$(CROSS)gcc`์์ ํ์ |\n| `CPP` | C++ ์ปดํ์ผ๋ฌ | ์ผ๋ฐ์ ์ผ๋ก `$(CROSS)g++`์์ ํ์ |\n| `LD` | ๋ง์ปค | ์ผ๋ฐ์ ์ผ๋ก `$(CROSS)ld`์์ ํ์ |\n| `AR` | ์์นด์ด๋ธ ๋๊ตฌ | ์ผ๋ฐ์ ์ผ๋ก `$(CROSS)ar`์์ ํ์ |\n| `STRIP`",
"prompt": "document",
"tokens": 1024
},
{
"kind": "long",
"text": "| strip ๋๊ตฌ | ์ผ๋ฐ์ ์ผ๋ก `$(CROSS)strip`์์ ํ์ |\n| `OBJCOPY` | objcopy ๋๊ตฌ | ์ผ๋ฐ์ ์ผ๋ก `$(CROSS)objcopy`์์ ํ์ |\n| `ARCH` | ์ํคํ
์ฒ ์๋ณ์ | `arm64`๋ก ์ ์ง |\n\n### ๋น๋ ๊ฒ์ฆ\n\n```bash\ncd build && make host=openwrt_arm64 clean all install -j128\n```\n\n### ๊ฒฐ๊ณผ ํ์ธ\n\n| ํ์ธ ํญ๋ชฉ | ์์ ๊ฒฐ๊ณผ |\n| --- | --- |\n| ์ถ๋ ฅ ๋ฃจํธ ๋๋ ํฐ๋ฆฌ | `out/axcl_linux_openwrt_arm64` ์์ฑ |\n| `bin` ๋๋ ํฐ๋ฆฌ | ์คํ ํ์ผ ์ถ๋ ฅ ์กด์ฌ |\n| `lib` ๋๋ ํฐ๋ฆฌ | ๋ผ์ด๋ธ๋ฌ๋ฆฌ ํ์ผ ์ถ๋ ฅ ์กด์ฌ |\n| `include` ๋๋ ํฐ๋ฆฌ | ํค๋ ํ์ผ ์ถ๋ ฅ ์กด์ฌ |\n| `ko` ๋๋ ํฐ๋ฆฌ | ํ์ฌ ํ๋ฆ์ ๋๋ผ์ด๋ฒ ๋น๋๊ฐ ํฌํจ๋ ๊ฒฝ์ฐ ๋ชจ๋ ์ถ๋ ฅ์ด ์์ด์ผ ํจ |\n| `json` ๋๋ ํฐ๋ฆฌ | ํ์ฌ ํ๋ฆ์ ์ค์ ์ค์น๊ฐ ํฌํจ๋ ๊ฒฝ์ฐ JSON ์ค์ ์ถ๋ ฅ์ด ์์ด์ผ ํจ |",
"prompt": "document",
"tokens": 253
},
{
"kind": "long",
"text": "# AXCL New Toolchain Integration Guide\n\n**English** | [ไธญๆ](README.md) | [ํ๊ตญ์ด](README_ko.md)\n\n> Translated from the Chinese [README.md](README.md). If the two differ, the Chinese original is authoritative.\n\nThis document explains how to integrate a new host toolchain into the existing AXCL build system. The example scenario is OpenWrt arm64 gcc.\n\n> **Tip**\n> Before adding a new toolchain, it is recommended to first run a complete build with the existing `host=x86` and keep a working baseline result. This makes later comparisons more straightforward.\n\n## Existing Build System and x86_64 Example\n\n### Reference Build Options\n\n| host parameter | Description | Output directory |\n| --- | --- | --- |\n| `x86` | x86_64 | `out/axcl_linux_x86` |\n| `arm64` | aarch64 | `out/axcl_linux_arm64` |\n\n### Existing Build Commands\n\n| host | Build command | Purpose |\n| --- | --- | --- |\n| `x86` | `cd build && make host=x86 clean all install -j128` | x86_64 baseline build |\n| `arm64` | `cd build && make host=arm64 clean all install -j128` | Existing arm64 build |\n\n### x86_64 Build Command\n\n```bash\ncd build && make host=x86 clean all install -j128\n```\n\nThe purpose of this step is simple: first confirm that the current build pipeline works end to end, then start adding the new toolchain.\n\n### x86_64 Output Directory\n\n```text\nout/axcl_linux_x86/\nโโโ bin/ # Executables\nโโโ lib/ # Libraries\nโโโ include/ # Header files\nโโโ ko/ # Kernel modules\nโโโ json/ # Configuration files\n```\n\nAdditional notes:\n- `out/axcl_linux_x86` is the main x86_64 output directory.\n- `out/python` is the output directory for the Python wheel that the current x86_64 build also generates.\n\n## Main Build System Flow\n\n| Stage | File | Purpose |\n| --- | --- | --- |\n| Top-level entry | `build/Makefile` | Receives the `host` parameter and runs `clean`, `all` and `install` |\n| host dispatch | `build/config.mak` | Parses `host`, sets `HOST` and loads the corresponding `*_config.mak` |\n| User-space rules | `build/rules.mak` | Forwards to the corresponding `*_rules.mak` based on `HOST` |\n| Kernel-space rules | `build/krules.mak` | Forwards to the corresponding `*_krules.mak` based on `HOST` |\n| host configuration directory | `build/projects/` | Holds the `config`, `rules` and `krules` files for each host |\n| 3rdparty path selection | `logger/Makefile`, `protocol/proto/static.mak`, `protocol/package/Makefile`, `test/*/Makefile`, etc. | Many paths in these files select the `3rdparty` directory directly by `$(ARCH)` |\n\nTwo variables here need to be considered separately:\n- `HOST` distinguishes the complete build target and also determines the output directory name.\n- `ARCH` describes the underlying architecture; many 3rdparty header and library path selections still depend on it.\n\nFor the OpenWrt arm64 scenario, the following configuration is recommended for the first version:\n\n| Variable | Recommended value | Description |\n| --- | --- | --- |\n| `HOST` | `openwrt_arm64` | Distinguishes the new toolchain's entry point and output directory |\n| `ARCH` | `arm64` | |\n\n## 3rdparty Handling\n\nThird-party components are first built independently, and their install output is then placed in the `3rdparty/` directory by architecture. The main AXCL build stage mainly consumes these prebuilt artifacts.\n\nOnly `ffmpeg` is a special case: the repository already contains its source directory, and the actual build is done separately by `3rdparty/ffmpeg/build.sh`.\n\n### 3rdparty Components to Watch\n\n| Component | Current method | Current version | Download URL | Integration notes |\n| --- | --- | --- | --- | --- |\n| `ffmpeg` | In-tree source + standalone build script | `n7.1` | `3rdparty/ffmpeg/FFmpeg-n7.1/` | When integrating OpenWrt, check the configure arguments in `3rdparty/ffmpeg/build.sh` carefully |\n| `googletest` | Prebuilt install output | `1.15.0` | `https://github.com/google/googletest/releases/tag/v1.15.0` | If the existing `arm64` artifacts cannot be reused, prebuild it again and add new directory selection logic |\n| `protobuf` | Prebuilt install output | `3.20.3` | `https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.3` | If the existing `arm64` artifacts cannot be reused, prebuild it again and add new directory selection logic |\n| `spdlog` | Prebuilt install output | `1.14.1` | `https://github.com/gabime/spdlog/releases/tag/v1.14.1` | If the existing `arm64` artifacts cannot be reused, prebuild it again and add new directory selection logic |\n\n## Adding a New Toolchain, Using the OpenWrt arm64 Toolchain as an Example\n\n### Files to Modify and Add\n\n| Type | File or directory | Required | Description |\n| --- | --- | --- | --- |\n| Modify | `build/config.mak` | Yes | Add an `openwrt_arm64` branch so that the top-level make recognizes the new host |\n| Add | `build/projects/axcl_linux_openwrt_arm64_config.mak` | Yes | Defines the OpenWrt toolchain variables |\n| Add | `build/projects/axcl_linux_openwrt_arm64_rules.mak` | Yes | User-space rules file; the first",
"prompt": "document",
"tokens": 1024
},
{
"kind": "long",
"text": "version can reuse the arm64 template as is |\n| Add | `build/projects/axcl_linux_openwrt_arm64_krules.mak` | Yes | Kernel-space rules file; the first version can reuse the arm64 template as is |\n| Modify | `3rdparty` | Yes | Prebuild and modify paths |\n\n### Template Sources\n\n| New file | Recommended template |\n| --- | --- |\n| `axcl_linux_openwrt_arm64_config.mak` | `build/projects/axcl_linux_arm64_config.mak` |\n| `axcl_linux_openwrt_arm64_rules.mak` | `build/projects/axcl_linux_arm64_rules.mak` |\n| `axcl_linux_openwrt_arm64_krules.mak` | `build/projects/axcl_linux_arm64_krules.mak` |\n\n### Integration Steps\n\n| Step | Action | Description |\n| --- | --- | --- |\n| 1 | Run `cd build && make host=x86 clean all install -j128` | First obtain a working x86_64 baseline result |\n| 2 | Add an `openwrt_arm64` branch to `build/config.mak` | Lets `make host=openwrt_arm64` recognize the new host |\n| 3 | Copy the arm64 templates and add `axcl_linux_openwrt_arm64_config.mak`, `rules.mak` and `krules.mak` | Sets up a complete entry point for the new host |\n| 4 | In the new `*_config.mak`, set the OpenWrt toolchain prefix and keep `ARCH=arm64` | Confine the toolchain differences to the configuration file first |\n| 5 | 3rdparty | Prebuilding and path changes |\n| 9 | Run `cd build && make host=openwrt_arm64 clean all install -j128` | Verify that the new host is fully integrated |\n| 10 | Check `bin`, `lib`, `include`, `ko` and `json` under `out/axcl_linux_openwrt_arm64` | Confirm that the build results are as expected |\n\n### Key Variables in the OpenWrt config File\n\n| Variable | Purpose | Handling in the OpenWrt arm64 example |\n| --- | --- | --- |\n| `CROSS` | Toolchain prefix | Change to the prefix for OpenWrt arm64 musl gcc 12.3.0 |\n| `CC` | C compiler | Usually derived from `$(CROSS)gcc` |\n| `CPP` | C++ compiler | Usually derived from `$(CROSS)g++` |\n| `LD` | Linker | Usually derived from `$(CROSS)ld` |\n| `AR` | Archiver | Usually derived from `$(CROSS)ar` |\n| `STRIP` | strip tool | Usually derived from `$(CROSS)strip` |\n| `OBJCOPY` | objcopy tool | Usually derived from `$(CROSS)objcopy` |\n| `ARCH` | Architecture identifier | Keep as `arm64` |\n\n### Build Verification\n\n```bash\ncd build && make host=openwrt_arm64 clean all install -j128\n```\n\n### Result Check\n\n| Check item | Expected result |\n| --- | --- |\n| Output root directory | `out/axcl_linux_openwrt_arm64` is generated |\n| `bin` directory | Executable output is present |\n| `lib` directory | Library output is present |\n| `include` directory | Header file output is present |\n| `ko` directory | If the current flow includes the driver build, module output should be present |\n| `json` directory | If the current flow includes configuration installation, JSON configuration output should be present |",
"prompt": "document",
"tokens": 894
},
{
"kind": "long",
"text": "[English](README.md) | [ไธญๆ](README_zh.md) | **ํ๊ตญ์ด**\n\n> ์์ด [์๋ฌธ](README.md)์ ๋ฒ์ญํ ๋ฌธ์์
๋๋ค. ๋ด์ฉ์ด ๋ค๋ฅด๋ฉด ์๋ฌธ์ ๊ธฐ์ค์ผ๋ก ํฉ๋๋ค.\n\n### ์ค๋ช
\n\n์ด ์ํ ์ฝ๋๋ Aixin SDK ํจํค์ง์์ ์ ๊ณตํ๋ IVE(Intelligent Video Analysis Engine) ๋ชจ๋์ฉ์ผ๋ก, ๊ณ ๊ฐ์ด IVE ๊ด๋ จ ์ธํฐํ์ด์ค๋ฅผ ๋น ๋ฅด๊ฒ ์ดํดํ๊ณ ์ฌ๋ฐ๋ฅด๊ฒ ์ฌ์ฉํ ์ ์๋๋ก ๋์ต๋๋ค.\n`axcl_sample_ive`๋ ์ด ์ํ ์ฝ๋๋ก ์์ฑ๋์ด opt/bin ๋๋ ํฐ๋ฆฌ์ ์์ผ๋ฉฐ, ํด๋น ์ธํฐํ์ด์ค์ ์ฌ์ฉ ๋ฐฉ๋ฒ์ ๋ณด์ฌ ์ค๋๋ค.\n\n### ์ฌ์ฉ๋ฒ\n```bash\nUsage : ./axcl_sample_ive -c case_index [options]\n -d | --device_id: Device index from 0 to connected device num - 1, optional\n -c | --case_index:Calc case index, default:0\n 0-DMA.\n 1-DualPicCalc.\n 2-HysEdge and CannyEdge.\n 3-CCL.\n 4-Erode and Dilate.\n 5-Filter.\n 6-Hist and EqualizeHist.\n 7-Integ.\n 8-MagAng.\n 9-Sobel.\n 10-GMM and GMM2.\n 11-Thresh.\n 12-16bit to 8bit.\n 13-Multi Calc.\n 14-Crop and Resize.\n 15-CSC.\n 16-CropResize2.\n 17-MatMul.\n -e | --engine_choice:Choose engine id, default:0\n 0-IVE; 1-TDP; 2-VGP; 3-VPP; 4-GDC; 5-DSP; 6-NPU; 7-CPU; 8-MAU.\n For Crop and Resize case, cropimage support IVE/VGP/VPP engine, cropresize and cropresize_split_yuv support VGP/VPP engine.\n For CSC case, support TDP/VGP/VPP engine.\n For CropResize2 case, support VGP/VPP engine.\n For MatMul case, support NPU/MAU engine.\n -m | --mode_choice:Choose test mode, default:0\n For DualPicCalc case, indicate dual pictures calculation task:\n 0-add; 1-sub; 2-and; 3-or; 4-xor; 5-mse.\n For HysEdge and CannyEdge case, indicate hys edge or canny edge calculation task:\n 0-hys edge; 1-canny edge.\n For Erode and Dilate case, indicate erode or dilate calculation task:\n 0-erode; 1-dilate.\n For Hist and EqualizeHist case, indicate hist or equalize hist calculation task:\n 0-hist; 1-equalize hist.\n For GMM and GMM2 case, indicate gmm or gmm2 calculation task:\n 0-gmm; 1-gmm2.\n For Crop and Resize case, indicate cropimage, cropresize, cropresize_split_yuv calculation task:\n 0-crop image; 1-crop_resize; 2-cropresize_split_yuv.\n For CropResize2 case, indicate crop_resize2 or cropresize2_split_yuv calculation task:\n 0-crop_resize2; 1-cropresize2_split_yuv.\n -t | --type_image:Image type index refer to IVE_IMAGE_TYPE_E(IVE engine) or AX_IMG_FORMAT_E(other engine)\n Note:\n 1. For all case, both input and output image types need to be specified in the same order as the specified input and output file order.\n 2. If no type is specified, i.e. a type value of -1 is passed in, then a legal type is specified, as qualified by the API documentation.\n 3. Multiple input and output image types, separated by spaces.\n 4. For One-dimensional data (such as AX_IVE_MEM_INFO_T type data), do not require a type to be specified.\n -i | --input_files:Input image files, if there are multiple inputs, separated by spaces.\n -o | --output_files:Output image files or dir, if there are multiple outputs, separated by spaces\n Note:for DMA, Crop Resize, blob of CCL case and CropResize2 case must be specified as directory.\n -w | --width:Image width of inputs, default:1280.\n -h | --height:Image height of inputs, default:720.\n -p | --param_list:Control parameters list or file(in json data format)\n Note:\n 5. Please refer to the json file in the '/opt/data/ive/' corresponding directory of each test case.\n 6. For MagAng, Multi Calc and CSC case, no need control parameters.\n -a | --align_need:Does the width/height/stride need to be aligned automatically, default:0.\n 0-no; 1-yes.\n -? | --help:Show usage help.\n```\n\n### ์์ \n\n> [!NOTE]\n>\n> - ์ํ ์ฝ๋๋ API ๋ฐ๋ชจ์ฉ์ผ ๋ฟ์ด๋ฉฐ, ์ค์ ๋ก๋ ์ฌ์ฉ์ ํ๊ฒฝ์ ๋ง๋ ๊ตฌ์ฒด์ ์ธ ์ค์ ํ๋ผ๋ฏธํฐ๊ฐ ํ์ํฉ๋๋ค.\n> - ํ๋ผ๋ฏธํฐ ์ ํ ์ฌํญ์ \"42 - AX IVE API\" ๋ฌธ์๋ฅผ ์ฐธ๊ณ ํ์ธ์.\n> - ์
๋ ฅ ๋ฐ ์ถ๋ ฅ ๋ฐ์ดํฐ๋ฅผ ๋ด์ ๋ฉ๋ชจ๋ฆฌ๋ ์ฌ์ฉ์๊ฐ ํ ๋นํด์ผ ํฉ๋๋ค.\n> - ์
๋ ฅ ๋ฐ ์ถ๋ ฅ ์ด๋ฏธ์ง ๋ฐ์ดํฐ๋ ์ฌ์ฉ์๊ฐ ์ง์ ํด์ผ ํฉ๋๋ค.\n> - CV๋ง๋ค ์
๋ ฅ ์ด๋ฏธ์ง(๋๋ ๋ฐ์ดํฐ)์ ๊ฐ์๊ฐ ๋ค๋ฅผ ์ ์์ต๋๋ค.\n> - 2์ฐจ์ ์ด๋ฏธ์ง์ ๋ฐ์ดํฐ ํ์
์ ๋ช
ํํ๊ฒ ์ ์ํ๊ฑฐ๋ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ๋์ด์ผ ํฉ๋๋ค.\n> - ์ฃผ์ ํ๋ผ๋ฏธํฐ๋ Json ๋ฌธ์์ด ๋๋ Json ํ์ผ ํ์์
๋๋ค. /opt/data/ive/์ ์ฌ๋ฌ ๋๋ ํฐ๋ฆฌ์ ์๋ .json ํ์ผ๊ณผ ์ฝ๋๋ฅผ ์ฐธ๊ณ ํ์ธ์.\n\n1. ๋์๋ง ํ์\n ```bash\n ./axcl_sample_ive -?\n ```\n\n2. DMA ์ฌ์ฉ ์(์์ค ํด์๋: 1280 x 720, ์
๋ ฅ/์ถ๋ ฅ ํ์
: U8C1, Json ํ์ผ๋ก ์ ์ด ํ๋ผ๋ฏธํฐ ์ค์ )\n ```bash\n ./axcl_sample_ive -c 0 -w 1280 -h 720 -i /opt/data/ive/common/1280x720_u8c1_gray.yuv -o /opt/data/ive/dma/ -t 0 0 -p /opt/data/ive/dma/dma.json\n ```\n\n3. MagAndAng ์ฌ์ฉ ์(์์ค ํด์๋: 1280 x 720, ์
๋ ฅ ํ๋ผ๋ฏธํฐ(grad_h, grad_v)์ ๋ฐ์ดํฐ ํ์
: U16C1, ์ถ๋ ฅ ํ๋ผ๋ฏธํฐ(ang_output)์ ๋ฐ์ดํฐ ํ์
: U8C1)\n ```bash\n ./axcl_sample_ive -c 8 -w 1280 -h 720 -i /opt/data/ive/common/1280x720_u1",
"prompt": "document",
"tokens": 1024
},
{
"kind": "long",
"text": "6c1_gray.yuv /opt/data/ive/common/1280x720_u16c1_gray_2.yuv -o /opt/data/ive/common/mag_output.bin /opt/data/ive/common/ang_output.bin -t 9 9 9 0\n ```\n\n### Json ํ์ผ์ ์ฃผ์ ํ๋ผ๋ฏธํฐ\n1. **dma.json**\n - `mode`, `x0`, `y0`, `h_seg`, `v_seg`, `elem_size`, `set_val`์ ๊ตฌ์กฐ์ฒด `AX_IVE_DMA_CTRL_T`์์ ๊ฐ๊ฐ ๋์ํ๋ ๋ฉค๋ฒ์ธ `enMode`, `u16CrpX0`, `u16CrpY0`, `u8HorSegSize`, `u8VerSegRows`, `u8ElemSize`, `u64Val`์ ๊ฐ์
๋๋ค.\n - `w_out`๊ณผ `h_out`์ ๊ฐ๊ฐ ์ถ๋ ฅ ์ด๋ฏธ์ง์ ๋๋น์ ๋์ด์ด๋ฉฐ, DMA์ `AX_IVE_DMA_MODE_DIRECT_COPY` ๋ชจ๋์์๋ง ์ฌ์ฉํฉ๋๋ค.\n2. **dualpics.json**\n - `x`์ `y`๋ ADD CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_ADD_CTRL_T`์ `u1q7X`์ `u1q7Y` ๊ฐ์
๋๋ค.\n - `mode`๋ Sub CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_SUB_CTRL_T`์ `enMode` ๊ฐ์
๋๋ค.\n - `mse_coef`๋ MSE CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_MSE_CTRL_T`์ `u1q15MseCoef` ๊ฐ์
๋๋ค.\n3. **ccl.json**\n - `mode`๋ CCL CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_CCL_CTRL_T`์ `enMode` ๊ฐ์
๋๋ค.\n4. **ed.json**\n - `mask`๋ Erode CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_ERODE_CTRL_T` ๋๋ Dilate CV์ฉ `AX_IVE_DILATE_CTRL_T`์ ์๋ `au8Mask[25]`์ ๋ชจ๋ ๊ฐ์
๋๋ค.\n5. **filter.json**\n - `mask`๋ Filter CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_FILTER_CTRL_T`์ ์๋ `as6q10Mask[25]`์ ๋ชจ๋ ๊ฐ์
๋๋ค.\n6. **hist.json**\n - `histeq_coef`๋ EqualizeHist CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_EQUALIZE_HIST_CTRL_T`์ `u0q20HistEqualCoef` ๊ฐ์
๋๋ค.\n7. **integ.json**\n - `out_ctl`์ Integ CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_INTEG_CTRL_T`์ `enOutCtrl` ๊ฐ์
๋๋ค.\n8. **sobel.json**\n - `mask`๋ Sobel CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_SOBEL_CTRL_T`์ `as6q10Mask[25]` ๊ฐ์
๋๋ค.\n9. **gmm.json**\n - `init_var`, `min_var`, `init_w`, `lr`, `bg_r`, `var_thr`, `thr`๋ ๊ฐ๊ฐ GMM CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_GMM_CTRL_T`์ `u14q4InitVar`, `u14q4MinVar`, `u1q10InitWeight`, `u1q7LearnRate`, `u1q7BgRatio`, `u4q4VarThr`, `u8Thr` ๊ฐ์
๋๋ค.\n10. **gmm2.json:**\n - `init_var`, `min_var`, `max_var`, `lr`, `bg_r`, `var_thr`, `var_thr_chk`, `ct`, `thr`๋ ๊ฐ๊ฐ GMM2 CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_GMM2_CTRL_T`์ `u14q4InitVar`, `u14q4MinVar`, `u14q4MaxVar`, `u1q7LearnRate`, `u1q7BgRatio`, `u4q4VarThr`, `u4q4VarThrCheck`, `s1q7CT`, `u8Thr` ๊ฐ์
๋๋ค.\n11. **thresh.json**\n - `mode`, `thr_l`, `thr_h`, `min_val`, `mid_val`, `max_val`์ ๊ฐ๊ฐ Thresh CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_THRESH_CTRL_T`์ `enMode`, `u8LowThr`, `u8HighThr`, `u8MinVal`, `u8MidVal`, `u8MaxVal` ๊ฐ์
๋๋ค.\n12. **16bit_8bit.json**\n - `mode`, `gain`, `bias`๋ ๊ฐ๊ฐ 16BitTo8Bit CV์ฉ ๊ตฌ์กฐ์ฒด `AX_IVE_16BIT_TO_8BIT_CTRL_T`์ `enMode`, `s1q14Gain`, `s16Bias` ๊ฐ์
๋๋ค.\n13. **crop_resize.json**\n - CropImage๊ฐ ํ์ฑํ๋๋ฉด num์ ๊ตฌ์กฐ์ฒด `AX_IVE_CROP_IMAGE_CTRL_T`์ `u16Num` ๊ฐ์ด๊ณ , boxs๋ ํฌ๋กญ ์ด๋ฏธ์ง์ ๋ฐฐ์ด ํ์
์ด๋ฉฐ, ๊ทธ ์์ `x`, `y`, `w`, `h`๋ ๊ฐ๊ฐ ๊ตฌ์กฐ์ฒด `AX_IVE_RECT_U16_T`์ `u16X`, `u16Y`, `u16Width`, `u16Height` ๊ฐ์
๋๋ค.\n - CropResize ๋๋ CropResizeForSplitYUV ๋ชจ๋๊ฐ ํ์ฑํ๋๋ฉด `num`์ ๊ตฌ์กฐ์ฒด `AX_IVE_CROP_RESIZE_CTRL_T`์ `u16Num` ๊ฐ์ด๊ณ , `align0`, `align1`, `enAlign[1]`, `bcolor`, `w_out`, `h_out`์ ๊ฐ๊ฐ `enAlign[0]`, `enAlign[1]`, `u32BorderColor`, ์ถ๋ ฅ ์ด๋ฏธ์ง์ `width`์ `height` ๊ฐ์
๋๋ค.\n14. **crop_resize2.json**\n - `num`์ ๊ตฌ์กฐ์ฒด `AX_IVE_CROP_IMAGE_CTRL_T`์ `u16Num` ๊ฐ์
๋๋ค.\n - `res_out`์ ์ถ๋ ฅ ์ด๋ฏธ์ง์ ๋๋น์ ๋์ด ๋ฐฐ์ด์
๋๋ค.\n - **`src_boxs`๋ ์์ค ์ด๋ฏธ์ง์ ํฌ๋กญ ์์ญ ๋ฐฐ์ด์ด๊ณ , `dst_boxs`๋ ๋ฆฌ์ฌ์ด์ฆ๋ ์ด๋ฏธ์ง์ ์์ญ ๋ฐฐ์ด์
๋๋ค.**\n15. **matmul.json**\n - `mau_i`, `ddr_rdw`, `en_mul_res`, `en_topn_res`, `order`, `topn`์ ๊ฐ๊ฐ ๊ตฌ์กฐ์ฒด `AX_IVE_MAU_MATMUL_CTRL_T`์ `enMauId`, `s32DdrReadBandwidthLimit`, `bEnableMulRes`, `bEnableTopNRes`, `enOrder`, `s32TopN` ๊ฐ์
๋๋ค.\n - `type_in`์ ๊ตฌ์กฐ์ฒด `AX_IVE_MAU_MATMUL_INPUT_T`์ `stMatQ`์ `stMatB` ๊ฐ์
๋๋ค.\n - `type_mul_res`์ `type_topn_res`๋ ๊ตฌ์กฐ์ฒด `AX_IVE_MAU_MATMUL_OUTPUT_T`์ `stMulRes`์ `sfTopNRes` ๊ฐ์
๋๋ค.\n - `q_shape`์ `b_shape`๋ ๊ตฌ์กฐ์ฒด `AX_IVE_MAU_MATMUL_INPUT_T`์ `stMatQ`์ `stMatB`์ ์๋ `pShape` ๊ฐ์
๋๋ค.",
"prompt": "document",
"tokens": 1024
}
] |