CASS
Collection
Large-scale dataset and model suite for cross-architecture GPU code transpilation between CUDA and HIP at both source and assembly levels โข 2 items โข Updated โข 5
filename stringlengths 40 40 | cuda_source stringlengths 11 9.01M | cuda_host stringlengths 1.53k 6.65M | cuda_device stringlengths 17 97.4M | hip_source stringlengths 29 9.01M | hip_host stringlengths 407 13.3M | hip_device stringlengths 650 11.7M |
|---|---|---|---|---|---|---|
b3a15a78d50007e98c8062c16758b9532d1808fd | #include "includes.h"
__global__ void vecProductKernel(float *d_z, const float *d_x, const float *d_y, unsigned int N)
{
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx < N) {
d_z[idx] = d_x[idx] * d_y[idx];
}
} | .file "tmpxft_0034da48_00000000-6_vecProductKernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2010:
.cfi_startproc
endbr64
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
jmp __cudaUnregisterFatBinary@PLT
.cfi_endproc
.LFE2010:
.size _ZL2... |
code for sm_89
Function : _Z16vecProductKernelPfPKfS1_j
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM89 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM89)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
... |
#include <hip/hip_runtime.h>
#include "includes.h"
__global__ void vecProductKernel(float *d_z, const float *d_x, const float *d_y, unsigned int N)
{
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx < N) {
d_z[idx] = d_x[idx] * d_y[idx];
}
} | .text
.file "vecProductKernel.hip"
.globl _Z31__device_stub__vecProductKernelPfPKfS1_j # -- Begin function _Z31__device_stub__vecProductKernelPfPKfS1_j
.type _Z31__device_stub__vecProductKernelPfPKfS1_j,@function
_Z31__device_stub__vecProductKernelPfPKfS1_j: # @_Z31__device_stub__vecProductKernelPfPKfS1_j
.cfi_sta... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z16vecProductKernelPfPKfS1_j ; -- Begin function _Z16vecProductKernelPfPKfS1_j
.globl _Z16vecProductKernelPfPKfS1_j
.p2align 8
.type _Z16vecProductKernelPfPKfS1_j,@function
_Z16vecProductKernelPfPKfS1_j: ; @_Z16vecProductKernelPfPKfS1_j
; %bb.... |
911ae2b5f984789fb3d2dd2176af9455423191b9 | #include "includes.h"
__global__ void STREAM_Triad_double(double *a, double *b, double *c, double scalar, size_t len)
{
size_t idx = threadIdx.x + blockIdx.x * blockDim.x;
while (idx < len) {
c[idx] = a[idx]+scalar*b[idx];
idx += blockDim.x * gridDim.x;
}
} | .file "tmpxft_0023237f_00000000-6_STREAM_Triad_double.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2010:
.cfi_startproc
endbr64
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
jmp __cudaUnregisterFatBinary@PLT
.cfi_endproc
.LFE2010:
.size _... |
code for sm_89
Function : _Z19STREAM_Triad_doublePdS_S_dm
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM89 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM89)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
... |
#include <hip/hip_runtime.h>
#include "includes.h"
__global__ void STREAM_Triad_double(double *a, double *b, double *c, double scalar, size_t len)
{
size_t idx = threadIdx.x + blockIdx.x * blockDim.x;
while (idx < len) {
c[idx] = a[idx]+scalar*b[idx];
idx += blockDim.x * gridDim.x;
}
} | .text
.file "STREAM_Triad_double.hip"
.globl _Z34__device_stub__STREAM_Triad_doublePdS_S_dm # -- Begin function _Z34__device_stub__STREAM_Triad_doublePdS_S_dm
.type _Z34__device_stub__STREAM_Triad_doublePdS_S_dm,@function
_Z34__device_stub__STREAM_Triad_doublePdS_S_dm: # @_Z34__device_stub__STREAM_Triad_doublePdS_S... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z19STREAM_Triad_doublePdS_S_dm ; -- Begin function _Z19STREAM_Triad_doublePdS_S_dm
.globl _Z19STREAM_Triad_doublePdS_S_dm
.p2align 8
.type _Z19STREAM_Triad_doublePdS_S_dm,@function
_Z19STREAM_Triad_doublePdS_S_dm: ; @_Z19STREAM_Triad_doublePdS_S... |
837521e6a806e32fd987356451e54b90b08cc7e9 | #include <iostream>
#include "sys/time.h"
using namespace std;
double timeInSeconds (timeval& starttime, timeval& stopstime) {
return 1e-6*(1e6*(stopstime.tv_sec - starttime.tv_sec) + (stopstime.tv_usec - starttime.tv_usec));
}
__device__ double* dev_vector1 = 0;
__device__ double* dev_vector2 = 0;
__device__ dou... | .file "tmpxft_00306950_00000000-6_ex1.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3639:
.cfi_startproc
endbr64
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
jmp __cudaUnregisterFatBinary@PLT
.cfi_endpr... |
code for sm_89
Function : _Z18device_vector_multv
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM89 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM89)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe4000... |
#include <hip/hip_runtime.h>
#include <iostream>
#include "sys/time.h"
using namespace std;
double timeInSeconds (timeval& starttime, timeval& stopstime) {
return 1e-6*(1e6*(stopstime.tv_sec - starttime.tv_sec) + (stopstime.tv_usec - starttime.tv_usec));
}
__device__ double* dev_vector1 = 0;
__device__ double* d... | .text
.file "ex1.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function _Z... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z18device_vector_multv ; -- Begin function _Z18device_vector_multv
.globl _Z18device_vector_multv
.p2align 8
.type _Z18device_vector_multv,@function
_Z18device_vector_multv: ; @_Z18device_vector_multv
; %bb.0:
s_endpgm
.section .rodata... |
ff0fbb2295732037aa8a3a9db2fe5cd1aff64643 | /******************************************************************************
*cr
*cr (C) Copyright 2010 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
*****************************************************************... | .file "tmpxft_0027dfad_00000000-6_kernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2030:
.cfi_startproc
endbr64
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
jmp __cudaUnregisterFatBinary@PLT
.cfi_endproc
.LFE2030:
.size _ZL26__cudaUnr... |
code for sm_89
Function : _Z7mysgemmiiiPKfS0_Pf
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM89 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM89)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
... | /******************************************************************************
*cr
*cr (C) Copyright 2010 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
*****************************************************************... | .text
.file "kernel.hip"
.globl _Z22__device_stub__mysgemmiiiPKfS0_Pf # -- Begin function _Z22__device_stub__mysgemmiiiPKfS0_Pf
.type _Z22__device_stub__mysgemmiiiPKfS0_Pf,@function
_Z22__device_stub__mysgemmiiiPKfS0_Pf: # @_Z22__device_stub__mysgemmiiiPKfS0_Pf
.cfi_startproc
# %bb.0:
pushq %r15
.cfi_def_cfa_of... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z7mysgemmiiiPKfS0_Pf ; -- Begin function _Z7mysgemmiiiPKfS0_Pf
.globl _Z7mysgemmiiiPKfS0_Pf
.p2align 8
.type _Z7mysgemmiiiPKfS0_Pf,@function
_Z7mysgemmiiiPKfS0_Pf: ; @_Z7mysgemmiiiPKfS0_Pf
; %bb.0:
s_clause 0x2
s_load_b64 s[2:3], s... |
6ad19a04ecd9335b5f4fb7ef26924dd9c65416e3 | ///*
// * LinearSysSolver.cpp
// *
// * Created on: Jul 8, 2013
// * Author: adm85
// */
//
//#include <vector>
//#include <iostream>
//#include <time.h>
//#include "LinearSysSolver.h"
//#include "cublas_v2.h"
//#include "cula.h"
//
//
//LinearSysSolver::LinearSysSolver()
//{
// // TODO Auto-generated constructor... | .file "tmpxft_0031dd2a_00000000-6_LinearSysSolver.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2010:
.cfi_startproc
endbr64
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
jmp __cudaUnregisterFatBinary@PLT
.cfi_endproc
.LFE2010:
.size _ZL26... |
code for sm_89
|
#include <hip/hip_runtime.h>
///*
// * LinearSysSolver.cpp
// *
// * Created on: Jul 8, 2013
// * Author: adm85
// */
//
//#include <vector>
//#include <iostream>
//#include <time.h>
//#include "LinearSysSolver.h"
//#include "cublas_v2.h"
//#include "cula.h"
//
//
//LinearSysSolver::LinearSysSolver()
//{
// // T... | .text
.file "LinearSysSolver.hip"
.type __hip_cuid_,@object # @__hip_cuid_
.bss
.globl __hip_cuid_
__hip_cuid_:
.byte 0 # 0x0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c4... | .text
.p2alignl 7, 3214868480
.fill 96, 4, 3214868480
.type __hip_cuid_,@object ; @__hip_cuid_
.section .bss,"aw",@nobits
.globl __hip_cuid_
__hip_cuid_:
.byte 0 ; 0x0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-... |
6e60409b809a9b3d95af04fb128c548d6f031439 | "// Each thread calculates fitness for one individual\n// Result: vector of fitness\n\nextern \"C\"\(...TRUNCATED) | "\t.file\t\"tmpxft_003203be_00000000-6_GPU_fitness_kernel.cudafe1.cpp\"\n\t.text\n#APP\n\n#NO_APP\n\(...TRUNCATED) | "\n\tcode for sm_89\n\t\tFunction : fitness_kernel\n\t.headerflags\t@\"EF_CUDA_TEXMODE_UNIFIED EF_CU(...TRUNCATED) | "\n#include <hip/hip_runtime.h>\n// Each thread calculates fitness for one individual\n// Result: ve(...TRUNCATED) | "\t.text\n\t.file\t\"GPU_fitness_kernel.hip\"\n\t.globl\t__device_stub__fitness_kernel # -- Begin (...TRUNCATED) | "\t.text\n\t.amdgcn_target \"amdgcn-amd-amdhsa--gfx1100\"\n\t.protected\tfitness_kernel ; -(...TRUNCATED) |
4fb84d8d748d067ce16f552a25fc264ef479af55 | "#include \"cuda_runtime.h\"\n#include <cstdio>\n#include \"time.h\"\n\nconstexpr int segment_size =(...TRUNCATED) | "\t.file\t\"tmpxft_00216443_00000000-6_kernel_malloc.cudafe1.cpp\"\n\t.text\n#APP\n\n#NO_APP\n\t.typ(...TRUNCATED) | "\n\tcode for sm_89\n\t\tFunction : _Z4freePPi\n\t.headerflags\t@\"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_6(...TRUNCATED) | "#include \"hip/hip_runtime.h\"\n#include <cstdio>\n#include \"time.h\"\n\nconstexpr int segment_siz(...TRUNCATED) | "\t.text\n\t.file\t\"kernel_malloc.hip\"\n\t.globl\t_Z20__device_stub__allocPPi # -- Begin funct(...TRUNCATED) | "\t.text\n\t.amdgcn_target \"amdgcn-amd-amdhsa--gfx1100\"\n\t.protected\t_Z5allocPPi ; -(...TRUNCATED) |
358cbb1e423d31571cadb665a77ecc827a29f38b | "#include <algorithm>\n#include <iostream>\n#include <vector>\n\nstd::vector<double> add(std::vector(...TRUNCATED) | "\t.file\t\"tmpxft_00394f43_00000000-6_test_add_integ.cudafe1.cpp\"\n\t.text\n#APP\n\t.globl _ZSt21i(...TRUNCATED) |
code for sm_89
| "\n#include <hip/hip_runtime.h>\n#include <algorithm>\n#include <iostream>\n#include <vector>\n\nstd(...TRUNCATED) | "\t.text\n\t.file\t\"test_add_integ.hip\"\n # Start of file s(...TRUNCATED) | "\t.text\n\t.p2alignl 7, 3214868480\n\t.fill 96, 4, 3214868480\n\t.type\t__hip_cuid_,@object (...TRUNCATED) |
5004448f7e4cb8218f1846ad45e3e67a5df0639a | "#include \"Output_Layer_GPU_Kernels.cuh\"\n\n__constant__ float anchors_416[10] = { 1.08, 1.19, 3.(...TRUNCATED) | "\t.file\t\"tmpxft_0021bb74_00000000-6_Output_Layer_GPU_Kernels.cudafe1.cpp\"\n\t.text\n#APP\n\n#NO_(...TRUNCATED) | "\n\tcode for sm_89\n\t\tFunction : _Z14Softmax_KernelPfiii\n\t.headerflags\t@\"EF_CUDA_TEXMODE_UNIF(...TRUNCATED) | "#pragma once\n#include<hip/hip_runtime.h>\n\n#include <math.h>\n\n__device__ const int downsampleFa(...TRUNCATED) | "\t.text\n\t.file\t\"Output_Layer_GPU_Kernels.hip\"\n\t.type\t__hip_cuid_,@object # @__h(...TRUNCATED) | "\t.text\n\t.p2alignl 7, 3214868480\n\t.fill 96, 4, 3214868480\n\t.type\t__hip_cuid_,@object (...TRUNCATED) |
e3a34ffb3f88017edee47d15f3c3892ccf7a7e11 | "#include <stdio.h>\n#include <cuda_runtime.h>\n#include <assert.h>\n\nint main(int argc, char **arg(...TRUNCATED) | "\t.file\t\"tmpxft_002f4d06_00000000-6_lab7.1.cudafe1.cpp\"\n\t.text\n#APP\n\n#NO_APP\n\t.type\t_ZL2(...TRUNCATED) |
code for sm_89
| "#include <stdio.h>\n#include <hip/hip_runtime.h>\n#include <assert.h>\n\nint main(int argc, char **(...TRUNCATED) | "\t.text\n\t.file\t\"lab7.1.hip\"\n\t.globl\tmain # -- Begin function mai(...TRUNCATED) | "\t.text\n\t.p2alignl 7, 3214868480\n\t.fill 96, 4, 3214868480\n\t.type\t__hip_cuid_,@object (...TRUNCATED) |
CASS is the first large-scale dataset for cross-architecture GPU transpilation, providing semantically aligned CUDAโHIP source pairs and their corresponding host/device assemblies for NVIDIA (SASS) and AMD (RDNA3) platforms. It enables research in:
Each sample contains the following fields:
| Field | Description |
|---|---|
filename |
Sample ID or file name |
cuda_source |
Original CUDA source code |
cuda_host |
Compiled x86 host-side assembly from CUDA |
cuda_device |
Compiled SASS (Nvidia GPU) device assembly |
hip_source |
Transpiled HIP source code (via HIPIFY) |
hip_host |
Compiled x86 host-side assembly from HIP |
hip_device |
Compiled RDNA3 (AMD GPU) device assembly |
| Split | Description | # Examples |
|---|---|---|
train |
Union of synth, stack, and opencl |
70,694 |
synth |
LLM-synthesized CUDA programs | 40,591 |
stack |
Scraped and filtered CUDA from StackV2 | 24,170 |
bench |
40 curated eval tasks from 16 GPU domains | 40 |
from datasets import load_dataset
# ๐ง Load the full dataset (default config with all splits)
cass = load_dataset("MBZUAI/cass", name="default")
# Access a specific split
train_data = cass["train"] # train = stack + synth + opencl
stack_data = cass["stack"]
synth_data = cass["synth"]
bench_data = cass["bench"]
The bench split includes 40 samples across 16 domains like:
All samples have been manually verified for semantic equivalence across CUDA and HIP and come with executable device/host binaries.
Released under the MIT license.