jonpark0's picture
Add EmbeddingGemma 2 converted for the AX650 / AX8850 NPU
9037c05 verified
Raw History Blame Contribute Delete
39.1 kB
[
{
"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
}
]