rocm-scribe 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,95 @@
1
+ """
2
+ cuda-scribe -- Automated CUDA-to-AMD GPU kernel translation.
3
+
4
+ Translates CUDA kernels to run on AMD hardware through BridgeIR,
5
+ a universal intermediate representation for GPU computation.
6
+
7
+ Two translation paths:
8
+ 1. CUDA -> Triton (portable: runs on NVIDIA + AMD)
9
+ 2. CUDA -> HIP C++ (AMD native via hipcc)
10
+
11
+ Quick start:
12
+ from cuda_scribe import AMDBridge, hipify
13
+
14
+ bridge = AMDBridge()
15
+ result = bridge.translate(cuda_source)
16
+
17
+ hip_source = hipify(cuda_source)
18
+ """
19
+ __version__ = "1.0.0"
20
+
21
+ from cuda_scribe.amd_bridge import AMDBridge, AMDTranslationResult, TranslationPath
22
+ from cuda_scribe.hipify import hipify, HipifyConfig, HipifyResult, get_translation_coverage
23
+ from cuda_scribe.bridge_ir import (
24
+ BridgeKernel,
25
+ CUDALifter,
26
+ DType,
27
+ HardwareRequirement,
28
+ ParallelPattern,
29
+ translate_universal,
30
+ )
31
+ from cuda_scribe.backends.amd_wavefront_optimizer import (
32
+ AMDArch,
33
+ AMD_SPECS,
34
+ compute_occupancy,
35
+ roofline_analysis,
36
+ optimize_block_size,
37
+ apply_lds_bank_conflict_padding,
38
+ convert_warp_to_wavefront,
39
+ generate_triton_amd_config,
40
+ )
41
+ from cuda_scribe.backends.amd_kernel_optimizer import (
42
+ optimize_hip_kernel,
43
+ OptimizationLevel,
44
+ generate_triton_autotune_configs,
45
+ generate_triton_softmax_amd,
46
+ generate_triton_layernorm_amd,
47
+ generate_triton_rope_amd,
48
+ generate_triton_gemm_amd,
49
+ generate_triton_flash_attention_amd,
50
+ MFMA_INSTRUCTIONS,
51
+ VGPR_OCCUPANCY_TABLE,
52
+ lookup_vgpr_occupancy,
53
+ select_mfma_instruction,
54
+ )
55
+
56
+ __all__ = [
57
+ # Core
58
+ "AMDBridge",
59
+ "AMDTranslationResult",
60
+ "TranslationPath",
61
+ # HIPIFY
62
+ "hipify",
63
+ "HipifyConfig",
64
+ "HipifyResult",
65
+ "get_translation_coverage",
66
+ # BridgeIR
67
+ "BridgeKernel",
68
+ "CUDALifter",
69
+ "DType",
70
+ "HardwareRequirement",
71
+ "ParallelPattern",
72
+ "translate_universal",
73
+ # AMD Hardware
74
+ "AMDArch",
75
+ "AMD_SPECS",
76
+ "compute_occupancy",
77
+ "roofline_analysis",
78
+ "optimize_block_size",
79
+ "apply_lds_bank_conflict_padding",
80
+ "convert_warp_to_wavefront",
81
+ "generate_triton_amd_config",
82
+ # Kernel Optimizer
83
+ "optimize_hip_kernel",
84
+ "OptimizationLevel",
85
+ "generate_triton_autotune_configs",
86
+ "generate_triton_softmax_amd",
87
+ "generate_triton_layernorm_amd",
88
+ "generate_triton_rope_amd",
89
+ "generate_triton_gemm_amd",
90
+ "generate_triton_flash_attention_amd",
91
+ "MFMA_INSTRUCTIONS",
92
+ "VGPR_OCCUPANCY_TABLE",
93
+ "lookup_vgpr_occupancy",
94
+ "select_mfma_instruction",
95
+ ]