Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计提醒

musa-torch-coding穆萨火炬编码

Agent Skill

musa-torch-coding 用于处理音频、语音、转写和声音素材相关任务,适合在 OpenClaw 中需要整理音频流程、转写内容或生成配音素材时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

7,662

周安装

313

GitHub Stars

公开资料未说明

下载量

2,454
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:musa-torch-coding(穆萨火炬编码)
来源仓库:https://github.com/lipeidcc/musa-torch-coding
安装命令:
openclaw skills install musa-torch-coding
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install musa-torch-coding

简介

musa-torch-coding 通过 OpenAI Whisper API 实现音频转录功能。

  • 适用于语音转文字、播客字幕生成等音频处理任务。
  • 通过 openclaw skills install musa-torch-coding 安装使用。
  • 注意音频时长限制和 API 配额管理。
  • 适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。

SKILL.md

name
musa-torch-coding
description
Transcribe audio via OpenAI Audio Transcriptions API (Whisper).
homepage
https://platform.openai.com/docs/guides/speech-to-text
metadata

MUSA Torch Coding

Guide for generating PyTorch code that runs on Moore Threads (摩尔线程) MUSA GPUs using torch_musa.

Overview

MUSA (Metaverse Unified System Architecture) is Moore Threads' GPU computing platform. This skill helps generate code that:

  • Runs on Moore Threads GPUs via torch_musa
  • Converts CUDA code to MUSA-compatible code
  • Sets up proper environments (conda v1.2/v1.3)
  • Follows MUSA best practices

Key Differences: CUDA vs MUSA

CUDAMUSA
torch.cudatorch.musa
torch.device("cuda")torch.device("musa")
torch.cuda.is_available()torch.musa.is_available()
backend='nccl'backend='mccl'
torch.cuda.device_count()torch.musa.device_count()
torch.cuda.get_device_name()torch.musa.get_device_name()

Environment Setup

⚠️ Important: MUSA Uses Pre-configured Conda Environments

DO NOT install PyTorch, vLLM, or related packages manually. MUSA environments are custom-built and include:

  • MUSA-specific PyTorch builds (not compatible with standard PyTorch)
  • MUSA-customized vLLM versions
  • MUSA drivers and SDK integration

Installing standard packages from PyPI will break the environment.

Conda Environment (v1.2/v1.3)

MUSA provides pre-configured conda environments. Common environment names:

  • v1.2 - MUSA SDK v1.2 environment
  • v1.3 - MUSA SDK v1.3 environment (newer)
# List available MUSA environments
conda env list | grep -E "(v1\.2|v1\.3|musa)"

# Activate the appropriate environment
conda activate v1.2  # or v1.3

# Verify MUSA availability
python -c "import torch_musa; import torch; print(torch.musa.is_available())"

Environment Detection & Setup

If no MUSA conda environment is detected:

  1. Check if MUSA is installed:
   which musaInfo  # Should show musaInfo path
   ls /usr/local/musa/  # MUSA SDK location
  1. If MUSA is not set up:

- Use the musa-env-setup skill for complete environment installation - The skill covers SDK installation, conda setup, and vLLM-MUSA configuration

  1. Common conda environment locations:

- /opt/conda/envs/ - ~/conda/envs/ - /usr/local/conda/envs/

Key Environment Variables

VariablePurpose
MUSA_VISIBLE_DEVICES=0,1,2,3Control visible GPU IDs
MUSA_LAUNCH_BLOCKING=1Synchronous kernel launch
MUDNN_LOG_LEVEL=INFOEnable MUDNN logging
TORCH_SHOW_CPP_STACKTRACES=1Show C++ stack traces

Code Generation Rules

When generating PyTorch code for MUSA:

  1. Always import torch_musa
   import torch_musa  # Must import before using torch.musa
  1. Use torch.device("musa")
   device = torch.device("musa") if torch.musa.is_available() else torch.device("cpu")
   tensor = torch.tensor([1.0, 2.0], device=device)
  1. Use 'mccl' for distributed training
   dist.init_process_group(backend='mccl', ...)
  1. Mixed precision (AMP) is supported
   from torch.cuda.amp import autocast, GradScaler  # Same API
  1. TensorCore optimization available

- Set torch.backends.musa.matmul.allow_tf32 = True for TensorFloat32

Model Templates

For common model types, see templates in references/:

  • reference.md - Complete MUSA API reference

Common Tasks

Check GPU Availability

import torch
import torch_musa

print(f"MUSA available: {torch.musa.is_available()}")
print(f"Device count: {torch.musa.device_count()}")
print(f"Device name: {torch.musa.get_device_name(0)}")

Training Loop Pattern

import torch_musa

# Device setup
device = torch.device("musa") if torch.musa.is_available() else torch.device("cpu")

# Model and data to device
model = model.to(device)
inputs = inputs.to(device)

# Training (same as CUDA)
optimizer.zero_grad()
outputs = model(inputs)
loss = criterion(outputs, targets)
loss.backward()
optimizer.step()

Distributed Training (DDP)

import torch.distributed as dist
import torch_musa

# Initialize with mccl backend
dist.init_process_group(backend='mccl', rank=rank, world_size=world_size)

# Create process group on MUSA
torch.cuda.set_device(local_rank)  # torch_musa extends torch.cuda API

Code Conversion

When converting existing CUDA code to MUSA:

  1. Add import torch_musa at the top
  2. Replace cuda with musa in device strings
  3. Replace nccl with mccl for distributed backend
  4. Keep all other PyTorch API calls unchanged

Troubleshooting

  • Device not found: Ensure user is in render group: sudo usermod -aG render $(whoami)
  • Library not found: Check LD_LIBRARY_PATH includes /usr/local/musa/lib/
  • Build issues: Clean and rebuild: python setup.py clean && bash build.sh
  • Docker issues: Use --env MTHREADS_VISIBLE_DEVICES=all

Reference

For detailed API reference and examples, see references/reference.md.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

96.42%
按下载量换算2,366

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills