Musify MooreThreads

v0.1.0

Convert CUDA code to MUSA (Moore Threads GPU) using the musify tool. Use when migrating CUDA codebases to MUSA platform, converting CUDA kernels/APIs to MUSA...

0· 272·0 current·0 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the instructions: the SKILL.md documents running a musify-text conversion tool over CUDA source files and contains expected options and mappings. There are no unrelated credentials, binaries, or config paths requested.
Instruction Scope
Instructions remain within the conversion task (running musify-text, finding source files, options, exclusion markers). They explicitly include in-place modification operations and batch file selection (find/rg), which is appropriate for a migration tool but increases risk to source if run without backups or vetting. The doc advises backing up code; it does not instruct reading or exfiltrating unrelated system files or credentials.
Install Mechanism
There is no automated install spec in the skill (instruction-only), which limits what is written to disk. The doc suggests pip install ahocorapy and that musify-text should come from the MUSA toolkit; pip-installing introduces normal package-source risk (typo-squatting or malicious package) but that is expected for a tool relying on Python packages.
Credentials
No environment variables, credentials, or config paths are requested. The declared requirements map cleanly to the tool's stated functionality.
Persistence & Privilege
Skill is not marked always:true and is user-invocable only. It does not request persistent platform-wide access or modify other skills' configurations.
Assessment
This SKILL.md is coherent with a code-migration tool, but take these precautions before running it: 1) Do a full backup or ensure version control before using --inplace; prefer --create or printing to stdout for an initial pass. 2) Verify the origin of musify-text and the ahocorapy package (install from official MooreThreads releases or the project's GitHub, not a similarly named pip package). 3) Test conversion on a small subset of files and run the MUSA compiler/tests before committing changes. 4) Avoid running automated bulk commands (find/rg piped into --inplace) until you're confident the mappings and exclusion markers behave as expected.

Like a lobster shell, security has layers — review code before you run it.

latestvk9776rqq19sj00tx7yphcasm3x82998t
272downloads
0stars
1versions
Updated 1mo ago
v0.1.0
MIT-0

Musify - CUDA to MUSA Code Conversion

Musify converts CUDA code to MUSA (Moore Threads GPU architecture) using text-based API mapping.

Installation

# Install dependencies
pip install ahocorapy

# musify-text should be available in MUSA toolkit

Basic Usage

# Convert files in-place (CUDA -> MUSA)
musify-text --inplace -- file1.cu file2.cpp

# Convert and create new files (default)
musify-text --create -- a.cu b.cpp

# Print to stdout
musify-text -t -- file.cu

Batch Conversion

# Find and convert all CUDA/C++ files in directory
musify-text --inplace -- $(find /path/to/project -name '*.cu' -o -name '*.cuh' -o -name '*.cpp' -o -name '*.h')

# Using ripgrep (recommended)
musify-text --inplace -- $(rg --files -g '*.cu' -g '*.cuh' -g '*.cpp' -g '*.h' /path/to/project)

Options

OptionDescription
-t, --terminalPrint output to stdout
-c, --createCreate new files with converted code (default)
-i, --inplaceModify files in-place
-d {c2m,m2c}Conversion direction: c2m (CUDA→MUSA, default), m2c (MUSA→CUDA)
-m <file.json>Custom API mapping file (can specify multiple)
--clear-mappingClear default mapping, use only custom mappings
-l {DEBUG,INFO,WARNING}Log level

Exclusion Markers

Prevent specific code sections from being converted:

// MUSIFY_EXCL_LINE - Exclude this line
char *str = "cudaMalloc"; // MUSIFY_EXCL_LINE

// MUSIFY_EXCL_START - Start exclusion block
char *apis[] = {
    "cudaInit",
    "cudaFree"
};
// MUSIFY_EXCL_STOP - End exclusion block

Common CUDA → MUSA Mappings

CUDAMUSA
cuda prefixmusa prefix
CUDAMUSA
cu prefix (driver API)mu prefix
__cuda__musa
cudaMallocmusaMalloc
cudaFreemusaFree
cudaMemcpymusaMemcpy
cudaLaunchKernelmusaLaunchKernel
__global____global__ (unchanged)
__device____device__ (unchanged)
__shared____shared__ (unchanged)

Workflow

  1. Backup code before conversion
  2. Run musify on target files
  3. Review changes - text-based conversion may need manual fixes
  4. Compile with MUSA compiler (mcc) to verify
  5. Test on MUSA device

References

Comments

Loading comments...