system stringclasses 7
values | input stringlengths 10 94.5k | output stringlengths 14 55.5k |
|---|---|---|
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00099742_00000000-6_cudaTIGammaKernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq... | .text
.file "cudaTIGammaKernel.hip"
.type __hip_cuid_,@object # @__hip_cuid_
.bss
.globl __hip_cuid_
__hip_cuid_:
.byte 0 # 0x0
.size __hip_cuid_, 1
.section ".linker-options","e",@llvm_linker_options
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llv... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | //
// fast_transpose.cu
//
//
// Created by Laura Balasso on 13/05/2019.
//
#include <stdio.h>
#include <stdlib.h>
#define TILE_DIM 32
/* function that fills an array with random doubles */
void random_doubles(double *p, int n) {
int i;
for(i=0; i<n; i++) {
p[i]= ( (double)rand() * 100 ) / (double)RAND_MAX ;
}
}
/* fun... | .file "tmpxft_001ad95e_00000000-6_fast_transpose.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2063:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | //
// fast_transpose.cu
//
//
// Created by Laura Balasso on 13/05/2019.
//
#include <stdio.h>
#include <stdlib.h>
#define TILE_DIM 32
/* function that fills an array with random doubles */
void random_doubles(double *p, int n) {
int i;
for(i=0; i<n; i++) {
p[i]= ( (double)rand() * 100 ) / (double)RAND_MAX ;
}
}
/* fun... | //
// fast_transpose.cu
//
//
// Created by Laura Balasso on 13/05/2019.
//
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#define TILE_DIM 32
/* function that fills an array with random doubles */
void random_doubles(double *p, int n) {
int i;
for(i=0; i<n; i++) {
p[i]= ( (double)rand() * 100 ) / ... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | //
// fast_transpose.cu
//
//
// Created by Laura Balasso on 13/05/2019.
//
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#define TILE_DIM 32
/* function that fills an array with random doubles */
void random_doubles(double *p, int n) {
int i;
for(i=0; i<n; i++) {
p[i]= ( (double)rand() * 100 ) / ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z14fast_transposePdS_i
.globl _Z14fast_transposePdS_i
.p2align 8
.type _Z14fast_transposePdS_i,@function
_Z14fast_transposePdS_i:
s_clause 0x2
s_load_b32 s6, s[0:1], 0x18
s_load_b32 s4, s[0:1], 0x10
s_load_b64 s[2:3], s[0:1], 0x0
v_bfe_u32 v... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | //
// fast_transpose.cu
//
//
// Created by Laura Balasso on 13/05/2019.
//
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#define TILE_DIM 32
/* function that fills an array with random doubles */
void random_doubles(double *p, int n) {
int i;
for(i=0; i<n; i++) {
p[i]= ( (double)rand() * 100 ) / ... | .text
.file "fast_transpose.hip"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function _Z14random_doublesPdi
.LCPI0_0:
.quad 0x4059000000000000 # double 100
.LCPI0_1:
.quad 0x41dfffffffc00000 # double 2147483647
.text
.globl _Z14random_doublesPdi
.... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001ad95e_00000000-6_fast_transpose.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2063:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8... | .text
.file "fast_transpose.hip"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function _Z14random_doublesPdi
.LCPI0_0:
.quad 0x4059000000000000 # double 100
.LCPI0_1:
.quad 0x41dfffffffc00000 # double 2147483647
.text
.globl _Z14random_doublesPdi
.... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
const int N = 1 << 29;
__global__ void vector_add(float *a, float *b, float *out, long n) {
int i = blockDim.x * blockIdx.x + threadIdx.x;
out[i] = a[i] + b[i];
}
int main(int argc, char **args) {
float *a, *b, *out;
float *d_a, *d_b, *d_out;
a = (float*) malloc(sizeof(float) * N);
b = (float*) mallo... | code for sm_80
Function : _Z10vector_addPfS_S_l
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_CTAID.X ; /* 0x0000000000067919 */
/* 0x000e220000002500 */
/*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
const int N = 1 << 29;
__global__ void vector_add(float *a, float *b, float *out, long n) {
int i = blockDim.x * blockIdx.x + threadIdx.x;
out[i] = a[i] + b[i];
}
int main(int argc, char **args) {
float *a, *b, *out;
float *d_a, *d_b, *d_out;
a = (float*) malloc(sizeof(float) * N);
b = (float*) mallo... | .file "tmpxft_001a31ec_00000000-6_hello.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.c... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
const int N = 1 << 29;
__global__ void vector_add(float *a, float *b, float *out, long n) {
int i = blockDim.x * blockIdx.x + threadIdx.x;
out[i] = a[i] + b[i];
}
int main(int argc, char **args) {
float *a, *b, *out;
float *d_a, *d_b, *d_out;
a = (float*) malloc(sizeof(float) * N);
b = (float*) mallo... | #include <hip/hip_runtime.h>
#include <stdio.h>
const int N = 1 << 29;
__global__ void vector_add(float *a, float *b, float *out, long n) {
int i = blockDim.x * blockIdx.x + threadIdx.x;
out[i] = a[i] + b[i];
}
int main(int argc, char **args) {
float *a, *b, *out;
float *d_a, *d_b, *d_out;
a = (float*) malloc(sizeof(fl... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
const int N = 1 << 29;
__global__ void vector_add(float *a, float *b, float *out, long n) {
int i = blockDim.x * blockIdx.x + threadIdx.x;
out[i] = a[i] + b[i];
}
int main(int argc, char **args) {
float *a, *b, *out;
float *d_a, *d_b, *d_out;
a = (float*) malloc(sizeof(fl... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10vector_addPfS_S_l
.globl _Z10vector_addPfS_S_l
.p2align 8
.type _Z10vector_addPfS_S_l,@function
_Z10vector_addPfS_S_l:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x2c
s_load_b128 s[4:7], s[0:1], 0x0
s_load_b64 s[0:1], s[0:1], 0x10
s_waitcnt ... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
const int N = 1 << 29;
__global__ void vector_add(float *a, float *b, float *out, long n) {
int i = blockDim.x * blockIdx.x + threadIdx.x;
out[i] = a[i] + b[i];
}
int main(int argc, char **args) {
float *a, *b, *out;
float *d_a, *d_b, *d_out;
a = (float*) malloc(sizeof(fl... | .text
.file "hello.hip"
.globl _Z25__device_stub__vector_addPfS_S_l # -- Begin function _Z25__device_stub__vector_addPfS_S_l
.p2align 4, 0x90
.type _Z25__device_stub__vector_addPfS_S_l,@function
_Z25__device_stub__vector_addPfS_S_l: # @_Z25__device_stub__vector_addPfS_S_l
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z10vector_addPfS_S_l
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_CTAID.X ; /* 0x0000000000067919 */
/* 0x000e220000002500 */
/*... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10vector_addPfS_S_l
.globl _Z10vector_addPfS_S_l
.p2align 8
.type _Z10vector_addPfS_S_l,@function
_Z10vector_addPfS_S_l:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x2c
s_load_b128 s[4:7], s[0:1], 0x0
s_load_b64 s[0:1], s[0:1], 0x10
s_waitcnt ... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001a31ec_00000000-6_hello.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.c... | .text
.file "hello.hip"
.globl _Z25__device_stub__vector_addPfS_S_l # -- Begin function _Z25__device_stub__vector_addPfS_S_l
.p2align 4, 0x90
.type _Z25__device_stub__vector_addPfS_S_l,@function
_Z25__device_stub__vector_addPfS_S_l: # @_Z25__device_stub__vector_addPfS_S_l
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
// CUDA runtime
#include <cuda_runtime.h>
#define SIZE 100000000
#define THREADS_PER_BLOCK 1024
// Convert and mod
__global__ void add_kernel(uint32_t *d_c, uint32_t *d_a, uint32_t *d_b) {
// compute index = thread index in a block + block index * number of t... | code for sm_80
Function : _Z10add_kernelPjS_S_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_TID.X ; /* 0x0000000000067919 */
/* 0x000e280000002100 */
/*002... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
// CUDA runtime
#include <cuda_runtime.h>
#define SIZE 100000000
#define THREADS_PER_BLOCK 1024
// Convert and mod
__global__ void add_kernel(uint32_t *d_c, uint32_t *d_a, uint32_t *d_b) {
// compute index = thread index in a block + block index * number of t... | .file "tmpxft_000a23d6_00000000-6_main.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
// CUDA runtime
#include <cuda_runtime.h>
#define SIZE 100000000
#define THREADS_PER_BLOCK 1024
// Convert and mod
__global__ void add_kernel(uint32_t *d_c, uint32_t *d_a, uint32_t *d_b) {
// compute index = thread index in a block + block index * number of t... | #include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
// CUDA runtime
#include <hip/hip_runtime.h>
#define SIZE 100000000
#define THREADS_PER_BLOCK 1024
// Convert and mod
__global__ void add_kernel(uint32_t *d_c, uint32_t *d_a, uint32_t *d_b) {
// compute index = thread index in a block + block index * number o... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
// CUDA runtime
#include <hip/hip_runtime.h>
#define SIZE 100000000
#define THREADS_PER_BLOCK 1024
// Convert and mod
__global__ void add_kernel(uint32_t *d_c, uint32_t *d_a, uint32_t *d_b) {
// compute index = thread index in a block + block index * number o... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10add_kernelPjS_S_
.globl _Z10add_kernelPjS_S_
.p2align 8
.type _Z10add_kernelPjS_S_,@function
_Z10add_kernelPjS_S_:
s_load_b32 s2, s[0:1], 0x24
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_alu instid0(SALU_CYCLE_1) | instski... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
// CUDA runtime
#include <hip/hip_runtime.h>
#define SIZE 100000000
#define THREADS_PER_BLOCK 1024
// Convert and mod
__global__ void add_kernel(uint32_t *d_c, uint32_t *d_a, uint32_t *d_b) {
// compute index = thread index in a block + block index * number o... | .text
.file "main.hip"
.globl _Z25__device_stub__add_kernelPjS_S_ # -- Begin function _Z25__device_stub__add_kernelPjS_S_
.p2align 4, 0x90
.type _Z25__device_stub__add_kernelPjS_S_,@function
_Z25__device_stub__add_kernelPjS_S_: # @_Z25__device_stub__add_kernelPjS_S_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_c... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z10add_kernelPjS_S_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_TID.X ; /* 0x0000000000067919 */
/* 0x000e280000002100 */
/*002... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10add_kernelPjS_S_
.globl _Z10add_kernelPjS_S_
.p2align 8
.type _Z10add_kernelPjS_S_,@function
_Z10add_kernelPjS_S_:
s_load_b32 s2, s[0:1], 0x24
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_alu instid0(SALU_CYCLE_1) | instski... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000a23d6_00000000-6_main.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... | .text
.file "main.hip"
.globl _Z25__device_stub__add_kernelPjS_S_ # -- Begin function _Z25__device_stub__add_kernelPjS_S_
.p2align 4, 0x90
.type _Z25__device_stub__add_kernelPjS_S_,@function
_Z25__device_stub__add_kernelPjS_S_: # @_Z25__device_stub__add_kernelPjS_S_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_c... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | // #######################################################
//
// Exemplo (template) de multiplicação de matrizes em CUDA
// Disciplina: OPRP001 - Programação Paralela
// Prof.: Mauricio Pillon
//
// #######################################################
#include <cuda.h>
#include <math.h>
#include <stdio.h>
// Matriz ... | code for sm_80
Function : _Z8dirtyMemPiS_S_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_CTAID.X ; /* 0x0000000000067919 */
/* 0x000e220000002500 */
/*0020... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | // #######################################################
//
// Exemplo (template) de multiplicação de matrizes em CUDA
// Disciplina: OPRP001 - Programação Paralela
// Prof.: Mauricio Pillon
//
// #######################################################
#include <cuda.h>
#include <math.h>
#include <stdio.h>
// Matriz ... | .file "tmpxft_00086d09_00000000-6_matMult.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2062:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | // #######################################################
//
// Exemplo (template) de multiplicação de matrizes em CUDA
// Disciplina: OPRP001 - Programação Paralela
// Prof.: Mauricio Pillon
//
// #######################################################
#include <cuda.h>
#include <math.h>
#include <stdio.h>
// Matriz ... | // #######################################################
//
// Exemplo (template) de multiplicação de matrizes em CUDA
// Disciplina: OPRP001 - Programação Paralela
// Prof.: Mauricio Pillon
//
// #######################################################
#include <hip/hip_runtime.h>
#include <math.h>
#include <stdio.h>... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | // #######################################################
//
// Exemplo (template) de multiplicação de matrizes em CUDA
// Disciplina: OPRP001 - Programação Paralela
// Prof.: Mauricio Pillon
//
// #######################################################
#include <hip/hip_runtime.h>
#include <math.h>
#include <stdio.h>... | .text
.file "matMult.hip"
.globl _Z22__device_stub__matMultPiS_S_ # -- Begin function _Z22__device_stub__matMultPiS_S_
.p2align 4, 0x90
.type _Z22__device_stub__matMultPiS_S_,@function
_Z22__device_stub__matMultPiS_S_: # @_Z22__device_stub__matMultPiS_S_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00086d09_00000000-6_matMult.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2062:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
... | .text
.file "matMult.hip"
.globl _Z22__device_stub__matMultPiS_S_ # -- Begin function _Z22__device_stub__matMultPiS_S_
.p2align 4, 0x90
.type _Z22__device_stub__matMultPiS_S_,@function
_Z22__device_stub__matMultPiS_S_: # @_Z22__device_stub__matMultPiS_S_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void find_maximum_kernel(float *array, int *mutex, unsigned int n, int blockSize){
unsigned int index = threadIdx.x + blockIdx.x*blockDim.x;
unsigned int stride = gridDim.x*blockDim.x;
unsigned int offset = 0;
extern __shared__ float cache[];
float temp = -1.0;
while(index + offset < n)... | code for sm_80
Function : _Z19find_maximum_kernelPfPiji
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void find_maximum_kernel(float *array, int *mutex, unsigned int n, int blockSize){
unsigned int index = threadIdx.x + blockIdx.x*blockDim.x;
unsigned int stride = gridDim.x*blockDim.x;
unsigned int offset = 0;
extern __shared__ float cache[];
float temp = -1.0;
while(index + offset < n)... | .file "tmpxft_0011e96d_00000000-6_find_maximum_kernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
ad... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void find_maximum_kernel(float *array, int *mutex, unsigned int n, int blockSize){
unsigned int index = threadIdx.x + blockIdx.x*blockDim.x;
unsigned int stride = gridDim.x*blockDim.x;
unsigned int offset = 0;
extern __shared__ float cache[];
float temp = -1.0;
while(index + offset < n)... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void find_maximum_kernel(float *array, int *mutex, unsigned int n, int blockSize){
unsigned int index = threadIdx.x + blockIdx.x*blockDim.x;
unsigned int stride = gridDim.x*blockDim.x;
unsigned int offset = 0;
extern __shared__ float cache[];
float temp = -1... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void find_maximum_kernel(float *array, int *mutex, unsigned int n, int blockSize){
unsigned int index = threadIdx.x + blockIdx.x*blockDim.x;
unsigned int stride = gridDim.x*blockDim.x;
unsigned int offset = 0;
extern __shared__ float cache[];
float temp = -1... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z19find_maximum_kernelPfPiji
.globl _Z19find_maximum_kernelPfPiji
.p2align 8
.type _Z19find_maximum_kernelPfPiji,@function
_Z19find_maximum_kernelPfPiji:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x24
s_load_b32 s5, s[0:1], 0x10
s_add_u32 s2, s0, 24
s_a... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void find_maximum_kernel(float *array, int *mutex, unsigned int n, int blockSize){
unsigned int index = threadIdx.x + blockIdx.x*blockDim.x;
unsigned int stride = gridDim.x*blockDim.x;
unsigned int offset = 0;
extern __shared__ float cache[];
float temp = -1... | .text
.file "find_maximum_kernel.hip"
.globl _Z34__device_stub__find_maximum_kernelPfPiji # -- Begin function _Z34__device_stub__find_maximum_kernelPfPiji
.p2align 4, 0x90
.type _Z34__device_stub__find_maximum_kernelPfPiji,@function
_Z34__device_stub__find_maximum_kernelPfPiji: # @_Z34__device_stub__find_maximum_kernel... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z19find_maximum_kernelPfPiji
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/*... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z19find_maximum_kernelPfPiji
.globl _Z19find_maximum_kernelPfPiji
.p2align 8
.type _Z19find_maximum_kernelPfPiji,@function
_Z19find_maximum_kernelPfPiji:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x24
s_load_b32 s5, s[0:1], 0x10
s_add_u32 s2, s0, 24
s_a... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0011e96d_00000000-6_find_maximum_kernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
ad... | .text
.file "find_maximum_kernel.hip"
.globl _Z34__device_stub__find_maximum_kernelPfPiji # -- Begin function _Z34__device_stub__find_maximum_kernelPfPiji
.p2align 4, 0x90
.type _Z34__device_stub__find_maximum_kernelPfPiji,@function
_Z34__device_stub__find_maximum_kernelPfPiji: # @_Z34__device_stub__find_maximum_kernel... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdint.h>
#define MAXN 1024
#define SeqSize 4
__device__ __host__ int CeilDiv(int a, int b) { return (a-1)/b + 1; }
__global__ void myMatrixMul(int N, uint32_t *cuC, uint32_t *cuA, uint32_t *cuTransB){
int tid = blockIdx.x * blockDim.x + threadIdx.x;
if (tid >= N*N) return;
int x = tid / N;... | code for sm_80
Function : _Z11myMatrixAddiPjS_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e220000002500 */
/*0... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdint.h>
#define MAXN 1024
#define SeqSize 4
__device__ __host__ int CeilDiv(int a, int b) { return (a-1)/b + 1; }
__global__ void myMatrixMul(int N, uint32_t *cuC, uint32_t *cuA, uint32_t *cuTransB){
int tid = blockIdx.x * blockDim.x + threadIdx.x;
if (tid >= N*N) return;
int x = tid / N;... | .file "tmpxft_000e96c3_00000000-6_main.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2064:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <stdint.h>
#define MAXN 1024
#define SeqSize 4
__device__ __host__ int CeilDiv(int a, int b) { return (a-1)/b + 1; }
__global__ void myMatrixMul(int N, uint32_t *cuC, uint32_t *cuA, uint32_t *cuTransB){
int tid = blockIdx.x * blockDim.x + threadIdx.x;
if (tid >= N*N) return;
int x = tid / N;... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdint.h>
#define MAXN 1024
#define SeqSize 4
__device__ __host__ int CeilDiv(int a, int b) { return (a-1)/b + 1; }
__global__ void myMatrixMul(int N, uint32_t *cuC, uint32_t *cuA, uint32_t *cuTransB){
int tid = blockIdx.x * blockDim.x + threadIdx.x;
if (tid >= ... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdint.h>
#define MAXN 1024
#define SeqSize 4
__device__ __host__ int CeilDiv(int a, int b) { return (a-1)/b + 1; }
__global__ void myMatrixMul(int N, uint32_t *cuC, uint32_t *cuA, uint32_t *cuTransB){
int tid = blockIdx.x * blockDim.x + threadIdx.x;
if (tid >= ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z11myMatrixMuliPjS_S_
.globl _Z11myMatrixMuliPjS_S_
.p2align 8
.type _Z11myMatrixMuliPjS_S_,@function
_Z11myMatrixMuliPjS_S_:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x2c
s_load_b32 s2, s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_and_b32 s3, s3, 0xffff... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdint.h>
#define MAXN 1024
#define SeqSize 4
__device__ __host__ int CeilDiv(int a, int b) { return (a-1)/b + 1; }
__global__ void myMatrixMul(int N, uint32_t *cuC, uint32_t *cuA, uint32_t *cuTransB){
int tid = blockIdx.x * blockDim.x + threadIdx.x;
if (tid >= ... | .text
.file "main.hip"
.globl _Z7CeilDivii # -- Begin function _Z7CeilDivii
.p2align 4, 0x90
.type _Z7CeilDivii,@function
_Z7CeilDivii: # @_Z7CeilDivii
.cfi_startproc
# %bb.0:
# kill: def $edi killed $edi def $rdi
leal -1(%rdi), %eax
cl... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z11myMatrixAddiPjS_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e220000002500 */
/*0... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z11myMatrixMuliPjS_S_
.globl _Z11myMatrixMuliPjS_S_
.p2align 8
.type _Z11myMatrixMuliPjS_S_,@function
_Z11myMatrixMuliPjS_S_:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x2c
s_load_b32 s2, s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_and_b32 s3, s3, 0xffff... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000e96c3_00000000-6_main.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2064:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... | .text
.file "main.hip"
.globl _Z7CeilDivii # -- Begin function _Z7CeilDivii
.p2align 4, 0x90
.type _Z7CeilDivii,@function
_Z7CeilDivii: # @_Z7CeilDivii
.cfi_startproc
# %bb.0:
# kill: def $edi killed $edi def $rdi
leal -1(%rdi), %eax
cl... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | /*
* Multiplying a 2D matrix using CUDA
*/
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#define BLOCK_SIZE 16
__global__ void gpu_matrix_mul( int *a, int *b, int *c, int m, int n, int k){
int row = blockIdx.y + blockDim.y * threadIdx.y;
int col = blockIdx.x + blockDim.x * threadIdx.x;
int sum = 0;
if(col < ... | code for sm_80
Function : _Z14gpu_matrix_mulPiS_S_iii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R0, SR_TID.X ; /* 0x0000000000007919 */
/* 0x000e280000002100 *... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /*
* Multiplying a 2D matrix using CUDA
*/
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#define BLOCK_SIZE 16
__global__ void gpu_matrix_mul( int *a, int *b, int *c, int m, int n, int k){
int row = blockIdx.y + blockDim.y * threadIdx.y;
int col = blockIdx.x + blockDim.x * threadIdx.x;
int sum = 0;
if(col < ... | .file "tmpxft_0014eb4b_00000000-6_matrix_mul_cuda_2d.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
add... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | /*
* Multiplying a 2D matrix using CUDA
*/
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#define BLOCK_SIZE 16
__global__ void gpu_matrix_mul( int *a, int *b, int *c, int m, int n, int k){
int row = blockIdx.y + blockDim.y * threadIdx.y;
int col = blockIdx.x + blockDim.x * threadIdx.x;
int sum = 0;
if(col < ... | /*
* Multiplying a 2D matrix using CUDA
*/
#include <hip/hip_runtime.h>
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#define BLOCK_SIZE 16
__global__ void gpu_matrix_mul( int *a, int *b, int *c, int m, int n, int k){
int row = blockIdx.y + blockDim.y * threadIdx.y;
int col = blockIdx.x + blockDim.x * thread... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | /*
* Multiplying a 2D matrix using CUDA
*/
#include <hip/hip_runtime.h>
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#define BLOCK_SIZE 16
__global__ void gpu_matrix_mul( int *a, int *b, int *c, int m, int n, int k){
int row = blockIdx.y + blockDim.y * threadIdx.y;
int col = blockIdx.x + blockDim.x * thread... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z14gpu_matrix_mulPiS_S_iii
.globl _Z14gpu_matrix_mulPiS_S_iii
.p2align 8
.type _Z14gpu_matrix_mulPiS_S_iii,@function
_Z14gpu_matrix_mulPiS_S_iii:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x34
s_load_b32 s3, s[0:1], 0x20
s_load_b32 s4, s[0:1], 0x18
v_... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | /*
* Multiplying a 2D matrix using CUDA
*/
#include <hip/hip_runtime.h>
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#define BLOCK_SIZE 16
__global__ void gpu_matrix_mul( int *a, int *b, int *c, int m, int n, int k){
int row = blockIdx.y + blockDim.y * threadIdx.y;
int col = blockIdx.x + blockDim.x * thread... | .text
.file "matrix_mul_cuda_2d.hip"
.globl _Z29__device_stub__gpu_matrix_mulPiS_S_iii # -- Begin function _Z29__device_stub__gpu_matrix_mulPiS_S_iii
.p2align 4, 0x90
.type _Z29__device_stub__gpu_matrix_mulPiS_S_iii,@function
_Z29__device_stub__gpu_matrix_mulPiS_S_iii: # @_Z29__device_stub__gpu_matrix_mulPiS_S_iii
.cfi... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z14gpu_matrix_mulPiS_S_iii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R0, SR_TID.X ; /* 0x0000000000007919 */
/* 0x000e280000002100 *... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z14gpu_matrix_mulPiS_S_iii
.globl _Z14gpu_matrix_mulPiS_S_iii
.p2align 8
.type _Z14gpu_matrix_mulPiS_S_iii,@function
_Z14gpu_matrix_mulPiS_S_iii:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x34
s_load_b32 s3, s[0:1], 0x20
s_load_b32 s4, s[0:1], 0x18
v_... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0014eb4b_00000000-6_matrix_mul_cuda_2d.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
add... | .text
.file "matrix_mul_cuda_2d.hip"
.globl _Z29__device_stub__gpu_matrix_mulPiS_S_iii # -- Begin function _Z29__device_stub__gpu_matrix_mulPiS_S_iii
.p2align 4, 0x90
.type _Z29__device_stub__gpu_matrix_mulPiS_S_iii,@function
_Z29__device_stub__gpu_matrix_mulPiS_S_iii: # @_Z29__device_stub__gpu_matrix_mulPiS_S_iii
.cfi... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | __global__
void broadcast_kernel(int n, const float* x, float *z)
{
int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) z[i] = x[0];
}
void broadcast(int n, const float* x, float *z) {
broadcast_kernel<<<(n+255)/256, 256>>>(n, x, z);
} | code for sm_80
Function : _Z16broadcast_kerneliPKfPf
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e280000002500 ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | __global__
void broadcast_kernel(int n, const float* x, float *z)
{
int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) z[i] = x[0];
}
void broadcast(int n, const float* x, float *z) {
broadcast_kernel<<<(n+255)/256, 256>>>(n, x, z);
} | .file "tmpxft_00187011_00000000-6_broadcast.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2030:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rs... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | __global__
void broadcast_kernel(int n, const float* x, float *z)
{
int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) z[i] = x[0];
}
void broadcast(int n, const float* x, float *z) {
broadcast_kernel<<<(n+255)/256, 256>>>(n, x, z);
} | #include <hip/hip_runtime.h>
__global__
void broadcast_kernel(int n, const float* x, float *z)
{
int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) z[i] = x[0];
}
void broadcast(int n, const float* x, float *z) {
broadcast_kernel<<<(n+255)/256, 256>>>(n, x, z);
} |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
__global__
void broadcast_kernel(int n, const float* x, float *z)
{
int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) z[i] = x[0];
}
void broadcast(int n, const float* x, float *z) {
broadcast_kernel<<<(n+255)/256, 256>>>(n, x, z);
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z16broadcast_kerneliPKfPf
.globl _Z16broadcast_kerneliPKfPf
.p2align 8
.type _Z16broadcast_kerneliPKfPf,@function
_Z16broadcast_kerneliPKfPf:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_and_b32 s2,... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
__global__
void broadcast_kernel(int n, const float* x, float *z)
{
int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) z[i] = x[0];
}
void broadcast(int n, const float* x, float *z) {
broadcast_kernel<<<(n+255)/256, 256>>>(n, x, z);
} | .text
.file "broadcast.hip"
.globl _Z31__device_stub__broadcast_kerneliPKfPf # -- Begin function _Z31__device_stub__broadcast_kerneliPKfPf
.p2align 4, 0x90
.type _Z31__device_stub__broadcast_kerneliPKfPf,@function
_Z31__device_stub__broadcast_kerneliPKfPf: # @_Z31__device_stub__broadcast_kerneliPKfPf
.cfi_startproc
# %... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z16broadcast_kerneliPKfPf
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e280000002500 ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z16broadcast_kerneliPKfPf
.globl _Z16broadcast_kerneliPKfPf
.p2align 8
.type _Z16broadcast_kerneliPKfPf,@function
_Z16broadcast_kerneliPKfPf:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_and_b32 s2,... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00187011_00000000-6_broadcast.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2030:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rs... | .text
.file "broadcast.hip"
.globl _Z31__device_stub__broadcast_kerneliPKfPf # -- Begin function _Z31__device_stub__broadcast_kerneliPKfPf
.p2align 4, 0x90
.type _Z31__device_stub__broadcast_kerneliPKfPf,@function
_Z31__device_stub__broadcast_kerneliPKfPf: # @_Z31__device_stub__broadcast_kerneliPKfPf
.cfi_startproc
# %... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/generate.h>
#include <thrust/sort.h>
#include <thrust/copy.h>
#include <algorithm>
#include <cstdlib>
#include <vector>
struct GpuTimer
{
cudaEvent_t start;
cudaEvent_t stop;
GpuTimer ()
{
cudaEventCreate(&start);
cudaEventCreate(&stop);... | #include <hip/hip_runtime.h>
#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/generate.h>
#include <thrust/sort.h>
#include <thrust/copy.h>
#include <algorithm>
#include <cstdlib>
#include <vector>
struct GpuTimer
{
hipEvent_t start;
hipEvent_t stop;
GpuTimer ()
{
hipEventCreate(&start... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <cuda.h>
void test(int* C, int length);
/***********************/
/* TODO, write KERNEL */
/***********************/
__global__ void VecAdd(int* A, int* B, int* C, int N) {
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id<N){
C[id] = A[id]+B[id];
}
}
int main(int argc, char* argv[]){
int i... | code for sm_80
Function : _Z6VecAddPiS_S_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_CTAID.X ; /* 0x0000000000067919 */
/* 0x000e280000002500 */
/*0020*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <cuda.h>
void test(int* C, int length);
/***********************/
/* TODO, write KERNEL */
/***********************/
__global__ void VecAdd(int* A, int* B, int* C, int N) {
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id<N){
C[id] = A[id]+B[id];
}
}
int main(int argc, char* argv[]){
int i... | .file "tmpxft_000b76bc_00000000-6_vecAdd.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <cuda.h>
void test(int* C, int length);
/***********************/
/* TODO, write KERNEL */
/***********************/
__global__ void VecAdd(int* A, int* B, int* C, int N) {
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id<N){
C[id] = A[id]+B[id];
}
}
int main(int argc, char* argv[]){
int i... | #include <stdio.h>
#include <hip/hip_runtime.h>
void test(int* C, int length);
/***********************/
/* TODO, write KERNEL */
/***********************/
__global__ void VecAdd(int* A, int* B, int* C, int N) {
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id<N){
C[id] = A[id]+B[id];
}
}
int main(int argc, char* arg... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdio.h>
#include <hip/hip_runtime.h>
void test(int* C, int length);
/***********************/
/* TODO, write KERNEL */
/***********************/
__global__ void VecAdd(int* A, int* B, int* C, int N) {
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id<N){
C[id] = A[id]+B[id];
}
}
int main(int argc, char* arg... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6VecAddPiS_S_i
.globl _Z6VecAddPiS_S_i
.p2align 8
.type _Z6VecAddPiS_S_i,@function
_Z6VecAddPiS_S_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s3, s[0:1], 0x18
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_al... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdio.h>
#include <hip/hip_runtime.h>
void test(int* C, int length);
/***********************/
/* TODO, write KERNEL */
/***********************/
__global__ void VecAdd(int* A, int* B, int* C, int N) {
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id<N){
C[id] = A[id]+B[id];
}
}
int main(int argc, char* arg... | .text
.file "vecAdd.hip"
.globl _Z21__device_stub__VecAddPiS_S_i # -- Begin function _Z21__device_stub__VecAddPiS_S_i
.p2align 4, 0x90
.type _Z21__device_stub__VecAddPiS_S_i,@function
_Z21__device_stub__VecAddPiS_S_i: # @_Z21__device_stub__VecAddPiS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset ... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z6VecAddPiS_S_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_CTAID.X ; /* 0x0000000000067919 */
/* 0x000e280000002500 */
/*0020*... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6VecAddPiS_S_i
.globl _Z6VecAddPiS_S_i
.p2align 8
.type _Z6VecAddPiS_S_i,@function
_Z6VecAddPiS_S_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s3, s[0:1], 0x18
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_al... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000b76bc_00000000-6_vecAdd.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.... | .text
.file "vecAdd.hip"
.globl _Z21__device_stub__VecAddPiS_S_i # -- Begin function _Z21__device_stub__VecAddPiS_S_i
.p2align 4, 0x90
.type _Z21__device_stub__VecAddPiS_S_i,@function
_Z21__device_stub__VecAddPiS_S_i: # @_Z21__device_stub__VecAddPiS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | /*
// Cython function from 'thinc' library
class NumpyOps(Ops):
def backprop_max_pool(self, float[:, ::1] d_maxes,
int[:, ::1] which, int[::1] lengths):
cdef int B = lengths.shape[0]
cdef int O = d_maxes.shape[1]
cdef int T = 0
for length in lengths[:B]:
T += length
cdef Pool mem = Pool()
dX = <float*>mem.alloc(T * O, ... | code for sm_80
Function : _Z17backprop_max_poolPfPiS_S0_S0_ii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /*
// Cython function from 'thinc' library
class NumpyOps(Ops):
def backprop_max_pool(self, float[:, ::1] d_maxes,
int[:, ::1] which, int[::1] lengths):
cdef int B = lengths.shape[0]
cdef int O = d_maxes.shape[1]
cdef int T = 0
for length in lengths[:B]:
T += length
cdef Pool mem = Pool()
dX = <float*>mem.alloc(T * O, ... | .file "tmpxft_00026a74_00000000-6_backprop_max_pool.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | /*
// Cython function from 'thinc' library
class NumpyOps(Ops):
def backprop_max_pool(self, float[:, ::1] d_maxes,
int[:, ::1] which, int[::1] lengths):
cdef int B = lengths.shape[0]
cdef int O = d_maxes.shape[1]
cdef int T = 0
for length in lengths[:B]:
T += length
cdef Pool mem = Pool()
dX = <float*>mem.alloc(T * O, ... | #include <hip/hip_runtime.h>
/*
// Cython function from 'thinc' library
class NumpyOps(Ops):
def backprop_max_pool(self, float[:, ::1] d_maxes,
int[:, ::1] which, int[::1] lengths):
cdef int B = lengths.shape[0]
cdef int O = d_maxes.shape[1]
cdef int T = 0
for length in lengths[:B]:
T += length
cdef Pool mem = Pool()
d... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
/*
// Cython function from 'thinc' library
class NumpyOps(Ops):
def backprop_max_pool(self, float[:, ::1] d_maxes,
int[:, ::1] which, int[::1] lengths):
cdef int B = lengths.shape[0]
cdef int O = d_maxes.shape[1]
cdef int T = 0
for length in lengths[:B]:
T += length
cdef Pool mem = Pool()
d... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z17backprop_max_poolPfPiS_S0_S0_ii
.globl _Z17backprop_max_poolPfPiS_S0_S0_ii
.p2align 8
.type _Z17backprop_max_poolPfPiS_S0_S0_ii,@function
_Z17backprop_max_poolPfPiS_S0_S0_ii:
s_load_b32 s18, s[0:1], 0x28
s_waitcnt lgkmcnt(0)
s_cmp_ge_i32 s15, s18
s_c... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
/*
// Cython function from 'thinc' library
class NumpyOps(Ops):
def backprop_max_pool(self, float[:, ::1] d_maxes,
int[:, ::1] which, int[::1] lengths):
cdef int B = lengths.shape[0]
cdef int O = d_maxes.shape[1]
cdef int T = 0
for length in lengths[:B]:
T += length
cdef Pool mem = Pool()
d... | .text
.file "backprop_max_pool.hip"
.globl _Z32__device_stub__backprop_max_poolPfPiS_S0_S0_ii # -- Begin function _Z32__device_stub__backprop_max_poolPfPiS_S0_S0_ii
.p2align 4, 0x90
.type _Z32__device_stub__backprop_max_poolPfPiS_S0_S0_ii,@function
_Z32__device_stub__backprop_max_poolPfPiS_S0_S0_ii: # @_Z32__device_stu... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z17backprop_max_poolPfPiS_S0_S0_ii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z17backprop_max_poolPfPiS_S0_S0_ii
.globl _Z17backprop_max_poolPfPiS_S0_S0_ii
.p2align 8
.type _Z17backprop_max_poolPfPiS_S0_S0_ii,@function
_Z17backprop_max_poolPfPiS_S0_S0_ii:
s_load_b32 s18, s[0:1], 0x28
s_waitcnt lgkmcnt(0)
s_cmp_ge_i32 s15, s18
s_c... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00026a74_00000000-6_backprop_max_pool.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq... | .text
.file "backprop_max_pool.hip"
.globl _Z32__device_stub__backprop_max_poolPfPiS_S0_S0_ii # -- Begin function _Z32__device_stub__backprop_max_poolPfPiS_S0_S0_ii
.p2align 4, 0x90
.type _Z32__device_stub__backprop_max_poolPfPiS_S0_S0_ii,@function
_Z32__device_stub__backprop_max_poolPfPiS_S0_S0_ii: # @_Z32__device_stu... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <iostream>
__global__ void kernel(void)
{
//code
}
int main(void)
{
//code
kernel<<<1,1>>>();
printf("Hello World\n");
return (0);
} | code for sm_80
Function : _Z6kernelv
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ EXIT ; /* 0x000000000000794d */
/* 0x000fea0003800000 */
/*0020*/ BRA 0x20; /* 0xfff... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <iostream>
__global__ void kernel(void)
{
//code
}
int main(void)
{
//code
kernel<<<1,1>>>();
printf("Hello World\n");
return (0);
} | .file "tmpxft_00026c00_00000000-6_SimpleKernel.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3672:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __c... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <iostream>
__global__ void kernel(void)
{
//code
}
int main(void)
{
//code
kernel<<<1,1>>>();
printf("Hello World\n");
return (0);
} | #include <hip/hip_runtime.h>
#include <iostream>
__global__ void kernel(void)
{
//code
}
int main(void)
{
//code
kernel<<<1,1>>>();
printf("Hello World\n");
return (0);
} |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <iostream>
__global__ void kernel(void)
{
//code
}
int main(void)
{
//code
kernel<<<1,1>>>();
printf("Hello World\n");
return (0);
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6kernelv
.globl _Z6kernelv
.p2align 8
.type _Z6kernelv,@function
_Z6kernelv:
s_endpgm
.section .rodata,"a",@progbits
.p2align 6, 0x0
.amdhsa_kernel _Z6kernelv
.amdhsa_group_segment_fixed_size 0
.amdhsa_private_se... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <iostream>
__global__ void kernel(void)
{
//code
}
int main(void)
{
//code
kernel<<<1,1>>>();
printf("Hello World\n");
return (0);
} | .text
.file "SimpleKernel.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z21__device_stub__kernelv # -- Begin function _Z21__device_stub__kernelv
.p2align 4, 0x9... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z6kernelv
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ EXIT ; /* 0x000000000000794d */
/* 0x000fea0003800000 */
/*0020*/ BRA 0x20; /* 0xfff... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6kernelv
.globl _Z6kernelv
.p2align 8
.type _Z6kernelv,@function
_Z6kernelv:
s_endpgm
.section .rodata,"a",@progbits
.p2align 6, 0x0
.amdhsa_kernel _Z6kernelv
.amdhsa_group_segment_fixed_size 0
.amdhsa_private_se... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00026c00_00000000-6_SimpleKernel.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3672:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __c... | .text
.file "SimpleKernel.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z21__device_stub__kernelv # -- Begin function _Z21__device_stub__kernelv
.p2align 4, 0x9... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
const int know_stop_size = 100000 + 10;
vector<int > know_stop_num[know_stop_size], know_stop_len[know_stop_size];
int nlz(unsigned x){
int n;
if (x == 0) return(32);
n = 1;
if ((x >> 16) == 0) {n = n +16; x = x <<16;}
if ((x >> 24) == 0) {n =... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
const int know_stop_size = 100000 + 10;
vector<int > know_stop_num[know_stop_size], know_stop_len[know_stop_size];
int nlz(unsigned x){
int n;
if (x == 0) return(32);
n = 1;
if ((x >> 16) == 0) {n = n +16; x = x <<16;}
if ((x >> 24) == 0) {n =... | .file "tmpxft_00093387_00000000-6_a.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4300:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregist... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
const int know_stop_size = 100000 + 10;
vector<int > know_stop_num[know_stop_size], know_stop_len[know_stop_size];
int nlz(unsigned x){
int n;
if (x == 0) return(32);
n = 1;
if ((x >> 16) == 0) {n = n +16; x = x <<16;}
if ((x >> 24) == 0) {n =... | #include <hip/hip_runtime.h>
#include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
const int know_stop_size = 100000 + 10;
vector<int > know_stop_num[know_stop_size], know_stop_len[know_stop_size];
int nlz(unsigned x){
int n;
if (x == 0) return(32);
n = 1;
if ((x >> 16) == 0) {n = n +16; x = x <<... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
const int know_stop_size = 100000 + 10;
vector<int > know_stop_num[know_stop_size], know_stop_len[know_stop_size];
int nlz(unsigned x){
int n;
if (x == 0) return(32);
n = 1;
if ((x >> 16) == 0) {n = n +16; x = x <<... | .text
.p2alignl 7, 3214868480
.fill 96, 4, 3214868480
.type __hip_cuid_,@object
.section .bss,"aw",@nobits
.globl __hip_cuid_
__hip_cuid_:
.byte 0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
const int know_stop_size = 100000 + 10;
vector<int > know_stop_num[know_stop_size], know_stop_len[know_stop_size];
int nlz(unsigned x){
int n;
if (x == 0) return(32);
n = 1;
if ((x >> 16) == 0) {n = n +16; x = x <<... | .text
.file "a.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.section .text.startup,"ax",@progbits
.p2align 4, 0x90 # -- Begin function __cxx_global_... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80 | .text
.p2alignl 7, 3214868480
.fill 96, 4, 3214868480
.type __hip_cuid_,@object
.section .bss,"aw",@nobits
.globl __hip_cuid_
__hip_cuid_:
.byte 0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /* This is a automatically generated test. Do not modify */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, int var_1,int var_2,float var_3,float var_4,float var_5,float var_6,float var_7,float var_8,float var_9,float var_10,float var_11,float var_12,float var_13,float var_1... | .file "tmpxft_000c4b38_00000000-6_test.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | /* This is a automatically generated test. Do not modify */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, int var_1,int var_2,float var_3,float var_4,float var_5,float var_6,float var_7,float var_8,float var_9,float var_10,float var_11,float var_12,float var_13,float var_1... | /* This is a automatically generated test. Do not modify */
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, int var_1,int var_2,float var_3,float var_4,float var_5,float var_6,float var_7,float var_8,float var_9,float var_10,float var_11,float va... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | /* This is a automatically generated test. Do not modify */
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, int var_1,int var_2,float var_3,float var_4,float var_5,float var_6,float var_7,float var_8,float var_9,float var_10,float var_11,float va... | .text
.file "test.hip"
.globl _Z22__device_stub__computefiifffffffffffffffffffffffffffffffffff # -- Begin function _Z22__device_stub__computefiifffffffffffffffffffffffffffffffffff
.p2align 4, 0x90
.type _Z22__device_stub__computefiifffffffffffffffffffffffffffffffffff,@function
_Z22__device_stub__computefiifffffffffffff... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000c4b38_00000000-6_test.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... | .text
.file "test.hip"
.globl _Z22__device_stub__computefiifffffffffffffffffffffffffffffffffff # -- Begin function _Z22__device_stub__computefiifffffffffffffffffffffffffffffffffff
.p2align 4, 0x90
.type _Z22__device_stub__computefiifffffffffffffffffffffffffffffffffff,@function
_Z22__device_stub__computefiifffffffffffff... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void fix_nan_and_inf_kernel(float *input, size_t size)
{
const int index = blockIdx.x*blockDim.x + threadIdx.x;
if (index < size) {
float val = input[index];
if (isnan(val) || isinf(val))
input[index] = index; // pseudo random value
}
} | code for sm_80
Function : _Z22fix_nan_and_inf_kernelPfm
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void fix_nan_and_inf_kernel(float *input, size_t size)
{
const int index = blockIdx.x*blockDim.x + threadIdx.x;
if (index < size) {
float val = input[index];
if (isnan(val) || isinf(val))
input[index] = index; // pseudo random value
}
} | .file "tmpxft_0016e613_00000000-6_fix_nan_and_inf_kernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void fix_nan_and_inf_kernel(float *input, size_t size)
{
const int index = blockIdx.x*blockDim.x + threadIdx.x;
if (index < size) {
float val = input[index];
if (isnan(val) || isinf(val))
input[index] = index; // pseudo random value
}
} | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void fix_nan_and_inf_kernel(float *input, size_t size)
{
const int index = blockIdx.x*blockDim.x + threadIdx.x;
if (index < size) {
float val = input[index];
if (isnan(val) || isinf(val))
input[index] = index; // pseudo random value
}
} |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void fix_nan_and_inf_kernel(float *input, size_t size)
{
const int index = blockIdx.x*blockDim.x + threadIdx.x;
if (index < size) {
float val = input[index];
if (isnan(val) || isinf(val))
input[index] = index; // pseudo random value
}
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z22fix_nan_and_inf_kernelPfm
.globl _Z22fix_nan_and_inf_kernelPfm
.p2align 8
.type _Z22fix_nan_and_inf_kernelPfm,@function
_Z22fix_nan_and_inf_kernelPfm:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x1c
s_load_b64 s[2:3], s[0:1], 0x8
s_waitcnt lgkmcnt(0)
... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void fix_nan_and_inf_kernel(float *input, size_t size)
{
const int index = blockIdx.x*blockDim.x + threadIdx.x;
if (index < size) {
float val = input[index];
if (isnan(val) || isinf(val))
input[index] = index; // pseudo random value
}
} | .text
.file "fix_nan_and_inf_kernel.hip"
.globl _Z37__device_stub__fix_nan_and_inf_kernelPfm # -- Begin function _Z37__device_stub__fix_nan_and_inf_kernelPfm
.p2align 4, 0x90
.type _Z37__device_stub__fix_nan_and_inf_kernelPfm,@function
_Z37__device_stub__fix_nan_and_inf_kernelPfm: # @_Z37__device_stub__fix_nan_and_inf_... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z22fix_nan_and_inf_kernelPfm
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/*... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z22fix_nan_and_inf_kernelPfm
.globl _Z22fix_nan_and_inf_kernelPfm
.p2align 8
.type _Z22fix_nan_and_inf_kernelPfm,@function
_Z22fix_nan_and_inf_kernelPfm:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x1c
s_load_b64 s[2:3], s[0:1], 0x8
s_waitcnt lgkmcnt(0)
... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0016e613_00000000-6_fix_nan_and_inf_kernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT... | .text
.file "fix_nan_and_inf_kernel.hip"
.globl _Z37__device_stub__fix_nan_and_inf_kernelPfm # -- Begin function _Z37__device_stub__fix_nan_and_inf_kernelPfm
.p2align 4, 0x90
.type _Z37__device_stub__fix_nan_and_inf_kernelPfm,@function
_Z37__device_stub__fix_nan_and_inf_kernelPfm: # @_Z37__device_stub__fix_nan_and_inf_... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <thrust/device_vector.h>
typedef struct
{
size_t length;
double* latitude;
double* longitude;
long* ts;
} trajectory;
typedef struct
{
double latitude;
double longitude;
long ts;
} tpoint;
typedef struct
{
size_t length;
tpoint *buffer;
} swindow;
struct slide
{
size_t num;
swindow *swin;
trajectory traj;
sli... | #include <hip/hip_runtime.h>
#include <thrust/device_vector.h>
typedef struct
{
size_t length;
double* latitude;
double* longitude;
long* ts;
} trajectory;
typedef struct
{
double latitude;
double longitude;
long ts;
} tpoint;
typedef struct
{
size_t length;
tpoint *buffer;
} swindow;
struct slide
{
size_t num;
swindo... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
__global__ void vecadd_cuda(double* a, double* b, double* c, int width) {
int i = blockIdx.x*blockDim.x+threadIdx.x;
if (i < width)
c[i] = a[i] + b[i];
}
int main()
{
int width = 10000000;
double *a = (double*) malloc (width * sizeof(double));
double *b = (double*) malloc (width *... | code for sm_80
Function : _Z11vecadd_cudaPdS_S_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R8, SR_CTAID.X ; /* 0x0000000000087919 */
/* 0x000e280000002500 */
/... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
__global__ void vecadd_cuda(double* a, double* b, double* c, int width) {
int i = blockIdx.x*blockDim.x+threadIdx.x;
if (i < width)
c[i] = a[i] + b[i];
}
int main()
{
int width = 10000000;
double *a = (double*) malloc (width * sizeof(double));
double *b = (double*) malloc (width *... | .file "tmpxft_001a6b6e_00000000-6_mm.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cfi_... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <stdlib.h>
__global__ void vecadd_cuda(double* a, double* b, double* c, int width) {
int i = blockIdx.x*blockDim.x+threadIdx.x;
if (i < width)
c[i] = a[i] + b[i];
}
int main()
{
int width = 10000000;
double *a = (double*) malloc (width * sizeof(double));
double *b = (double*) malloc (width *... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
__global__ void vecadd_cuda(double* a, double* b, double* c, int width) {
int i = blockIdx.x*blockDim.x+threadIdx.x;
if (i < width)
c[i] = a[i] + b[i];
}
int main()
{
int width = 10000000;
double *a = (double*) malloc (width * sizeof(double));
double *... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
__global__ void vecadd_cuda(double* a, double* b, double* c, int width) {
int i = blockIdx.x*blockDim.x+threadIdx.x;
if (i < width)
c[i] = a[i] + b[i];
}
int main()
{
int width = 10000000;
double *a = (double*) malloc (width * sizeof(double));
double *... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z11vecadd_cudaPdS_S_i
.globl _Z11vecadd_cudaPdS_S_i
.p2align 8
.type _Z11vecadd_cudaPdS_S_i,@function
_Z11vecadd_cudaPdS_S_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s3, s[0:1], 0x18
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xfff... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
__global__ void vecadd_cuda(double* a, double* b, double* c, int width) {
int i = blockIdx.x*blockDim.x+threadIdx.x;
if (i < width)
c[i] = a[i] + b[i];
}
int main()
{
int width = 10000000;
double *a = (double*) malloc (width * sizeof(double));
double *... | .text
.file "mm.hip"
.globl _Z26__device_stub__vecadd_cudaPdS_S_i # -- Begin function _Z26__device_stub__vecadd_cudaPdS_S_i
.p2align 4, 0x90
.type _Z26__device_stub__vecadd_cudaPdS_S_i,@function
_Z26__device_stub__vecadd_cudaPdS_S_i: # @_Z26__device_stub__vecadd_cudaPdS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z11vecadd_cudaPdS_S_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R8, SR_CTAID.X ; /* 0x0000000000087919 */
/* 0x000e280000002500 */
/... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z11vecadd_cudaPdS_S_i
.globl _Z11vecadd_cudaPdS_S_i
.p2align 8
.type _Z11vecadd_cudaPdS_S_i,@function
_Z11vecadd_cudaPdS_S_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s3, s[0:1], 0x18
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xfff... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001a6b6e_00000000-6_mm.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cfi_... | .text
.file "mm.hip"
.globl _Z26__device_stub__vecadd_cudaPdS_S_i # -- Begin function _Z26__device_stub__vecadd_cudaPdS_S_i
.p2align 4, 0x90
.type _Z26__device_stub__vecadd_cudaPdS_S_i,@function
_Z26__device_stub__vecadd_cudaPdS_S_i: # @_Z26__device_stub__vecadd_cudaPdS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.