Specialize a Kernel#
You can use either VSCode (and Copilot), Claude Code, or OpenClaw to migrate CUDA-implemented operators to Huawei Ascend.
To specialize a Kernel, a typical prompt should include the following mandatory and optional elements: Operator name(mandatory)and task description (mandatory).
Make sure you read the prerequisites.
Steps#
If you haven’t connected to the KernelGen Operator Development MCP Toolkit and load skills, see KernelGen Skills User Guide, otherwise use one of the following methods to invoke the kernelgen-flagos skill and specialize a Kernel:
Option 1: Use the slash command and prompt
/kernelgen-flagos Migrate the CUDA-implemented operator fused/silu_and_mul.py to the Ascend chip, with the operator file stored in the FlagGems repository, and the directory is _ascend/fused/silu_and_mul.py, ensuring that the accuracy verification passes.
Option 2: Completely use prompt
Use kernelgen-flagos to migrate the CUDA-implemented operator fused/silu_and_mul.py to the Ascend chip, with the operator file stored in the FlagGems repository, and the directory is _ascend/fused/silu_and_mul.py, ensuring that the accuracy verification passes.