Musify: CUDA to MUSA Migration Tool for Openclaw

A specialized migration tool for converting NVIDIA CUDA source code into Moore Threads MUSA architecture using automated text-based API mapping.

dongyang-mt
v0.1.0
Mar 4, 2026
0
822
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install musify

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install musify using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Musify: CUDA to MUSA Migration Tool?

Musify is a powerful utility designed to bridge the gap between NVIDIA's CUDA platform and the Moore Threads MUSA architecture. As part of the ecosystem of Openclaw Skills, it automates the tedious process of renaming APIs, prefixes, and constants, allowing developers to port high-performance GPU kernels with minimal manual intervention.

By leveraging sophisticated text-based mapping, Musify identifies CUDA-specific patterns and replaces them with their MUSA equivalents. This is essential for developers looking to expand their software's hardware compatibility without rewriting entire libraries from scratch. The tool ensures that the core logic of kernels remains intact while the underlying hardware abstractions are correctly translated for the MUSA toolkit.

Musify: CUDA to MUSA Migration Tool Use Cases

  • Porting existing NVIDIA CUDA kernels to Moore Threads GPUs for high-performance computing.
  • Batch converting legacy C++ and CUDA projects to ensure MUSA compatibility across entire directories.
  • Automating the migration of AI training or inference workloads to alternative hardware architectures.
  • Maintaining dual-platform codebases with bi-directional conversion capabilities between CUDA and MUSA platforms.

How Musify: CUDA to MUSA Migration Tool Works

  1. Source Identification: The tool scans specified directories for source files with .cu, .cuh, .cpp, and .h extensions.
  2. API Mapping Application: It executes a text-based search-and-replace using a dictionary of CUDA to MUSA mappings, such as transforming cudaMalloc to musaMalloc.
  3. Exclusion Logic: The engine respects inline comments and markers to skip specific code segments that require manual preservation.
  4. File Transformation: Depending on the flags provided, Musify either modifies the files in-place or generates new, converted versions.
  5. Post-Processing: Developers review the automated changes and finalize the migration using the MUSA compiler (mcc) for verification.

Musify: CUDA to MUSA Migration Tool Setup

To begin using this tool within the Openclaw Skills framework, ensure you have the MUSA toolkit installed and then install the required Python dependency:

pip install ahocorapy

The musify-text utility will then be available for command-line execution. You can verify the installation by running musify-text --help.

Musify: CUDA to MUSA Migration Tool Data Schema & Taxonomy

Musify processes standard source code files and optional configuration files to manage the migration logic:

Data Element Type Purpose
Source Code Files (.cu, .cpp) The input CUDA code to be converted.
Mapping File JSON Custom API translation rules to extend the default dictionary.
Exclusion Markers Code Comments Inline directives like MUSIFY_EXCL_LINE to prevent conversion.
Logs Text Output DEBUG, INFO, or WARNING level logs regarding the conversion process.

Musify: CUDA to MUSA Migration Tool Advanced Features

  • Support for custom JSON mapping files to handle proprietary or third-party library translations.
  • Bi-directional conversion support allowing for MUSA to CUDA (m2c) migration paths.
  • High-speed batch processing via integration with external tools like ripgrep and find.
  • Granular block-level exclusion markers (START/STOP) for complex code sections that must remain unchanged.
  • In-place file modification for seamless integration into automated build and migration pipelines.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*