system stringclasses 7
values | input stringlengths 10 94.5k | output stringlengths 14 55.5k |
|---|---|---|
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
extern "C" {
/*
#define BLOCK_SIZE 16
__global__ void matrix_multiply(const float* a, size_t lda, const float* b, size_t ldb, float* c, size_t ldc, int n)
{
__shared__ float matA[BLOCK_SIZE][BLOCK_SIZE];
__shared__ float matB[BLOCK_SIZE][BLOCK_SIZE];
const int tidc = threadIdx.x;
const int ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected matrix_multiply_0
.globl matrix_multiply_0
.p2align 8
.type matrix_multiply_0,@function
matrix_multiply_0:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x2c
s_load_b64 s[2:3], s[0:1], 0x18
v_bfe_u32 v2, v0, 10, 10
v_and_b32_e32 v3, 0x3ff, ... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
extern "C" {
/*
#define BLOCK_SIZE 16
__global__ void matrix_multiply(const float* a, size_t lda, const float* b, size_t ldb, float* c, size_t ldc, int n)
{
__shared__ float matA[BLOCK_SIZE][BLOCK_SIZE];
__shared__ float matB[BLOCK_SIZE][BLOCK_SIZE];
const int tidc = threadIdx.x;
const int ... | .text
.file "10-matrix-multiply.hip"
.globl __device_stub__matrix_multiply_0 # -- Begin function __device_stub__matrix_multiply_0
.p2align 4, 0x90
.type __device_stub__matrix_multiply_0,@function
__device_stub__matrix_multiply_0: # @__device_stub__matrix_multiply_0
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000937b3_00000000-6_10-matrix-multiply.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
add... | .text
.file "10-matrix-multiply.hip"
.globl __device_stub__matrix_multiply_0 # -- Begin function __device_stub__matrix_multiply_0
.p2align 4, 0x90
.type __device_stub__matrix_multiply_0,@function
__device_stub__matrix_multiply_0: # @__device_stub__matrix_multiply_0
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | __global__ void reduce_kernel(const int* g_idata, int* g_odata,
unsigned int n) {
extern __shared__ int arr[];
long tid = threadIdx.x;
long idx = (long)blockIdx.x * (long)blockDim.x + tid;
if (idx < n)
arr[tid] = g_idata[idx];
else
arr[tid] = 0;
__syncthreads();
for (long i = blockDim.x / 2; i > 0; i >>= 1) {
if (tid <... | code for sm_80
Function : _Z13reduce_kernelPKiPij
.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 R5, SR_TID.X ; /* 0x0000000000057919 */
/* 0x000e2... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | __global__ void reduce_kernel(const int* g_idata, int* g_odata,
unsigned int n) {
extern __shared__ int arr[];
long tid = threadIdx.x;
long idx = (long)blockIdx.x * (long)blockDim.x + tid;
if (idx < n)
arr[tid] = g_idata[idx];
else
arr[tid] = 0;
__syncthreads();
for (long i = blockDim.x / 2; i > 0; i >>= 1) {
if (tid <... | .file "tmpxft_00107639_00000000-6_reduce.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, %rsp
.... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | __global__ void reduce_kernel(const int* g_idata, int* g_odata,
unsigned int n) {
extern __shared__ int arr[];
long tid = threadIdx.x;
long idx = (long)blockIdx.x * (long)blockDim.x + tid;
if (idx < n)
arr[tid] = g_idata[idx];
else
arr[tid] = 0;
__syncthreads();
for (long i = blockDim.x / 2; i > 0; i >>= 1) {
if (tid <... | #include <hip/hip_runtime.h>
__global__ void reduce_kernel(const int* g_idata, int* g_odata,
unsigned int n) {
extern __shared__ int arr[];
long tid = threadIdx.x;
long idx = (long)blockIdx.x * (long)blockDim.x + tid;
if (idx < n)
arr[tid] = g_idata[idx];
else
arr[tid] = 0;
__syncthreads();
for (long i = blockDim.x / 2... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
__global__ void reduce_kernel(const int* g_idata, int* g_odata,
unsigned int n) {
extern __shared__ int arr[];
long tid = threadIdx.x;
long idx = (long)blockIdx.x * (long)blockDim.x + tid;
if (idx < n)
arr[tid] = g_idata[idx];
else
arr[tid] = 0;
__syncthreads();
for (long i = blockDim.x / 2... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z13reduce_kernelPKiPij
.globl _Z13reduce_kernelPKiPij
.p2align 8
.type _Z13reduce_kernelPKiPij,@function
_Z13reduce_kernelPKiPij:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x24
s_load_b32 s6, s[0:1], 0x10
v_dual_mov_b32 v1, 0 :: v_dual_mov_b32 v4,... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
__global__ void reduce_kernel(const int* g_idata, int* g_odata,
unsigned int n) {
extern __shared__ int arr[];
long tid = threadIdx.x;
long idx = (long)blockIdx.x * (long)blockDim.x + tid;
if (idx < n)
arr[tid] = g_idata[idx];
else
arr[tid] = 0;
__syncthreads();
for (long i = blockDim.x / 2... | .text
.file "reduce.hip"
.globl _Z28__device_stub__reduce_kernelPKiPij # -- Begin function _Z28__device_stub__reduce_kernelPKiPij
.p2align 4, 0x90
.type _Z28__device_stub__reduce_kernelPKiPij,@function
_Z28__device_stub__reduce_kernelPKiPij: # @_Z28__device_stub__reduce_kernelPKiPij
.cfi_startproc
# %bb.0:
subq $104, %... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z13reduce_kernelPKiPij
.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 R5, SR_TID.X ; /* 0x0000000000057919 */
/* 0x000e2... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z13reduce_kernelPKiPij
.globl _Z13reduce_kernelPKiPij
.p2align 8
.type _Z13reduce_kernelPKiPij,@function
_Z13reduce_kernelPKiPij:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x24
s_load_b32 s6, s[0:1], 0x10
v_dual_mov_b32 v1, 0 :: v_dual_mov_b32 v4,... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00107639_00000000-6_reduce.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, %rsp
.... | .text
.file "reduce.hip"
.globl _Z28__device_stub__reduce_kernelPKiPij # -- Begin function _Z28__device_stub__reduce_kernelPKiPij
.p2align 4, 0x90
.type _Z28__device_stub__reduce_kernelPKiPij,@function
_Z28__device_stub__reduce_kernelPKiPij: # @_Z28__device_stub__reduce_kernelPKiPij
.cfi_startproc
# %bb.0:
subq $104, %... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #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__ do... | code for sm_80
Function : _Z23device_vector_simpleAddPdS_
.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_TID.X ; /* 0x0000000000007919 */
/*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #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__ do... | .file "tmpxft_00115af4_00000000-6_ex1b.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3673:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnreg... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #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__ do... | #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* dev... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #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* dev... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z18device_vector_multPdS_S_
.globl _Z18device_vector_multPdS_S_
.p2align 8
.type _Z18device_vector_multPdS_S_,@function
_Z18device_vector_multPdS_S_:
s_load_b128 s[4:7], s[0:1], 0x0
v_lshlrev_b32_e32 v4, 3, v0
s_load_b64 s[0:1], s[0:1], 0x10
s_wa... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #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* dev... | .text
.file "ex1b.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 _Z13timeI... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z23device_vector_simpleAddPdS_
.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_TID.X ; /* 0x0000000000007919 */
/*... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z18device_vector_multPdS_S_
.globl _Z18device_vector_multPdS_S_
.p2align 8
.type _Z18device_vector_multPdS_S_,@function
_Z18device_vector_multPdS_S_:
s_load_b128 s[4:7], s[0:1], 0x0
v_lshlrev_b32_e32 v4, 3, v0
s_load_b64 s[0:1], s[0:1], 0x10
s_wa... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00115af4_00000000-6_ex1b.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3673:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnreg... | .text
.file "ex1b.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 _Z13timeI... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | /** Homework 3 question 1 code
*
* \file q1.cu
* \author Jose Carlos Martinez Garcia-Vaso <carlosgvaso@utexas.edu>
* \author Utkarsh Vardan <uvardan@utexas.edu>
*/
#include <cstdio> // standard I/O
#include <string> // strings
#include <fstream> // streams
#include <vector> // std::vector
#include <sstream> // std::str... | code for sm_80
Function : _Z15lastDigitKernelPiS_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 R4, SR_TID.X ; /* 0x0000000000047919 */
/* 0x000e280000002100 */
/... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | /** Homework 3 question 1 code
*
* \file q1.cu
* \author Jose Carlos Martinez Garcia-Vaso <carlosgvaso@utexas.edu>
* \author Utkarsh Vardan <uvardan@utexas.edu>
*/
#include <cstdio> // standard I/O
#include <string> // strings
#include <fstream> // streams
#include <vector> // std::vector
#include <sstream> // std::str... | /** Homework 3 question 1 code
*
* \file q1.cu
* \author Jose Carlos Martinez Garcia-Vaso <carlosgvaso@utexas.edu>
* \author Utkarsh Vardan <uvardan@utexas.edu>
*/
#include <cstdio> // standard I/O
#include <string> // strings
#include <fstream> // streams
#include <vector> // std::vector
#include <sstream> // std::str... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | /** Homework 3 question 1 code
*
* \file q1.cu
* \author Jose Carlos Martinez Garcia-Vaso <carlosgvaso@utexas.edu>
* \author Utkarsh Vardan <uvardan@utexas.edu>
*/
#include <cstdio> // standard I/O
#include <string> // strings
#include <fstream> // streams
#include <vector> // std::vector
#include <sstream> // std::str... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z21parallelScanMinKernelPiS_i
.globl _Z21parallelScanMinKernelPiS_i
.p2align 8
.type _Z21parallelScanMinKernelPiS_i,@function
_Z21parallelScanMinKernelPiS_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
s_mov_b32 s4, s15
s_w... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z15lastDigitKernelPiS_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 R4, SR_TID.X ; /* 0x0000000000047919 */
/* 0x000e280000002100 */
/... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z21parallelScanMinKernelPiS_i
.globl _Z21parallelScanMinKernelPiS_i
.p2align 8
.type _Z21parallelScanMinKernelPiS_i,@function
_Z21parallelScanMinKernelPiS_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
s_mov_b32 s4, s15
s_w... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | char *title = "Floyd's algorithm";
char *description = "Алгоритм Флойда - поиск всех кратчайших путей в графе";
/*
Алгоритм Флойда является одним из методов поиска кратчайших путей в графе.
В отличии от алгоритма Дейкстры, который позволяет при доведении до конца построить
ориентированное дерево кратчайших путей от ... | code for sm_80
Function : _Z12global_floydPlS_Piii
.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 R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x00... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | char *title = "Floyd's algorithm";
char *description = "Алгоритм Флойда - поиск всех кратчайших путей в графе";
/*
Алгоритм Флойда является одним из методов поиска кратчайших путей в графе.
В отличии от алгоритма Дейкстры, который позволяет при доведении до конца построить
ориентированное дерево кратчайших путей от ... | char *title = "Floyd's algorithm";
char *description = "Алгоритм Флойда - поиск всех кратчайших путей в графе";
/*
Алгоритм Флойда является одним из методов поиска кратчайших путей в графе.
В отличии от алгоритма Дейкстры, который позволяет при доведении до конца построить
ориентированное дерево кратчайших путей от ... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | char *title = "Floyd's algorithm";
char *description = "Алгоритм Флойда - поиск всех кратчайших путей в графе";
/*
Алгоритм Флойда является одним из методов поиска кратчайших путей в графе.
В отличии от алгоритма Дейкстры, который позволяет при доведении до конца построить
ориентированное дерево кратчайших путей от ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z11global_initPlS_Piii
.globl _Z11global_initPlS_Piii
.p2align 8
.type _Z11global_initPlS_Piii,@function
_Z11global_initPlS_Piii:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x2c
s_load_b32 s6, s[0:1], 0x1c
s_add_u32 s2, s0, 32
s_addc_u32 s3, s1, 0
... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z12global_floydPlS_Piii
.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 R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x00... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z11global_initPlS_Piii
.globl _Z11global_initPlS_Piii
.p2align 8
.type _Z11global_initPlS_Piii,@function
_Z11global_initPlS_Piii:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x2c
s_load_b32 s6, s[0:1], 0x1c
s_add_u32 s2, s0, 32
s_addc_u32 s3, s1, 0
... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void cuda_dot(int N, double *a, double *b, double *c)
{
// __shared__ double localDot[threadsPerBlock]; /* Statically defined */
extern __shared__ double localDot[];
int ix = threadIdx.x + blockIdx.x * blockDim.x;
int localIndex = threadIdx.x;
double localSum = 0;
while (ix < N)
{
local... | code for sm_80
Function : _Z8cuda_dotiPdS_S_
.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 */
/* 0x000e2200... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void cuda_dot(int N, double *a, double *b, double *c)
{
// __shared__ double localDot[threadsPerBlock]; /* Statically defined */
extern __shared__ double localDot[];
int ix = threadIdx.x + blockIdx.x * blockDim.x;
int localIndex = threadIdx.x;
double localSum = 0;
while (ix < N)
{
local... | .file "tmpxft_000dd73b_00000000-6_cuda_dot.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 $8, %rsp... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void cuda_dot(int N, double *a, double *b, double *c)
{
// __shared__ double localDot[threadsPerBlock]; /* Statically defined */
extern __shared__ double localDot[];
int ix = threadIdx.x + blockIdx.x * blockDim.x;
int localIndex = threadIdx.x;
double localSum = 0;
while (ix < N)
{
local... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void cuda_dot(int N, double *a, double *b, double *c)
{
// __shared__ double localDot[threadsPerBlock]; /* Statically defined */
extern __shared__ double localDot[];
int ix = threadIdx.x + blockIdx.x * blockDim.x;
int localIndex = threadIdx.x;
double localSu... |
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 cuda_dot(int N, double *a, double *b, double *c)
{
// __shared__ double localDot[threadsPerBlock]; /* Statically defined */
extern __shared__ double localDot[];
int ix = threadIdx.x + blockIdx.x * blockDim.x;
int localIndex = threadIdx.x;
double localSu... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z8cuda_dotiPdS_S_
.globl _Z8cuda_dotiPdS_S_
.p2align 8
.type _Z8cuda_dotiPdS_S_,@function
_Z8cuda_dotiPdS_S_:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x2c
s_load_b32 s8, s[0:1], 0x0
s_add_u32 s4, s0, 32
s_mov_b32 s2, s15
s_addc_u32 s5,... |
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 cuda_dot(int N, double *a, double *b, double *c)
{
// __shared__ double localDot[threadsPerBlock]; /* Statically defined */
extern __shared__ double localDot[];
int ix = threadIdx.x + blockIdx.x * blockDim.x;
int localIndex = threadIdx.x;
double localSu... | .text
.file "cuda_dot.hip"
.globl _Z23__device_stub__cuda_dotiPdS_S_ # -- Begin function _Z23__device_stub__cuda_dotiPdS_S_
.p2align 4, 0x90
.type _Z23__device_stub__cuda_dotiPdS_S_,@function
_Z23__device_stub__cuda_dotiPdS_S_: # @_Z23__device_stub__cuda_dotiPdS_S_
.cfi_startproc
# %bb.0:
subq $120, %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 : _Z8cuda_dotiPdS_S_
.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 */
/* 0x000e2200... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z8cuda_dotiPdS_S_
.globl _Z8cuda_dotiPdS_S_
.p2align 8
.type _Z8cuda_dotiPdS_S_,@function
_Z8cuda_dotiPdS_S_:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x2c
s_load_b32 s8, s[0:1], 0x0
s_add_u32 s4, s0, 32
s_mov_b32 s2, s15
s_addc_u32 s5,... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000dd73b_00000000-6_cuda_dot.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 $8, %rsp... | .text
.file "cuda_dot.hip"
.globl _Z23__device_stub__cuda_dotiPdS_S_ # -- Begin function _Z23__device_stub__cuda_dotiPdS_S_
.p2align 4, 0x90
.type _Z23__device_stub__cuda_dotiPdS_S_,@function
_Z23__device_stub__cuda_dotiPdS_S_: # @_Z23__device_stub__cuda_dotiPdS_S_
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_c... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | /***************************************************
* Module that negs all the elements on a matrix
* Author: Alonso Vidales <alonso.vidales@tras2.es>
*
* To be compiled with nvcc -ptx matrix_remove_bias_top.cu
* Debug: nvcc -arch=sm_20 -ptx matrix_remove_bias_top.cu
*
*************************************************... | code for sm_80
Function : matrixRemoveBiasTop
.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 */
/*0020... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /***************************************************
* Module that negs all the elements on a matrix
* Author: Alonso Vidales <alonso.vidales@tras2.es>
*
* To be compiled with nvcc -ptx matrix_remove_bias_top.cu
* Debug: nvcc -arch=sm_20 -ptx matrix_remove_bias_top.cu
*
*************************************************... | .file "tmpxft_00111a0e_00000000-6_matrix_remove_bias_top.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. | /***************************************************
* Module that negs all the elements on a matrix
* Author: Alonso Vidales <alonso.vidales@tras2.es>
*
* To be compiled with nvcc -ptx matrix_remove_bias_top.cu
* Debug: nvcc -arch=sm_20 -ptx matrix_remove_bias_top.cu
*
*************************************************... | #include <hip/hip_runtime.h>
/***************************************************
* Module that negs all the elements on a matrix
* Author: Alonso Vidales <alonso.vidales@tras2.es>
*
* To be compiled with nvcc -ptx matrix_remove_bias_top.cu
* Debug: nvcc -arch=sm_20 -ptx matrix_remove_bias_top.cu
*
********************... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
/***************************************************
* Module that negs all the elements on a matrix
* Author: Alonso Vidales <alonso.vidales@tras2.es>
*
* To be compiled with nvcc -ptx matrix_remove_bias_top.cu
* Debug: nvcc -arch=sm_20 -ptx matrix_remove_bias_top.cu
*
********************... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected matrixRemoveBiasTop
.globl matrixRemoveBiasTop
.p2align 8
.type matrixRemoveBiasTop,@function
matrixRemoveBiasTop:
s_load_b128 s[4:7], s[0:1], 0x10
v_and_b32_e32 v1, 0x3ff, v0
v_bfe_u32 v0, v0, 10, 10
s_waitcnt lgkmcnt(0)
s_delay_alu ... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
/***************************************************
* Module that negs all the elements on a matrix
* Author: Alonso Vidales <alonso.vidales@tras2.es>
*
* To be compiled with nvcc -ptx matrix_remove_bias_top.cu
* Debug: nvcc -arch=sm_20 -ptx matrix_remove_bias_top.cu
*
********************... | .text
.file "matrix_remove_bias_top.hip"
.globl __device_stub__matrixRemoveBiasTop # -- Begin function __device_stub__matrixRemoveBiasTop
.p2align 4, 0x90
.type __device_stub__matrixRemoveBiasTop,@function
__device_stub__matrixRemoveBiasTop: # @__device_stub__matrixRemoveBiasTop
.cfi_startproc
# %bb.0:
subq $136, %... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : matrixRemoveBiasTop
.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 */
/*0020... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected matrixRemoveBiasTop
.globl matrixRemoveBiasTop
.p2align 8
.type matrixRemoveBiasTop,@function
matrixRemoveBiasTop:
s_load_b128 s[4:7], s[0:1], 0x10
v_and_b32_e32 v1, 0x3ff, v0
v_bfe_u32 v0, v0, 10, 10
s_waitcnt lgkmcnt(0)
s_delay_alu ... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00111a0e_00000000-6_matrix_remove_bias_top.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 "matrix_remove_bias_top.hip"
.globl __device_stub__matrixRemoveBiasTop # -- Begin function __device_stub__matrixRemoveBiasTop
.p2align 4, 0x90
.type __device_stub__matrixRemoveBiasTop,@function
__device_stub__matrixRemoveBiasTop: # @__device_stub__matrixRemoveBiasTop
.cfi_startproc
# %bb.0:
subq $136, %... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <assert.h>
#include <cuda.h>
#include <cuda_runtime.h>
__device__ size_t compare(size_t a, size_t b, bool is_dilatation) {
if (is_dilatation)
return a > b ? a : b;
return a < b ? a : b;
}
__global__... | .file "tmpxft_00133e73_00000000-6_vhgw.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4036:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnreg... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <assert.h>
#include <cuda.h>
#include <cuda_runtime.h>
__device__ size_t compare(size_t a, size_t b, bool is_dilatation) {
if (is_dilatation)
return a > b ? a : b;
return a < b ? a : b;
}
__global__... | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <assert.h>
#include <hip/hip_runtime.h>
__device__ size_t compare(size_t a, size_t b, bool is_dilatation) {
if (is_dilatation)
return a > b ? a : b;
return a < b ? a : b;
}
__global__ void print_cud... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <assert.h>
#include <hip/hip_runtime.h>
__device__ size_t compare(size_t a, size_t b, bool is_dilatation) {
if (is_dilatation)
return a > b ? a : b;
return a < b ? a : b;
}
__global__ void print_cud... | .text
.file "vhgw.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z25__device_stub__print_cudaPmii # -- Begin function _Z25__device_stub__print_cudaPmii
.p2align 4, 0x... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00133e73_00000000-6_vhgw.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4036:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnreg... | .text
.file "vhgw.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z25__device_stub__print_cudaPmii # -- Begin function _Z25__device_stub__print_cudaPmii
.p2align 4, 0x... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
// void AssembleProlMatrix(vector<vector<vector<double>>> &P, vector<vector<size_t>> N, vector<size_t> numNodes, vector<size_t> num_rows, )
int main()
{
vector<vector<size_t>> N;
N.resize(2, vector<size_t>(2));
N[0] = {3, 1};
N[1] = {6, 2};
siz... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
// void AssembleProlMatrix(vector<vector<vector<double>>> &P, vector<vector<size_t>> N, vector<size_t> numNodes, vector<size_t> num_rows, )
int main()
{
vector<vector<size_t>> N;
N.resize(2, vector<size_t>(2));
N[0] = {3, 1};
N[1] = {6, 2};
siz... | #include <hip/hip_runtime.h>
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
// void AssembleProlMatrix(vector<vector<vector<double>>> &P, vector<vector<size_t>> N, vector<size_t> numNodes, vector<size_t> num_rows, )
int main()
{
vector<vector<size_t>> N;
N.resize(2, vector<size_t>(2));
N[0]... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
// void AssembleProlMatrix(vector<vector<vector<double>>> &P, vector<vector<size_t>> N, vector<size_t> numNodes, vector<size_t> num_rows, )
int main()
{
vector<vector<size_t>> N;
N.resize(2, vector<size_t>(2));
N[0]... | .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 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 device assembly. | #include "includes.h"
__global__ void Add(float * x, size_t idx, size_t N, float W0, float W1)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
{
//printf("Adding %f and %f\n",x[(idx-1)*N + i], x[(idx-2)*N + i]);
//printf("idx = %d, N = %d, i = %d\n", idx, N, i);
//printf("%f %f... | code for sm_80
Function : _Z3AddPfmmff
.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 R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e2800000025... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void Add(float * x, size_t idx, size_t N, float W0, float W1)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
{
//printf("Adding %f and %f\n",x[(idx-1)*N + i], x[(idx-2)*N + i]);
//printf("idx = %d, N = %d, i = %d\n", idx, N, i);
//printf("%f %f... | .file "tmpxft_00011269_00000000-6_Add.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 $8, %rsp
.cfi... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void Add(float * x, size_t idx, size_t N, float W0, float W1)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
{
//printf("Adding %f and %f\n",x[(idx-1)*N + i], x[(idx-2)*N + i]);
//printf("idx = %d, N = %d, i = %d\n", idx, N, i);
//printf("%f %f... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void Add(float * x, size_t idx, size_t N, float W0, float W1)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
{
//printf("Adding %f and %f\n",x[(idx-1)*N + i], x[(idx-2)*N + i]);
//printf("idx = %d, N = %d, i = %d\n"... |
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 Add(float * x, size_t idx, size_t N, float W0, float W1)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
{
//printf("Adding %f and %f\n",x[(idx-1)*N + i], x[(idx-2)*N + i]);
//printf("idx = %d, N = %d, i = %d\n"... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3AddPfmmff
.globl _Z3AddPfmmff
.p2align 8
.type _Z3AddPfmmff,@function
_Z3AddPfmmff:
s_clause 0x1
s_load_b32 s6, s[0:1], 0x2c
s_load_b64 s[2:3], s[0:1], 0x10
s_add_u32 s4, s0, 32
s_addc_u32 s5, s1, 0
s_mov_b32 s7, exec... |
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 Add(float * x, size_t idx, size_t N, float W0, float W1)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
{
//printf("Adding %f and %f\n",x[(idx-1)*N + i], x[(idx-2)*N + i]);
//printf("idx = %d, N = %d, i = %d\n"... | .text
.file "Add.hip"
.globl _Z18__device_stub__AddPfmmff # -- Begin function _Z18__device_stub__AddPfmmff
.p2align 4, 0x90
.type _Z18__device_stub__AddPfmmff,@function
_Z18__device_stub__AddPfmmff: # @_Z18__device_stub__AddPfmmff
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset 128
movq %rdi, 7... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z3AddPfmmff
.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 R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e2800000025... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3AddPfmmff
.globl _Z3AddPfmmff
.p2align 8
.type _Z3AddPfmmff,@function
_Z3AddPfmmff:
s_clause 0x1
s_load_b32 s6, s[0:1], 0x2c
s_load_b64 s[2:3], s[0:1], 0x10
s_add_u32 s4, s0, 32
s_addc_u32 s5, s1, 0
s_mov_b32 s7, exec... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00011269_00000000-6_Add.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 $8, %rsp
.cfi... | .text
.file "Add.hip"
.globl _Z18__device_stub__AddPfmmff # -- Begin function _Z18__device_stub__AddPfmmff
.p2align 4, 0x90
.type _Z18__device_stub__AddPfmmff,@function
_Z18__device_stub__AddPfmmff: # @_Z18__device_stub__AddPfmmff
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset 128
movq %rdi, 7... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | /******************************************************************************
*cr
*cr (C) Copyright 2010 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
******************************************************************************/
#define BLOCK_SIZE 512
__global__ void reduction(... | code for sm_80
Function : _Z9reductionPfS_j
.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_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e220000002500 */
/*0020... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /******************************************************************************
*cr
*cr (C) Copyright 2010 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
******************************************************************************/
#define BLOCK_SIZE 512
__global__ void reduction(... | .file "tmpxft_0012211c_00000000-6_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
addq $8, %rsp
.... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | /******************************************************************************
*cr
*cr (C) Copyright 2010 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
******************************************************************************/
#define BLOCK_SIZE 512
__global__ void reduction(... | #include <hip/hip_runtime.h>
/******************************************************************************
*cr
*cr (C) Copyright 2010 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
******************************************************************************/
#define BLOCK_SIZE 5... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
/******************************************************************************
*cr
*cr (C) Copyright 2010 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
******************************************************************************/
#define BLOCK_SIZE 5... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z9reductionPfS_j
.globl _Z9reductionPfS_j
.p2align 8
.type _Z9reductionPfS_j,@function
_Z9reductionPfS_j:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x10
s_load_b64 s[4:5], s[0:1], 0x8
s_lshl_b32 s6, s15, 10
v_mov_b32_e32 v4, 0
v_or_b32... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
/******************************************************************************
*cr
*cr (C) Copyright 2010 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
******************************************************************************/
#define BLOCK_SIZE 5... | .text
.file "kernel.hip"
.globl _Z24__device_stub__reductionPfS_j # -- Begin function _Z24__device_stub__reductionPfS_j
.p2align 4, 0x90
.type _Z24__device_stub__reductionPfS_j,@function
_Z24__device_stub__reductionPfS_j: # @_Z24__device_stub__reductionPfS_j
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_off... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z9reductionPfS_j
.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_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e220000002500 */
/*0020... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z9reductionPfS_j
.globl _Z9reductionPfS_j
.p2align 8
.type _Z9reductionPfS_j,@function
_Z9reductionPfS_j:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x10
s_load_b64 s[4:5], s[0:1], 0x8
s_lshl_b32 s6, s15, 10
v_mov_b32_e32 v4, 0
v_or_b32... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0012211c_00000000-6_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
addq $8, %rsp
.... | .text
.file "kernel.hip"
.globl _Z24__device_stub__reductionPfS_j # -- Begin function _Z24__device_stub__reductionPfS_j
.p2align 4, 0x90
.type _Z24__device_stub__reductionPfS_j,@function
_Z24__device_stub__reductionPfS_j: # @_Z24__device_stub__reductionPfS_j
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_off... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdlib.h>
#include <stdio.h>
// The conventions for pointers is: if the value is stored in the device(GPU) it starts with d_, else if the value is stored
// in the host(CPU) the convention is to start with a h_
__global__ void kernel(float *d_out... | code for sm_80
Function : _Z6kernelPfS_
.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_TID.X ; /* 0x0000000000047919 */
/* 0x000e220000002100 */
/*0020*/ HFM... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdlib.h>
#include <stdio.h>
// The conventions for pointers is: if the value is stored in the device(GPU) it starts with d_, else if the value is stored
// in the host(CPU) the convention is to start with a h_
__global__ void kernel(float *d_out... | .file "tmpxft_00155985_00000000-6_kernel.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
.... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdlib.h>
#include <stdio.h>
// The conventions for pointers is: if the value is stored in the device(GPU) it starts with d_, else if the value is stored
// in the host(CPU) the convention is to start with a h_
__global__ void kernel(float *d_out... | #include "hip/hip_runtime.h"
#include <stdlib.h>
#include <stdio.h>
// The conventions for pointers is: if the value is stored in the device(GPU) it starts with d_, else if the value is stored
// in the host(CPU) the convention is to start with a h_
__global__ void kernel(float *d_out, float *d_in)
{
// Create a funct... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include "hip/hip_runtime.h"
#include <stdlib.h>
#include <stdio.h>
// The conventions for pointers is: if the value is stored in the device(GPU) it starts with d_, else if the value is stored
// in the host(CPU) the convention is to start with a h_
__global__ void kernel(float *d_out, float *d_in)
{
// Create a funct... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6kernelPfS_
.globl _Z6kernelPfS_
.p2align 8
.type _Z6kernelPfS_,@function
_Z6kernelPfS_:
s_load_b128 s[0:3], s[0:1], 0x0
v_lshlrev_b32_e32 v0, 2, v0
s_waitcnt lgkmcnt(0)
global_load_b32 v1, v0, s[2:3]
s_waitcnt vmcnt(0)
... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include "hip/hip_runtime.h"
#include <stdlib.h>
#include <stdio.h>
// The conventions for pointers is: if the value is stored in the device(GPU) it starts with d_, else if the value is stored
// in the host(CPU) the convention is to start with a h_
__global__ void kernel(float *d_out, float *d_in)
{
// Create a funct... | .text
.file "kernel.hip"
.globl _Z21__device_stub__kernelPfS_ # -- Begin function _Z21__device_stub__kernelPfS_
.p2align 4, 0x90
.type _Z21__device_stub__kernelPfS_,@function
_Z21__device_stub__kernelPfS_: # @_Z21__device_stub__kernelPfS_
.cfi_startproc
# %bb.0:
subq $88, %rsp
.cfi_def_cfa_offset 96
movq %rd... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z6kernelPfS_
.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_TID.X ; /* 0x0000000000047919 */
/* 0x000e220000002100 */
/*0020*/ HFM... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6kernelPfS_
.globl _Z6kernelPfS_
.p2align 8
.type _Z6kernelPfS_,@function
_Z6kernelPfS_:
s_load_b128 s[0:3], s[0:1], 0x0
v_lshlrev_b32_e32 v0, 2, v0
s_waitcnt lgkmcnt(0)
global_load_b32 v1, v0, s[2:3]
s_waitcnt vmcnt(0)
... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00155985_00000000-6_kernel.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
.... | .text
.file "kernel.hip"
.globl _Z21__device_stub__kernelPfS_ # -- Begin function _Z21__device_stub__kernelPfS_
.p2align 4, 0x90
.type _Z21__device_stub__kernelPfS_,@function
_Z21__device_stub__kernelPfS_: # @_Z21__device_stub__kernelPfS_
.cfi_startproc
# %bb.0:
subq $88, %rsp
.cfi_def_cfa_offset 96
movq %rd... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void naiveKernel(int N, float *input, float *output){
float res = 0.;
for(int i=0;i<N;++i) res += input[i];
*output = res/N;
} | code for sm_80
Function : _Z11naiveKerneliPfS_
.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*/ IMAD.MOV.U32 R4, RZ, RZ, c[0x0][0x160] ; /* 0x00005800ff0... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void naiveKernel(int N, float *input, float *output){
float res = 0.;
for(int i=0;i<N;++i) res += input[i];
*output = res/N;
} | .file "tmpxft_000a7ef6_00000000-6_naiveKernel.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 $8, %... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void naiveKernel(int N, float *input, float *output){
float res = 0.;
for(int i=0;i<N;++i) res += input[i];
*output = res/N;
} | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void naiveKernel(int N, float *input, float *output){
float res = 0.;
for(int i=0;i<N;++i) res += input[i];
*output = res/N;
} |
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 naiveKernel(int N, float *input, float *output){
float res = 0.;
for(int i=0;i<N;++i) res += input[i];
*output = res/N;
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z11naiveKerneliPfS_
.globl _Z11naiveKerneliPfS_
.p2align 8
.type _Z11naiveKerneliPfS_,@function
_Z11naiveKerneliPfS_:
s_load_b32 s4, s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_cmp_lt_i32 s4, 1
s_cbranch_scc1 .LBB0_3
s_load_b64 s[2:3], s[0:1], ... |
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 naiveKernel(int N, float *input, float *output){
float res = 0.;
for(int i=0;i<N;++i) res += input[i];
*output = res/N;
} | .text
.file "naiveKernel.hip"
.globl _Z26__device_stub__naiveKerneliPfS_ # -- Begin function _Z26__device_stub__naiveKerneliPfS_
.p2align 4, 0x90
.type _Z26__device_stub__naiveKerneliPfS_,@function
_Z26__device_stub__naiveKerneliPfS_: # @_Z26__device_stub__naiveKerneliPfS_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cf... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z11naiveKerneliPfS_
.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*/ IMAD.MOV.U32 R4, RZ, RZ, c[0x0][0x160] ; /* 0x00005800ff0... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z11naiveKerneliPfS_
.globl _Z11naiveKerneliPfS_
.p2align 8
.type _Z11naiveKerneliPfS_,@function
_Z11naiveKerneliPfS_:
s_load_b32 s4, s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_cmp_lt_i32 s4, 1
s_cbranch_scc1 .LBB0_3
s_load_b64 s[2:3], s[0:1], ... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000a7ef6_00000000-6_naiveKernel.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 $8, %... | .text
.file "naiveKernel.hip"
.globl _Z26__device_stub__naiveKerneliPfS_ # -- Begin function _Z26__device_stub__naiveKerneliPfS_
.p2align 4, 0x90
.type _Z26__device_stub__naiveKerneliPfS_,@function
_Z26__device_stub__naiveKerneliPfS_: # @_Z26__device_stub__naiveKerneliPfS_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cf... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include<iostream>
__global__ void add(int a,int b,int *c)
{
*c = a+b;
}
int main()
{
int c;
int *dev_c;
cudaMalloc((void **)&dev_c,sizeof(int));
add<<<1,1>>>(2,7,dev_c);
cudaMemcpy(&c,dev_c,sizeof(int),cudaMemcpyDeviceToHost);
std::cout<<c<<std::endl;
cudaFree(dev_c);
return 0;
} | code for sm_80
Function : _Z3addiiPi
.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*/ IMAD.MOV.U32 R5, RZ, RZ, c[0x0][0x164] ; /* 0x00005900ff057624 */
/... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include<iostream>
__global__ void add(int a,int b,int *c)
{
*c = a+b;
}
int main()
{
int c;
int *dev_c;
cudaMalloc((void **)&dev_c,sizeof(int));
add<<<1,1>>>(2,7,dev_c);
cudaMemcpy(&c,dev_c,sizeof(int),cudaMemcpyDeviceToHost);
std::cout<<c<<std::endl;
cudaFree(dev_c);
return 0;
} | .file "tmpxft_0002fbf7_00000000-6_simple.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 __cudaUnr... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include<iostream>
__global__ void add(int a,int b,int *c)
{
*c = a+b;
}
int main()
{
int c;
int *dev_c;
cudaMalloc((void **)&dev_c,sizeof(int));
add<<<1,1>>>(2,7,dev_c);
cudaMemcpy(&c,dev_c,sizeof(int),cudaMemcpyDeviceToHost);
std::cout<<c<<std::endl;
cudaFree(dev_c);
return 0;
} | #include <hip/hip_runtime.h>
#include<iostream>
__global__ void add(int a,int b,int *c)
{
*c = a+b;
}
int main()
{
int c;
int *dev_c;
hipMalloc((void **)&dev_c,sizeof(int));
add<<<1,1>>>(2,7,dev_c);
hipMemcpy(&c,dev_c,sizeof(int),hipMemcpyDeviceToHost);
std::cout<<c<<std::endl;
hipFree(dev_c);
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 add(int a,int b,int *c)
{
*c = a+b;
}
int main()
{
int c;
int *dev_c;
hipMalloc((void **)&dev_c,sizeof(int));
add<<<1,1>>>(2,7,dev_c);
hipMemcpy(&c,dev_c,sizeof(int),hipMemcpyDeviceToHost);
std::cout<<c<<std::endl;
hipFree(dev_c);
return 0;
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3addiiPi
.globl _Z3addiiPi
.p2align 8
.type _Z3addiiPi,@function
_Z3addiiPi:
s_load_b128 s[0:3], s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_add_i32 s0, s1, s0
s_delay_alu instid0(SALU_CYCLE_1)
v_dual_mov_b32 v0, 0 :: v_dua... |
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 add(int a,int b,int *c)
{
*c = a+b;
}
int main()
{
int c;
int *dev_c;
hipMalloc((void **)&dev_c,sizeof(int));
add<<<1,1>>>(2,7,dev_c);
hipMemcpy(&c,dev_c,sizeof(int),hipMemcpyDeviceToHost);
std::cout<<c<<std::endl;
hipFree(dev_c);
return 0;
} | .text
.file "simple.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z18__device_stub__addiiPi # -- Begin function _Z18__device_stub__addiiPi
.p2align 4, 0x90
.typ... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z3addiiPi
.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*/ IMAD.MOV.U32 R5, RZ, RZ, c[0x0][0x164] ; /* 0x00005900ff057624 */
/... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3addiiPi
.globl _Z3addiiPi
.p2align 8
.type _Z3addiiPi,@function
_Z3addiiPi:
s_load_b128 s[0:3], s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_add_i32 s0, s1, s0
s_delay_alu instid0(SALU_CYCLE_1)
v_dual_mov_b32 v0, 0 :: v_dua... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0002fbf7_00000000-6_simple.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 __cudaUnr... | .text
.file "simple.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z18__device_stub__addiiPi # -- Begin function _Z18__device_stub__addiiPi
.p2align 4, 0x90
.typ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
/**
*
* Function my_gettimeofday()
* Used to compute time of execution
*
**/
double my_gettimeofday(){
struct timeval tmp_time;
gettimeofday(&tmp_time, NULL);
return tmp_time.tv_sec + (tmp_time.tv_usec * 1.0e-6L);
}
/**
*
* Function read_param()
* "l h
* n"
*... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
/**
*
* Function my_gettimeofday()
* Used to compute time of execution
*
**/
double my_gettimeofday(){
struct timeval tmp_time;
gettimeofday(&tmp_time, NULL);
return tmp_time.tv_sec + (tmp_time.tv_usec * 1.0e-6L);
}
/**
*
* Function read_param()
* "l h
* n"
*... | .file "tmpxft_00034955_00000000-6_utils.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
.c... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
/**
*
* Function my_gettimeofday()
* Used to compute time of execution
*
**/
double my_gettimeofday(){
struct timeval tmp_time;
gettimeofday(&tmp_time, NULL);
return tmp_time.tv_sec + (tmp_time.tv_usec * 1.0e-6L);
}
/**
*
* Function read_param()
* "l h
* n"
*... | #include <hip/hip_runtime.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
/**
*
* Function my_gettimeofday()
* Used to compute time of execution
*
**/
double my_gettimeofday(){
struct timeval tmp_time;
gettimeofday(&tmp_time, NULL);
return tmp_time.tv_sec + (tmp_time.tv_usec * 1.0e-6L);
}
/**
*
* Functi... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
/**
*
* Function my_gettimeofday()
* Used to compute time of execution
*
**/
double my_gettimeofday(){
struct timeval tmp_time;
gettimeofday(&tmp_time, NULL);
return tmp_time.tv_sec + (tmp_time.tv_usec * 1.0e-6L);
}
/**
*
* Functi... | .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 <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
/**
*
* Function my_gettimeofday()
* Used to compute time of execution
*
**/
double my_gettimeofday(){
struct timeval tmp_time;
gettimeofday(&tmp_time, NULL);
return tmp_time.tv_sec + (tmp_time.tv_usec * 1.0e-6L);
}
/**
*
* Functi... | .text
.file "utils.hip"
.section .rodata.cst16,"aM",@progbits,16
.p2align 4, 0x0 # -- Begin function _Z15my_gettimeofdayv
.LCPI0_0:
.quad 0x8637bd05af6c69b6 # x86_fp80 1.00000000000000000004E-6
.short 0x3feb
.zero 6
.text
.globl _Z15my_gettimeofdayv
.p2align 4, 0x90
.type _Z15my_ge... |
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 from CUDA host assembly to AMD host assembly. | .file "tmpxft_00034955_00000000-6_utils.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
.c... | .text
.file "utils.hip"
.section .rodata.cst16,"aM",@progbits,16
.p2align 4, 0x0 # -- Begin function _Z15my_gettimeofdayv
.LCPI0_0:
.quad 0x8637bd05af6c69b6 # x86_fp80 1.00000000000000000004E-6
.short 0x3feb
.zero 6
.text
.globl _Z15my_gettimeofdayv
.p2align 4, 0x90
.type _Z15my_ge... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <math.h>
#define N 512
#define MAX_ERR 1
__global__ void vector_add(float *out, float *a, float *b, int n){
int index = threadIdx.x + (blockIdx.x * blockDim.x);
//printf("index: %d\n", index);
for(int i = index; i < n; i+=blockDim.x){
printf("i=%d \n", i);
out[i] = a[i] + b[i];
}
}
int main(... | code for sm_80
Function : _Z10vector_addPfS_S_i
.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 */
/* 0x000fc800078e00ff */
/*0010*/ S2R R18, SR_CTAID.X ; /* 0x0000000000127919 */
/* 0x000e... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <math.h>
#define N 512
#define MAX_ERR 1
__global__ void vector_add(float *out, float *a, float *b, int n){
int index = threadIdx.x + (blockIdx.x * blockDim.x);
//printf("index: %d\n", index);
for(int i = index; i < n; i+=blockDim.x){
printf("i=%d \n", i);
out[i] = a[i] + b[i];
}
}
int main(... | .file "tmpxft_001af61c_00000000-6_vector_add.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, %r... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <math.h>
#define N 512
#define MAX_ERR 1
__global__ void vector_add(float *out, float *a, float *b, int n){
int index = threadIdx.x + (blockIdx.x * blockDim.x);
//printf("index: %d\n", index);
for(int i = index; i < n; i+=blockDim.x){
printf("i=%d \n", i);
out[i] = a[i] + b[i];
}
}
int main(... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <math.h>
#define N 512
#define MAX_ERR 1
__global__ void vector_add(float *out, float *a, float *b, int n){
int index = threadIdx.x + (blockIdx.x * blockDim.x);
//printf("index: %d\n", index);
for(int i = index; i < n; i+=blockDim.x){
printf("i=%d \n", i);
out[i]... |
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 <math.h>
#define N 512
#define MAX_ERR 1
__global__ void vector_add(float *out, float *a, float *b, int n){
int index = threadIdx.x + (blockIdx.x * blockDim.x);
//printf("index: %d\n", index);
for(int i = index; i < n; i+=blockDim.x){
printf("i=%d \n", i);
out[i]... | .text
.file "vector_add.hip"
.globl _Z25__device_stub__vector_addPfS_S_i # -- Begin function _Z25__device_stub__vector_addPfS_S_i
.p2align 4, 0x90
.type _Z25__device_stub__vector_addPfS_S_i,@function
_Z25__device_stub__vector_addPfS_S_i: # @_Z25__device_stub__vector_addPfS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001af61c_00000000-6_vector_add.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, %r... | .text
.file "vector_add.hip"
.globl _Z25__device_stub__vector_addPfS_S_i # -- Begin function _Z25__device_stub__vector_addPfS_S_i
.p2align 4, 0x90
.type _Z25__device_stub__vector_addPfS_S_i,@function
_Z25__device_stub__vector_addPfS_S_i: # @_Z25__device_stub__vector_addPfS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | /*
* Copyright (c) 2020 Yaroslav Pogrebnyak <yyyaroslav@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at... | code for sm_80
Function : Overlay_Cuda
.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 R2, SR_CTAID.Y ; /* 0x0000000000027919 */
/* 0x000e2200000026... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /*
* Copyright (c) 2020 Yaroslav Pogrebnyak <yyyaroslav@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at... | .file "tmpxft_00050c36_00000000-6_vf_overlay_cuda.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. | /*
* Copyright (c) 2020 Yaroslav Pogrebnyak <yyyaroslav@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at... | #include <hip/hip_runtime.h>
/*
* Copyright (c) 2020 Yaroslav Pogrebnyak <yyyaroslav@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versi... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
/*
* Copyright (c) 2020 Yaroslav Pogrebnyak <yyyaroslav@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versi... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected Overlay_Cuda
.globl Overlay_Cuda
.p2align 8
.type Overlay_Cuda,@function
Overlay_Cuda:
s_clause 0x2
s_load_b32 s4, s[0:1], 0x54
s_load_b64 s[6:7], s[0:1], 0x0
s_load_b64 s[2:3], s[0:1], 0x24
v_and_b32_e32 v2, 0x3ff, v0
v... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
/*
* Copyright (c) 2020 Yaroslav Pogrebnyak <yyyaroslav@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versi... | .text
.file "vf_overlay_cuda.hip"
.globl __device_stub__Overlay_Cuda # -- Begin function __device_stub__Overlay_Cuda
.p2align 4, 0x90
.type __device_stub__Overlay_Cuda,@function
__device_stub__Overlay_Cuda: # @__device_stub__Overlay_Cuda
.cfi_startproc
# %bb.0:
subq $184, %rsp
.cfi_def_cfa_offset 192
mov... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : Overlay_Cuda
.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 R2, SR_CTAID.Y ; /* 0x0000000000027919 */
/* 0x000e2200000026... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected Overlay_Cuda
.globl Overlay_Cuda
.p2align 8
.type Overlay_Cuda,@function
Overlay_Cuda:
s_clause 0x2
s_load_b32 s4, s[0:1], 0x54
s_load_b64 s[6:7], s[0:1], 0x0
s_load_b64 s[2:3], s[0:1], 0x24
v_and_b32_e32 v2, 0x3ff, v0
v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.