|
| 1 | +# Runner Directory Archive Creation Guide |
| 2 | + |
| 3 | +This directory contains test runners and benchmarks for different NPU platforms: `npu3`, `phx`, and `strx`. Each platform has its own subdirectory with specific test configurations and binaries. |
| 4 | + |
| 5 | +## Directory Structure |
| 6 | + |
| 7 | +``` |
| 8 | +runner/ |
| 9 | +├── npu3/ # NPU3 platform tests |
| 10 | +├── phx/ # Phoenix platform tests |
| 11 | +└── strx/ # Strix platform tests |
| 12 | +``` |
| 13 | + |
| 14 | +## Creating Archives |
| 15 | + |
| 16 | +Use the `ar` utility to create archives. **Note**: The `ar` utility preserves directory paths by default and does NOT automatically flatten file structure. |
| 17 | + |
| 18 | +### Platform Archives |
| 19 | + |
| 20 | +```bash |
| 21 | +# Archive all NPU3 subdirectories |
| 22 | +(cd npu3 && find . -type f -print0 | xargs -0 ar -cr xrt_smi_npu3.a) |
| 23 | + |
| 24 | +# Archive all PHX subdirectories |
| 25 | +(cd phx && find . -type f -print0 | xargs -0 ar -cr xrt_smi_phx.a) |
| 26 | + |
| 27 | +# Archive all STRX subdirectories |
| 28 | +(cd strx && find . -type f -print0 | xargs -0 ar -cr xrt_smi_strx.a) |
| 29 | +``` |
| 30 | + |
| 31 | +## File Types in Archives |
| 32 | + |
| 33 | +Each test category typically contains: |
| 34 | +- **ELF files** (`.elf`): Executable binaries for the NPU |
| 35 | +- **JSON files** (`.json`): Configuration profiles and recipes |
| 36 | +- **XCLBIN files** (`.xclbin`): FPGA bitstream files |
| 37 | +- **Archive files** (`.a`): Static library files (XRT SMI) |
| 38 | + |
| 39 | +## Archive Command Options |
| 40 | + |
| 41 | +- `c`: Create archive |
| 42 | +- `r`: Insert files (replace if already exists) |
| 43 | +- The `ar` utility creates archives with all files flattened at the root level |
| 44 | + |
| 45 | +## Notes |
| 46 | + |
| 47 | +- Archives are created in the current working directory |
| 48 | +- Use `ar -t archive_name.a` to list contents of an archive |
| 49 | +- Use `ar -x archive_name.a` to extract all files from an archive |
| 50 | +- All files will be extracted to the current directory without preserving subdirectory structure |
0 commit comments