一键导入
sdk-gen
Hidden stage for magnetar. Generate customer-facing Python and C++ inference SDKs from model_meta.json and AXMODEL artifacts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Hidden stage for magnetar. Generate customer-facing Python and C++ inference SDKs from model_meta.json and AXMODEL artifacts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Hidden stage for magnetar. Assemble validated AXMODEL, SDKs, reports, and usage documentation into a customer delivery directory.
Convert remote or local AI models into AXera AXMODEL packages with Python and C++ SDKs for customer delivery. Use when Codex must acquire a model from Git/HuggingFace/URL/local path, export ONNX, compile with Pulsar2, simulate/validate AXMODEL accuracy, optionally run on AX hardware, generate SDKs, or package deployment artifacts.
Hidden stage for magnetar. Compile static ONNX to AXMODEL with Pulsar2 and record compile artifacts.
Hidden stage for magnetar. Export the acquired model to static-shape ONNX, validate it against the source model, and generate model_meta.json plus calibration data.
Hidden stage for magnetar. Acquire a remote or local model into TASK_DIR/origin without modifying the source.
Hidden stage for magnetar. Ensure Pulsar2 and the chip-specific C++ BSP/cross-compilation toolchain are available for compile and SDK validation.
| name | sdk-gen |
| description | Hidden stage for magnetar. Generate customer-facing Python and C++ inference SDKs from model_meta.json and AXMODEL artifacts. |
目标:按顺序生成 Python 和 C++ 客户 SDK,分别验证后输出 sdk_report.md。SDK 自带的 README.md 必须详尽到客户无需查看其他文档即可安装环境、编译、运行示例。
目录:TASK_DIR/sdk/python/<model_name>_sdk/
必须包含:
__init__.pyinference.pypreprocess.pypostprocess.pyexample.pyrequirements.txtREADME.md(详见下方 Python SDK README.md)上级目录 TASK_DIR/sdk/python/ 必须包含:
requirements.txt(顶层依赖,如 pyaxengine)README.md(Python SDK 总览,含环境安装和快速运行)实现要求:
pyaxengine 的 axengine.InferenceSession 运行 AXMODEL。AxEngineExecutionProvider;该 provider 不可用时,才允许按 axengine.get_available_providers() 选择 fallback provider,并在报告中记录。requirements.txt 必须说明 pyaxengine 来源:https://github.com/AXERA-TECH/pyaxengine。model_meta.json 读取输入输出信息,不硬编码无法追溯的 shape。python -c "import <model_name>_sdk" 必须通过。ax_run_model 实现 Python SDK 推理。TASK_DIR/sdk/python/README.md 必须包含:
pip install -r requirements.txt 命令。pyaxengine 需从源码安装,给出完整的 git clone + pip install 命令。目录:TASK_DIR/sdk/cpp/
必须包含:
include/src/examples/CMakeLists.txttoolchain-aarch64.cmakeREADME.md(详见下方 C++ SDK README.md)实现要求:
libax_engine.so/libax_sys.so(或厂商包中等价的 libaxengine.so 命名)。AX_RUNTIME_ROOT,目录应包含 include/ 和 lib/。<ModelName>Runner、<ModelName>Classifier 或任务对应命名;AX runtime 的加载、IO 分配和推理封装在类内部。examples/ 中的程序只能实例化 SDK 类并调用公开方法,不应把主要推理逻辑写在 example 里。ax_run_model 实现 C++ SDK 推理。cmake -S . -B build。TASK_DIR/sdk/cpp/README.md 必须包含:
AX_RUNTIME_ROOT。mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
mkdir build_arm && cd build_arm
cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchain-aarch64.cmake -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
LD_LIBRARY_PATH、运行示例。sdk/sdk_report.md。缺失必要 runtime API 信息且无法生成可编译骨架时停止,要求用户提供 SDK 运行时路径或头文件。