system stringclasses 7
values | input stringlengths 10 94.5k | output stringlengths 14 55.5k |
|---|---|---|
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void matrixAddKernel1(float* ans, float* M, float* N, int size) {
int row = blockIdx.y*blockDim.y + threadIdx.y;
int col = blockIdx.x*blockDim.x + threadIdx.x;
if((row < size) && (col < size)) {
ans[row*size + col] = M[row*size + col] + N[row*size + col];
}
} | .file "tmpxft_0002ee25_00000000-6_matrixAddKernel1.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. | #include "includes.h"
__global__ void matrixAddKernel1(float* ans, float* M, float* N, int size) {
int row = blockIdx.y*blockDim.y + threadIdx.y;
int col = blockIdx.x*blockDim.x + threadIdx.x;
if((row < size) && (col < size)) {
ans[row*size + col] = M[row*size + col] + N[row*size + col];
}
} | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void matrixAddKernel1(float* ans, float* M, float* N, int size) {
int row = blockIdx.y*blockDim.y + threadIdx.y;
int col = blockIdx.x*blockDim.x + threadIdx.x;
if((row < size) && (col < size)) {
ans[row*size + col] = M[row*size + col] + N[row*size + col];
}
... |
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 matrixAddKernel1(float* ans, float* M, float* N, int size) {
int row = blockIdx.y*blockDim.y + threadIdx.y;
int col = blockIdx.x*blockDim.x + threadIdx.x;
if((row < size) && (col < size)) {
ans[row*size + col] = M[row*size + col] + N[row*size + col];
}
... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z16matrixAddKernel1PfS_S_i
.globl _Z16matrixAddKernel1PfS_S_i
.p2align 8
.type _Z16matrixAddKernel1PfS_S_i,@function
_Z16matrixAddKernel1PfS_S_i:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x2c
s_load_b32 s2, s[0:1], 0x18
v_bfe_u32 v2, v0, 10, 10
v_and... |
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 matrixAddKernel1(float* ans, float* M, float* N, int size) {
int row = blockIdx.y*blockDim.y + threadIdx.y;
int col = blockIdx.x*blockDim.x + threadIdx.x;
if((row < size) && (col < size)) {
ans[row*size + col] = M[row*size + col] + N[row*size + col];
}
... | .text
.file "matrixAddKernel1.hip"
.globl _Z31__device_stub__matrixAddKernel1PfS_S_i # -- Begin function _Z31__device_stub__matrixAddKernel1PfS_S_i
.p2align 4, 0x90
.type _Z31__device_stub__matrixAddKernel1PfS_S_i,@function
_Z31__device_stub__matrixAddKernel1PfS_S_i: # @_Z31__device_stub__matrixAddKernel1PfS_S_i
.cfi_s... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z16matrixAddKernel1PfS_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 R3, SR_CTAID.X ; /* 0x0000000000037919 */
/* 0x000e280000002500... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z16matrixAddKernel1PfS_S_i
.globl _Z16matrixAddKernel1PfS_S_i
.p2align 8
.type _Z16matrixAddKernel1PfS_S_i,@function
_Z16matrixAddKernel1PfS_S_i:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x2c
s_load_b32 s2, s[0:1], 0x18
v_bfe_u32 v2, v0, 10, 10
v_and... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0002ee25_00000000-6_matrixAddKernel1.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 "matrixAddKernel1.hip"
.globl _Z31__device_stub__matrixAddKernel1PfS_S_i # -- Begin function _Z31__device_stub__matrixAddKernel1PfS_S_i
.p2align 4, 0x90
.type _Z31__device_stub__matrixAddKernel1PfS_S_i,@function
_Z31__device_stub__matrixAddKernel1PfS_S_i: # @_Z31__device_stub__matrixAddKernel1PfS_S_i
.cfi_s... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include<iostream>
#define SECTION_SIZE 32
using namespace std;
__global__ void Prefix_sum_oneblock_kernel(float *X, float *Y, int InputSize, float *S) {
__shared__ float XY[SECTION_SIZE];
int i = blockIdx.x*blockDim.x+ threadIdx.x;
XY[threadIdx.x] = X[i];
/*if (i < InputSize && threadIdx.x != 0) {
XY[threadIdx.x] = X[... | code for sm_80
Function : _Z23Add_scalar_to_subvectorPfS_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 R2, SR_CTAID.X ; /* 0x0000000000027919 */
/* 0x000e2800000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include<iostream>
#define SECTION_SIZE 32
using namespace std;
__global__ void Prefix_sum_oneblock_kernel(float *X, float *Y, int InputSize, float *S) {
__shared__ float XY[SECTION_SIZE];
int i = blockIdx.x*blockDim.x+ threadIdx.x;
XY[threadIdx.x] = X[i];
/*if (i < InputSize && threadIdx.x != 0) {
XY[threadIdx.x] = X[... | .file "tmpxft_0019988f_00000000-6_prefix_sum.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 __cud... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include<iostream>
#define SECTION_SIZE 32
using namespace std;
__global__ void Prefix_sum_oneblock_kernel(float *X, float *Y, int InputSize, float *S) {
__shared__ float XY[SECTION_SIZE];
int i = blockIdx.x*blockDim.x+ threadIdx.x;
XY[threadIdx.x] = X[i];
/*if (i < InputSize && threadIdx.x != 0) {
XY[threadIdx.x] = X[... | #include <hip/hip_runtime.h>
#include<iostream>
#define SECTION_SIZE 32
using namespace std;
__global__ void Prefix_sum_oneblock_kernel(float *X, float *Y, int InputSize, float *S) {
__shared__ float XY[SECTION_SIZE];
int i = blockIdx.x*blockDim.x+ threadIdx.x;
XY[threadIdx.x] = X[i];
/*if (i < InputSize && threadIdx.x... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include<iostream>
#define SECTION_SIZE 32
using namespace std;
__global__ void Prefix_sum_oneblock_kernel(float *X, float *Y, int InputSize, float *S) {
__shared__ float XY[SECTION_SIZE];
int i = blockIdx.x*blockDim.x+ threadIdx.x;
XY[threadIdx.x] = X[i];
/*if (i < InputSize && threadIdx.x... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z26Prefix_sum_oneblock_kernelPfS_iS_
.globl _Z26Prefix_sum_oneblock_kernelPfS_iS_
.p2align 8
.type _Z26Prefix_sum_oneblock_kernelPfS_iS_,@function
_Z26Prefix_sum_oneblock_kernelPfS_iS_:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x2c
s_load_b64 s[4:5], s[0:1], 0... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include<iostream>
#define SECTION_SIZE 32
using namespace std;
__global__ void Prefix_sum_oneblock_kernel(float *X, float *Y, int InputSize, float *S) {
__shared__ float XY[SECTION_SIZE];
int i = blockIdx.x*blockDim.x+ threadIdx.x;
XY[threadIdx.x] = X[i];
/*if (i < InputSize && threadIdx.x... | .text
.file "prefix_sum.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z41__device_stub__Prefix_sum_oneblock_kernelPfS_iS_ # -- Begin function _Z41__device_stub__Pref... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z23Add_scalar_to_subvectorPfS_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 R2, SR_CTAID.X ; /* 0x0000000000027919 */
/* 0x000e2800000... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z26Prefix_sum_oneblock_kernelPfS_iS_
.globl _Z26Prefix_sum_oneblock_kernelPfS_iS_
.p2align 8
.type _Z26Prefix_sum_oneblock_kernelPfS_iS_,@function
_Z26Prefix_sum_oneblock_kernelPfS_iS_:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x2c
s_load_b64 s[4:5], s[0:1], 0... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0019988f_00000000-6_prefix_sum.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 __cud... | .text
.file "prefix_sum.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z41__device_stub__Prefix_sum_oneblock_kernelPfS_iS_ # -- Begin function _Z41__device_stub__Pref... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <iostream>
#include <math.h>
#include <cstdio>
using namespace std;
// Thread block size
const int blockSize = 16;
// Matrices are stored in row-major order:
// M(row, clo) = *(M.elements + row*M.width + col);
typedef struct {
int width;
int height;
float* elements;
} Matrix;
// CPU matrix multiplication for e... | code for sm_80
Function : _Z18MatMulKernel_naive6MatrixS_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 R0, SR_CTAID.Y ; /* 0x0000000000007919 */
/* 0x000e220000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <iostream>
#include <math.h>
#include <cstdio>
using namespace std;
// Thread block size
const int blockSize = 16;
// Matrices are stored in row-major order:
// M(row, clo) = *(M.elements + row*M.width + col);
typedef struct {
int width;
int height;
float* elements;
} Matrix;
// CPU matrix multiplication for e... | .file "tmpxft_000c4f4b_00000000-6_gpucppMatMulNaive.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3674:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
cal... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <iostream>
#include <math.h>
#include <cstdio>
using namespace std;
// Thread block size
const int blockSize = 16;
// Matrices are stored in row-major order:
// M(row, clo) = *(M.elements + row*M.width + col);
typedef struct {
int width;
int height;
float* elements;
} Matrix;
// CPU matrix multiplication for e... | #include <hip/hip_runtime.h>
#include <iostream>
#include <math.h>
#include <cstdio>
using namespace std;
// Thread block size
const int blockSize = 16;
// Matrices are stored in row-major order:
// M(row, clo) = *(M.elements + row*M.width + col);
typedef struct {
int width;
int height;
float* elements;
} Matrix;
// CP... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <iostream>
#include <math.h>
#include <cstdio>
using namespace std;
// Thread block size
const int blockSize = 16;
// Matrices are stored in row-major order:
// M(row, clo) = *(M.elements + row*M.width + col);
typedef struct {
int width;
int height;
float* elements;
} Matrix;
// CP... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z18MatMulKernel_naive6MatrixS_S_
.globl _Z18MatMulKernel_naive6MatrixS_S_
.p2align 8
.type _Z18MatMulKernel_naive6MatrixS_S_,@function
_Z18MatMulKernel_naive6MatrixS_S_:
s_clause 0x2
s_load_b32 s4, s[0:1], 0x3c
s_load_b32 s6, s[0:1], 0x0
s_load_b64 s[... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <iostream>
#include <math.h>
#include <cstdio>
using namespace std;
// Thread block size
const int blockSize = 16;
// Matrices are stored in row-major order:
// M(row, clo) = *(M.elements + row*M.width + col);
typedef struct {
int width;
int height;
float* elements;
} Matrix;
// CP... | .text
.file "gpucppMatMulNaive.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z16cpu_matrix_multiPfS_S_iii # -- Begin function _Z16cpu_matrix_multiPfS_S_iii
.p2alig... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z18MatMulKernel_naive6MatrixS_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 R0, SR_CTAID.Y ; /* 0x0000000000007919 */
/* 0x000e220000... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z18MatMulKernel_naive6MatrixS_S_
.globl _Z18MatMulKernel_naive6MatrixS_S_
.p2align 8
.type _Z18MatMulKernel_naive6MatrixS_S_,@function
_Z18MatMulKernel_naive6MatrixS_S_:
s_clause 0x2
s_load_b32 s4, s[0:1], 0x3c
s_load_b32 s6, s[0:1], 0x0
s_load_b64 s[... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000c4f4b_00000000-6_gpucppMatMulNaive.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3674:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
cal... | .text
.file "gpucppMatMulNaive.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z16cpu_matrix_multiPfS_S_iii # -- Begin function _Z16cpu_matrix_multiPfS_S_iii
.p2alig... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /* This code implements the serial solution and CUDA version for finding the maximal burst in a time series;
How to compile:
nvcc compare.cu
How to run:
./a.out n k //n is the length of the time series and k is the minimum lenght of a subsequence
Results to see:
The burst found by two methods are printed out: "burst s... | .file "tmpxft_0013a73d_00000000-6_compare.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
... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | /* This code implements the serial solution and CUDA version for finding the maximal burst in a time series;
How to compile:
nvcc compare.cu
How to run:
./a.out n k //n is the length of the time series and k is the minimum lenght of a subsequence
Results to see:
The burst found by two methods are printed out: "burst s... | /* This code implements the serial solution and CUDA version for finding the maximal burst in a time series;
How to compile:
nvcc compare.cu
How to run:
./a.out n k //n is the length of the time series and k is the minimum lenght of a subsequence
Results to see:
The burst found by two methods are printed out: "burst s... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | /* This code implements the serial solution and CUDA version for finding the maximal burst in a time series;
How to compile:
nvcc compare.cu
How to run:
./a.out n k //n is the length of the time series and k is the minimum lenght of a subsequence
Results to see:
The burst found by two methods are printed out: "burst s... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z14max_each_blockPfPiS0_S_ii
.globl _Z14max_each_blockPfPiS0_S_ii
.p2align 8
.type _Z14max_each_blockPfPiS0_S_ii,@function
_Z14max_each_blockPfPiS0_S_ii:
s_clause 0x1
s_load_b32 s5, s[0:1], 0x34
s_load_b64 s[2:3], s[0:1], 0x20
s_mov_b32 s4, s15
s_... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | /* This code implements the serial solution and CUDA version for finding the maximal burst in a time series;
How to compile:
nvcc compare.cu
How to run:
./a.out n k //n is the length of the time series and k is the minimum lenght of a subsequence
Results to see:
The burst found by two methods are printed out: "burst s... | .text
.file "compare.hip"
.section .rodata.cst4,"aM",@progbits,4
.p2align 2, 0x0 # -- Begin function main
.LCPI0_0:
.long 0xbf800000 # float -1
.text
.globl main
.p2align 4, 0x90
.type main,@function
main: # @main
.cfi_startproc
# %bb.0:
pu... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0013a73d_00000000-6_compare.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
... | .text
.file "compare.hip"
.section .rodata.cst4,"aM",@progbits,4
.p2align 2, 0x0 # -- Begin function main
.LCPI0_0:
.long 0xbf800000 # float -1
.text
.globl main
.p2align 4, 0x90
.type main,@function
main: # @main
.cfi_startproc
# %bb.0:
pu... |
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 <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <cmath>
#include <device_functions.h>
#define N 1048576
#define THREADS_PER_BLOCK 1024
#define cudaCheckErrors(msg) \
do { \
cudaError_t __err = cudaGetLastError(); \
if ... | .file "tmpxft_0003ec1d_00000000-6_cuda_prefix.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, %... |
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 <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <cmath>
#include <device_functions.h>
#define N 1048576
#define THREADS_PER_BLOCK 1024
#define cudaCheckErrors(msg) \
do { \
cudaError_t __err = cudaGetLastError(); \
if ... | #include "hip/hip_runtime.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <cmath>
#include <hip/device_functions.h>
#define N 1048576
#define THREADS_PER_BLOCK 1024
#define cudaCheckErrors(msg) \
do { \
hipError_t __err = hipGetLastError(); \
if (__err != hipSuccess) { \
fprintf... |
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 <string.h>
#include <stdlib.h>
#include <time.h>
#include <cmath>
#include <hip/device_functions.h>
#define N 1048576
#define THREADS_PER_BLOCK 1024
#define cudaCheckErrors(msg) \
do { \
hipError_t __err = hipGetLastError(); \
if (__err != hipSuccess) { \
fprintf... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z12find_repeatsPiS_i
.globl _Z12find_repeatsPiS_i
.p2align 8
.type _Z12find_repeatsPiS_i,@function
_Z12find_repeatsPiS_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 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 <string.h>
#include <stdlib.h>
#include <time.h>
#include <cmath>
#include <hip/device_functions.h>
#define N 1048576
#define THREADS_PER_BLOCK 1024
#define cudaCheckErrors(msg) \
do { \
hipError_t __err = hipGetLastError(); \
if (__err != hipSuccess) { \
fprintf... | .text
.file "cuda_prefix.hip"
.globl _Z9randomGenPii # -- Begin function _Z9randomGenPii
.p2align 4, 0x90
.type _Z9randomGenPii,@function
_Z9randomGenPii: # @_Z9randomGenPii
.cfi_startproc
# %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
pushq %r15
.cfi_def_cfa_offset 24
pushq %r14
.cfi... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0003ec1d_00000000-6_cuda_prefix.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, %... | .text
.file "cuda_prefix.hip"
.globl _Z9randomGenPii # -- Begin function _Z9randomGenPii
.p2align 4, 0x90
.type _Z9randomGenPii,@function
_Z9randomGenPii: # @_Z9randomGenPii
.cfi_startproc
# %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
pushq %r15
.cfi_def_cfa_offset 24
pushq %r14
.cfi... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <cuda.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#define M 20
// RED = 0, BLACK = 1
enum nodeColor {
RED,
BLACK
};
enum result {
Failure,
Success,
FirstInsert
};
enum caseFlag {
NOOP,
DID_CASE1,
DID_CASE3
};
struct par_rbNode {
int key, color;
int flag;
struct par_rbNode *left, *right, *par... | .file "tmpxft_0016d612_00000000-6_a_sam_backup_latest.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2073:
.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 <cuda.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#define M 20
// RED = 0, BLACK = 1
enum nodeColor {
RED,
BLACK
};
enum result {
Failure,
Success,
FirstInsert
};
enum caseFlag {
NOOP,
DID_CASE1,
DID_CASE3
};
struct par_rbNode {
int key, color;
int flag;
struct par_rbNode *left, *right, *par... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#define M 20
// RED = 0, BLACK = 1
enum nodeColor {
RED,
BLACK
};
enum result {
Failure,
Success,
FirstInsert
};
enum caseFlag {
NOOP,
DID_CASE1,
DID_CASE3
};
struct par_rbNode {
int key, color;
int flag;
struct par_rbNode *left, *... |
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>
#include <stdbool.h>
#define M 20
// RED = 0, BLACK = 1
enum nodeColor {
RED,
BLACK
};
enum result {
Failure,
Success,
FirstInsert
};
enum caseFlag {
NOOP,
DID_CASE1,
DID_CASE3
};
struct par_rbNode {
int key, color;
int flag;
struct par_rbNode *left, *... | .text
.file "a_sam_backup_latest.hip"
.globl _Z18__device_stub__RBTP10par_rbNode # -- Begin function _Z18__device_stub__RBTP10par_rbNode
.p2align 4, 0x90
.type _Z18__device_stub__RBTP10par_rbNode,@function
_Z18__device_stub__RBTP10par_rbNode: # @_Z18__device_stub__RBTP10par_rbNode
.cfi_startproc
# %bb.0:
subq $72, %... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0016d612_00000000-6_a_sam_backup_latest.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2073:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
ad... | .text
.file "a_sam_backup_latest.hip"
.globl _Z18__device_stub__RBTP10par_rbNode # -- Begin function _Z18__device_stub__RBTP10par_rbNode
.p2align 4, 0x90
.type _Z18__device_stub__RBTP10par_rbNode,@function
_Z18__device_stub__RBTP10par_rbNode: # @_Z18__device_stub__RBTP10par_rbNode
.cfi_startproc
# %bb.0:
subq $72, %... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | __device__ inline double sq(double x) { return x*x;}
__device__ double optimsquare_eps_2d_descent(double u[12], double xi[12], int sc, double epsilon, double w, int steps) {
double no, nxi[12], r;
r = 1./(1+epsilon/4.);
for (int c = 0; c < 3; c++) {
u[c*4 + 0] -= xi[c*4 + 0]-xi[c*4 + 3];
for (int i=1;i<=3;i++) {
u[c*4 ... | .file "tmpxft_000400b4_00000000-6_kernels-2d-color.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2031:
.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. | __device__ inline double sq(double x) { return x*x;}
__device__ double optimsquare_eps_2d_descent(double u[12], double xi[12], int sc, double epsilon, double w, int steps) {
double no, nxi[12], r;
r = 1./(1+epsilon/4.);
for (int c = 0; c < 3; c++) {
u[c*4 + 0] -= xi[c*4 + 0]-xi[c*4 + 3];
for (int i=1;i<=3;i++) {
u[c*4 ... | #ifndef KERNELS_EPS_2D_COLOR_CUH
#define KERNELS_EPS_2D_COLOR_CUH
__global__ void opt_eps_split(int sx, int sc, double *xi, double *u, double epsilon, double w, double ws, double we2, int L, int K, int steps, int is_even_step);
__global__ void over_relax_eps_2d(int sx, int sc, double *xio, double *xiobar, double *u, do... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #ifndef KERNELS_EPS_2D_COLOR_CUH
#define KERNELS_EPS_2D_COLOR_CUH
__global__ void opt_eps_split(int sx, int sc, double *xi, double *u, double epsilon, double w, double ws, double we2, int L, int K, int steps, int is_even_step);
__global__ void over_relax_eps_2d(int sx, int sc, double *xio, double *xiobar, double *u, do... | .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. | #ifndef KERNELS_EPS_2D_COLOR_CUH
#define KERNELS_EPS_2D_COLOR_CUH
__global__ void opt_eps_split(int sx, int sc, double *xi, double *u, double epsilon, double w, double ws, double we2, int L, int K, int steps, int is_even_step);
__global__ void over_relax_eps_2d(int sx, int sc, double *xio, double *xiobar, double *u, do... | .text
.file "kernels-2d-color.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/llvm... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000400b4_00000000-6_kernels-2d-color.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2031:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq ... | .text
.file "kernels-2d-color.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/llvm... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void all_dots(int n, int k, double* data_dots, double* centroid_dots, double* dots) {
__shared__ double local_data_dots[32];
__shared__ double local_centroid_dots[32];
int data_index = threadIdx.x + blockIdx.x * blockDim.x;
if ((data_index < n) && (threadIdx.y == 0)) {
local_data_dots[t... | code for sm_80
Function : _Z8all_dotsiiPdS_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 R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e220000002500 */
/*00... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void all_dots(int n, int k, double* data_dots, double* centroid_dots, double* dots) {
__shared__ double local_data_dots[32];
__shared__ double local_centroid_dots[32];
int data_index = threadIdx.x + blockIdx.x * blockDim.x;
if ((data_index < n) && (threadIdx.y == 0)) {
local_data_dots[t... | .file "tmpxft_0011817c_00000000-6_all_dots.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 all_dots(int n, int k, double* data_dots, double* centroid_dots, double* dots) {
__shared__ double local_data_dots[32];
__shared__ double local_centroid_dots[32];
int data_index = threadIdx.x + blockIdx.x * blockDim.x;
if ((data_index < n) && (threadIdx.y == 0)) {
local_data_dots[t... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void all_dots(int n, int k, double* data_dots, double* centroid_dots, double* dots) {
__shared__ double local_data_dots[32];
__shared__ double local_centroid_dots[32];
int data_index = threadIdx.x + blockIdx.x * blockDim.x;
if ((data_index < n) && (threadIdx... |
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 all_dots(int n, int k, double* data_dots, double* centroid_dots, double* dots) {
__shared__ double local_data_dots[32];
__shared__ double local_centroid_dots[32];
int data_index = threadIdx.x + blockIdx.x * blockDim.x;
if ((data_index < n) && (threadIdx... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z8all_dotsiiPdS_S_
.globl _Z8all_dotsiiPdS_S_
.p2align 8
.type _Z8all_dotsiiPdS_S_,@function
_Z8all_dotsiiPdS_S_:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s6, s[0:1], 0x0
v_and_b32_e32 v3, 0x3ff, v0
s_add_u32 s4, s0, 32
s_... |
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 all_dots(int n, int k, double* data_dots, double* centroid_dots, double* dots) {
__shared__ double local_data_dots[32];
__shared__ double local_centroid_dots[32];
int data_index = threadIdx.x + blockIdx.x * blockDim.x;
if ((data_index < n) && (threadIdx... | .text
.file "all_dots.hip"
.globl _Z23__device_stub__all_dotsiiPdS_S_ # -- Begin function _Z23__device_stub__all_dotsiiPdS_S_
.p2align 4, 0x90
.type _Z23__device_stub__all_dotsiiPdS_S_,@function
_Z23__device_stub__all_dotsiiPdS_S_: # @_Z23__device_stub__all_dotsiiPdS_S_
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_d... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z8all_dotsiiPdS_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 R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e220000002500 */
/*00... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z8all_dotsiiPdS_S_
.globl _Z8all_dotsiiPdS_S_
.p2align 8
.type _Z8all_dotsiiPdS_S_,@function
_Z8all_dotsiiPdS_S_:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s6, s[0:1], 0x0
v_and_b32_e32 v3, 0x3ff, v0
s_add_u32 s4, s0, 32
s_... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0011817c_00000000-6_all_dots.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 "all_dots.hip"
.globl _Z23__device_stub__all_dotsiiPdS_S_ # -- Begin function _Z23__device_stub__all_dotsiiPdS_S_
.p2align 4, 0x90
.type _Z23__device_stub__all_dotsiiPdS_S_,@function
_Z23__device_stub__all_dotsiiPdS_S_: # @_Z23__device_stub__all_dotsiiPdS_S_
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_d... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "iostream"
#include <fstream>
#include <string>
#define N 1024 // size of matrix is N*N
#define BLOCK_SIZE 16
__global__ void gpuMult ( float * a, float * b, int n, float * c ) {
int bx = blockIdx.x;
int by = blockIdx.y;
int tx = threadIdx.x;
int ty = threadIdx.y;
float result = 0.0f;
int idxA = n * BLOCK_S... | code for sm_80
Function : _Z7gpuMultPfS_iS_
.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. | #include "iostream"
#include <fstream>
#include <string>
#define N 1024 // size of matrix is N*N
#define BLOCK_SIZE 16
__global__ void gpuMult ( float * a, float * b, int n, float * c ) {
int bx = blockIdx.x;
int by = blockIdx.y;
int tx = threadIdx.x;
int ty = threadIdx.y;
float result = 0.0f;
int idxA = n * BLOCK_S... | .file "tmpxft_00086c40_00000000-6_mult.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3804:
.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 <fstream>
#include <string>
#define N 1024 // size of matrix is N*N
#define BLOCK_SIZE 16
__global__ void gpuMult ( float * a, float * b, int n, float * c ) {
int bx = blockIdx.x;
int by = blockIdx.y;
int tx = threadIdx.x;
int ty = threadIdx.y;
float result = 0.0f;
int idxA = n * BLOCK_S... | #include <hip/hip_runtime.h>
#include "iostream"
#include <fstream>
#include <string>
#define N 1024 // size of matrix is N*N
#define BLOCK_SIZE 16
__global__ void gpuMult ( float * a, float * b, int n, float * c ) {
int bx = blockIdx.x;
int by = blockIdx.y;
int tx = threadIdx.x;
int ty = threadIdx.y;
float result = ... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "iostream"
#include <fstream>
#include <string>
#define N 1024 // size of matrix is N*N
#define BLOCK_SIZE 16
__global__ void gpuMult ( float * a, float * b, int n, float * c ) {
int bx = blockIdx.x;
int by = blockIdx.y;
int tx = threadIdx.x;
int ty = threadIdx.y;
float result = ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z7gpuMultPfS_iS_
.globl _Z7gpuMultPfS_iS_
.p2align 8
.type _Z7gpuMultPfS_iS_,@function
_Z7gpuMultPfS_iS_:
s_load_b32 s3, s[0:1], 0x10
v_bfe_u32 v1, v0, 10, 10
v_and_b32_e32 v0, 0x3ff, v0
s_lshl_b32 s2, s14, 4
s_delay_alu instid0(... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include "iostream"
#include <fstream>
#include <string>
#define N 1024 // size of matrix is N*N
#define BLOCK_SIZE 16
__global__ void gpuMult ( float * a, float * b, int n, float * c ) {
int bx = blockIdx.x;
int by = blockIdx.y;
int tx = threadIdx.x;
int ty = threadIdx.y;
float result = ... | .text
.file "mult.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z22__device_stub__gpuMultPfS_iS_ # -- Begin function _Z22__device_stub__gpuMultPfS_iS_
.p2align 4, 0x... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z7gpuMultPfS_iS_
.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 _Z7gpuMultPfS_iS_
.globl _Z7gpuMultPfS_iS_
.p2align 8
.type _Z7gpuMultPfS_iS_,@function
_Z7gpuMultPfS_iS_:
s_load_b32 s3, s[0:1], 0x10
v_bfe_u32 v1, v0, 10, 10
v_and_b32_e32 v0, 0x3ff, v0
s_lshl_b32 s2, s14, 4
s_delay_alu instid0(... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00086c40_00000000-6_mult.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3804:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnreg... | .text
.file "mult.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z22__device_stub__gpuMultPfS_iS_ # -- Begin function _Z22__device_stub__gpuMultPfS_iS_
.p2align 4, 0x... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
// CUDA kernel. Each thread takes care of one element of c
__global__ void vecAdd(int *a, int *c, int n)
{
// Get our global thread ID
int id = blockIdx.x*blockDim.x+threadIdx.x;
// c[id]=0;
// Make sure we do not go out of bounds
if (id < n)
*c+= a[id];
// prin... | code for sm_80
Function : _Z6vecAddPiS_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 R2, SR_CTAID.X ; /* 0x0000000000027919 */
/* 0x000e280000002500 */
/*0020*/ ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
// CUDA kernel. Each thread takes care of one element of c
__global__ void vecAdd(int *a, int *c, int n)
{
// Get our global thread ID
int id = blockIdx.x*blockDim.x+threadIdx.x;
// c[id]=0;
// Make sure we do not go out of bounds
if (id < n)
*c+= a[id];
// prin... | .file "tmpxft_000488c0_00000000-6_cuda_deviationvalue.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
ad... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
// CUDA kernel. Each thread takes care of one element of c
__global__ void vecAdd(int *a, int *c, int n)
{
// Get our global thread ID
int id = blockIdx.x*blockDim.x+threadIdx.x;
// c[id]=0;
// Make sure we do not go out of bounds
if (id < n)
*c+= a[id];
// prin... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
// CUDA kernel. Each thread takes care of one element of c
__global__ void vecAdd(int *a, int *c, int n)
{
// Get our global thread ID
int id = blockIdx.x*blockDim.x+threadIdx.x;
// c[id]=0;
// Make sure we do not go out of bounds
if... |
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>
#include <math.h>
// CUDA kernel. Each thread takes care of one element of c
__global__ void vecAdd(int *a, int *c, int n)
{
// Get our global thread ID
int id = blockIdx.x*blockDim.x+threadIdx.x;
// c[id]=0;
// Make sure we do not go out of bounds
if... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6vecAddPiS_i
.globl _Z6vecAddPiS_i
.p2align 8
.type _Z6vecAddPiS_i,@function
_Z6vecAddPiS_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_alu in... |
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>
#include <math.h>
// CUDA kernel. Each thread takes care of one element of c
__global__ void vecAdd(int *a, int *c, int n)
{
// Get our global thread ID
int id = blockIdx.x*blockDim.x+threadIdx.x;
// c[id]=0;
// Make sure we do not go out of bounds
if... | .text
.file "cuda_deviationvalue.hip"
.globl _Z21__device_stub__vecAddPiS_i # -- Begin function _Z21__device_stub__vecAddPiS_i
.p2align 4, 0x90
.type _Z21__device_stub__vecAddPiS_i,@function
_Z21__device_stub__vecAddPiS_i: # @_Z21__device_stub__vecAddPiS_i
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_o... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z6vecAddPiS_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 R2, SR_CTAID.X ; /* 0x0000000000027919 */
/* 0x000e280000002500 */
/*0020*/ ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6vecAddPiS_i
.globl _Z6vecAddPiS_i
.p2align 8
.type _Z6vecAddPiS_i,@function
_Z6vecAddPiS_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_alu in... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000488c0_00000000-6_cuda_deviationvalue.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
ad... | .text
.file "cuda_deviationvalue.hip"
.globl _Z21__device_stub__vecAddPiS_i # -- Begin function _Z21__device_stub__vecAddPiS_i
.p2align 4, 0x90
.type _Z21__device_stub__vecAddPiS_i,@function
_Z21__device_stub__vecAddPiS_i: # @_Z21__device_stub__vecAddPiS_i
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_o... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void one_channel_mul_kernel(const float *data_l, const float *data_r, float *result, int channel_total, int total)
{
int idx = 2 * (blockIdx.x * blockDim.x + threadIdx.x);
int one_ch_idx = idx % (2 * channel_total);
if (idx / 2 < total) {
result[idx] = data_l[idx] * data_r[one_ch_idx] -... | code for sm_80
Function : _Z22one_channel_mul_kernelPKfS0_Pfii
.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 */
/* 0x000e280... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void one_channel_mul_kernel(const float *data_l, const float *data_r, float *result, int channel_total, int total)
{
int idx = 2 * (blockIdx.x * blockDim.x + threadIdx.x);
int one_ch_idx = idx % (2 * channel_total);
if (idx / 2 < total) {
result[idx] = data_l[idx] * data_r[one_ch_idx] -... | .file "tmpxft_000eb132_00000000-6_one_channel_mul_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 one_channel_mul_kernel(const float *data_l, const float *data_r, float *result, int channel_total, int total)
{
int idx = 2 * (blockIdx.x * blockDim.x + threadIdx.x);
int one_ch_idx = idx % (2 * channel_total);
if (idx / 2 < total) {
result[idx] = data_l[idx] * data_r[one_ch_idx] -... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void one_channel_mul_kernel(const float *data_l, const float *data_r, float *result, int channel_total, int total)
{
int idx = 2 * (blockIdx.x * blockDim.x + threadIdx.x);
int one_ch_idx = idx % (2 * channel_total);
if (idx / 2 < total) {
result[idx] = data_... |
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 one_channel_mul_kernel(const float *data_l, const float *data_r, float *result, int channel_total, int total)
{
int idx = 2 * (blockIdx.x * blockDim.x + threadIdx.x);
int one_ch_idx = idx % (2 * channel_total);
if (idx / 2 < total) {
result[idx] = data_... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z22one_channel_mul_kernelPKfS0_Pfii
.globl _Z22one_channel_mul_kernelPKfS0_Pfii
.p2align 8
.type _Z22one_channel_mul_kernelPKfS0_Pfii,@function
_Z22one_channel_mul_kernelPKfS0_Pfii:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s3, s[0:1], 0x1c
s_w... |
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 one_channel_mul_kernel(const float *data_l, const float *data_r, float *result, int channel_total, int total)
{
int idx = 2 * (blockIdx.x * blockDim.x + threadIdx.x);
int one_ch_idx = idx % (2 * channel_total);
if (idx / 2 < total) {
result[idx] = data_... | .text
.file "one_channel_mul_kernel.hip"
.globl _Z37__device_stub__one_channel_mul_kernelPKfS0_Pfii # -- Begin function _Z37__device_stub__one_channel_mul_kernelPKfS0_Pfii
.p2align 4, 0x90
.type _Z37__device_stub__one_channel_mul_kernelPKfS0_Pfii,@function
_Z37__device_stub__one_channel_mul_kernelPKfS0_Pfii: # @_Z37__d... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z22one_channel_mul_kernelPKfS0_Pfii
.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 */
/* 0x000e280... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z22one_channel_mul_kernelPKfS0_Pfii
.globl _Z22one_channel_mul_kernelPKfS0_Pfii
.p2align 8
.type _Z22one_channel_mul_kernelPKfS0_Pfii,@function
_Z22one_channel_mul_kernelPKfS0_Pfii:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s3, s[0:1], 0x1c
s_w... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000eb132_00000000-6_one_channel_mul_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 "one_channel_mul_kernel.hip"
.globl _Z37__device_stub__one_channel_mul_kernelPKfS0_Pfii # -- Begin function _Z37__device_stub__one_channel_mul_kernelPKfS0_Pfii
.p2align 4, 0x90
.type _Z37__device_stub__one_channel_mul_kernelPKfS0_Pfii,@function
_Z37__device_stub__one_channel_mul_kernelPKfS0_Pfii: # @_Z37__d... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
#include <cuda.h>
#include <stdlib.h>
#define IMAGE_HEIGHT 521
#define IMAGE_WIDTH 428
__global__
void blur(int *d_R, int *d_G, int *d_B, int *d_Rnew, int *d_Gnew, int *d_Bnew)
{
// Get the X and y coords of the pixel for this thread
in... | .file "tmpxft_0016cd1d_00000000-6_blur.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 <string.h>
#include <sys/types.h>
#include <sys/time.h>
#include <cuda.h>
#include <stdlib.h>
#define IMAGE_HEIGHT 521
#define IMAGE_WIDTH 428
__global__
void blur(int *d_R, int *d_G, int *d_B, int *d_Rnew, int *d_Gnew, int *d_Bnew)
{
// Get the X and y coords of the pixel for this thread
in... | #include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
#include <hip/hip_runtime.h>
#include <stdlib.h>
#define IMAGE_HEIGHT 521
#define IMAGE_WIDTH 428
__global__
void blur(int *d_R, int *d_G, int *d_B, int *d_Rnew, int *d_Gnew, int *d_Bnew)
{
// Get the X and y coords of the pixel for thi... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
#include <hip/hip_runtime.h>
#include <stdlib.h>
#define IMAGE_HEIGHT 521
#define IMAGE_WIDTH 428
__global__
void blur(int *d_R, int *d_G, int *d_B, int *d_Rnew, int *d_Gnew, int *d_Bnew)
{
// Get the X and y coords of the pixel for thi... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z4blurPiS_S_S_S_S_
.globl _Z4blurPiS_S_S_S_S_
.p2align 8
.type _Z4blurPiS_S_S_S_S_,@function
_Z4blurPiS_S_S_S_S_:
s_load_b32 s2, s[0:1], 0x3c
v_and_b32_e32 v2, 0x3ff, v0
v_bfe_u32 v4, v0, 10, 10
s_waitcnt lgkmcnt(0)
s_and_b32 s3, s2,... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
#include <hip/hip_runtime.h>
#include <stdlib.h>
#define IMAGE_HEIGHT 521
#define IMAGE_WIDTH 428
__global__
void blur(int *d_R, int *d_G, int *d_B, int *d_Rnew, int *d_Gnew, int *d_Bnew)
{
// Get the X and y coords of the pixel for thi... | .text
.file "blur.hip"
.globl _Z19__device_stub__blurPiS_S_S_S_S_ # -- Begin function _Z19__device_stub__blurPiS_S_S_S_S_
.p2align 4, 0x90
.type _Z19__device_stub__blurPiS_S_S_S_S_,@function
_Z19__device_stub__blurPiS_S_S_S_S_: # @_Z19__device_stub__blurPiS_S_S_S_S_
.cfi_startproc
# %bb.0:
subq $152, %rsp
.cfi_def_c... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0016cd1d_00000000-6_blur.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 "blur.hip"
.globl _Z19__device_stub__blurPiS_S_S_S_S_ # -- Begin function _Z19__device_stub__blurPiS_S_S_S_S_
.p2align 4, 0x90
.type _Z19__device_stub__blurPiS_S_S_S_S_,@function
_Z19__device_stub__blurPiS_S_S_S_S_: # @_Z19__device_stub__blurPiS_S_S_S_S_
.cfi_startproc
# %bb.0:
subq $152, %rsp
.cfi_def_c... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <sys/time.h>
__global__ void AddArraysAtDevice(int *a, int *b, int count){
int t_id = blockIdx.x * blockDim.x + threadIdx.x;
if(t_id < count){
a[t_id] += b[t_id];
}
}
int main(){
int count = 1000;
int *h_a = (int... | code for sm_80
Function : _Z17AddArraysAtDevicePiS_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_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e280000002500 ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <sys/time.h>
__global__ void AddArraysAtDevice(int *a, int *b, int count){
int t_id = blockIdx.x * blockDim.x + threadIdx.x;
if(t_id < count){
a[t_id] += b[t_id];
}
}
int main(){
int count = 1000;
int *h_a = (int... | .file "tmpxft_00128627_00000000-6_cudaAddMatrices.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2073:
.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. | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <sys/time.h>
__global__ void AddArraysAtDevice(int *a, int *b, int count){
int t_id = blockIdx.x * blockDim.x + threadIdx.x;
if(t_id < count){
a[t_id] += b[t_id];
}
}
int main(){
int count = 1000;
int *h_a = (int... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <sys/time.h>
__global__ void AddArraysAtDevice(int *a, int *b, int count){
int t_id = blockIdx.x * blockDim.x + threadIdx.x;
if(t_id < count){
a[t_id] += b[t_id];
}
}
int main(){
int ... |
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>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <sys/time.h>
__global__ void AddArraysAtDevice(int *a, int *b, int count){
int t_id = blockIdx.x * blockDim.x + threadIdx.x;
if(t_id < count){
a[t_id] += b[t_id];
}
}
int main(){
int ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z17AddArraysAtDevicePiS_i
.globl _Z17AddArraysAtDevicePiS_i
.p2align 8
.type _Z17AddArraysAtDevicePiS_i,@function
_Z17AddArraysAtDevicePiS_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
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>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <sys/time.h>
__global__ void AddArraysAtDevice(int *a, int *b, int count){
int t_id = blockIdx.x * blockDim.x + threadIdx.x;
if(t_id < count){
a[t_id] += b[t_id];
}
}
int main(){
int ... | .text
.file "cudaAddMatrices.hip"
.globl _Z32__device_stub__AddArraysAtDevicePiS_i # -- Begin function _Z32__device_stub__AddArraysAtDevicePiS_i
.p2align 4, 0x90
.type _Z32__device_stub__AddArraysAtDevicePiS_i,@function
_Z32__device_stub__AddArraysAtDevicePiS_i: # @_Z32__device_stub__AddArraysAtDevicePiS_i
.cfi_startpr... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z17AddArraysAtDevicePiS_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_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e280000002500 ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z17AddArraysAtDevicePiS_i
.globl _Z17AddArraysAtDevicePiS_i
.p2align 8
.type _Z17AddArraysAtDevicePiS_i,@function
_Z17AddArraysAtDevicePiS_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
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_00128627_00000000-6_cudaAddMatrices.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2073:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $... | .text
.file "cudaAddMatrices.hip"
.globl _Z32__device_stub__AddArraysAtDevicePiS_i # -- Begin function _Z32__device_stub__AddArraysAtDevicePiS_i
.p2align 4, 0x90
.type _Z32__device_stub__AddArraysAtDevicePiS_i,@function
_Z32__device_stub__AddArraysAtDevicePiS_i: # @_Z32__device_stub__AddArraysAtDevicePiS_i
.cfi_startpr... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | // the GPU code can be found in power_gpu.cu
// jiabing jin, sept 2017
////////////////////////////////////////////
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "cuda.h"
const int BLOCK_SIZE =256;
// #include "power_gpu.cu"
// Input Array Variables
float* h_Ma... | .file "tmpxft_001a01db_00000000-6_power_gpu.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2070:
.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. | // the GPU code can be found in power_gpu.cu
// jiabing jin, sept 2017
////////////////////////////////////////////
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "cuda.h"
const int BLOCK_SIZE =256;
// #include "power_gpu.cu"
// Input Array Variables
float* h_Ma... | // the GPU code can be found in power_gpu.cu
// jiabing jin, sept 2017
////////////////////////////////////////////
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "hip/hip_runtime.h"
const int BLOCK_SIZE =256;
// #include "power_gpu.cu"
// Input Array Variables
... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | // the GPU code can be found in power_gpu.cu
// jiabing jin, sept 2017
////////////////////////////////////////////
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "hip/hip_runtime.h"
const int BLOCK_SIZE =256;
// #include "power_gpu.cu"
// Input Array Variables
... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10Av_ProductPfS_S_i
.globl _Z10Av_ProductPfS_S_i
.p2align 8
.type _Z10Av_ProductPfS_S_i,@function
_Z10Av_ProductPfS_S_i:
s_load_b32 s2, s[0:1], 0x18
s_waitcnt lgkmcnt(0)
s_cmp_lt_i32 s2, 1
s_cbranch_scc1 .LBB0_13
s_load_b128 s[4:7], s[0... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <cuda_runtime.h>
#include <stdio.h>
#include <sys/time.h>
#define LEN 1<<22
double seconds(){
struct timeval tp;
struct timezone tzp;
int i = gettimeofday(&tp,&tzp);
return ((double)tp.tv_sec+(double)tp.tv_usec*1.e-6);
}
struct InnerArray{
float x[LEN];
float y[LEN];
};
void initialInnerArray(InnerArray *ip, i... | code for sm_80
Function : _Z6warmupP10InnerArrayS0_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_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e280000002500 ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <cuda_runtime.h>
#include <stdio.h>
#include <sys/time.h>
#define LEN 1<<22
double seconds(){
struct timeval tp;
struct timezone tzp;
int i = gettimeofday(&tp,&tzp);
return ((double)tp.tv_sec+(double)tp.tv_usec*1.e-6);
}
struct InnerArray{
float x[LEN];
float y[LEN];
};
void initialInnerArray(InnerArray *ip, i... | .file "tmpxft_00064e86_00000000-6_simpleMathSoA.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2066:
.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 <cuda_runtime.h>
#include <stdio.h>
#include <sys/time.h>
#define LEN 1<<22
double seconds(){
struct timeval tp;
struct timezone tzp;
int i = gettimeofday(&tp,&tzp);
return ((double)tp.tv_sec+(double)tp.tv_usec*1.e-6);
}
struct InnerArray{
float x[LEN];
float y[LEN];
};
void initialInnerArray(InnerArray *ip, i... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <sys/time.h>
#define LEN 1<<22
double seconds(){
struct timeval tp;
struct timezone tzp;
int i = gettimeofday(&tp,&tzp);
return ((double)tp.tv_sec+(double)tp.tv_usec*1.e-6);
}
struct InnerArray{
float x[LEN];
float y[LEN];
};
void initialInnerArray(InnerArray *ip... |
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 <sys/time.h>
#define LEN 1<<22
double seconds(){
struct timeval tp;
struct timezone tzp;
int i = gettimeofday(&tp,&tzp);
return ((double)tp.tv_sec+(double)tp.tv_usec*1.e-6);
}
struct InnerArray{
float x[LEN];
float y[LEN];
};
void initialInnerArray(InnerArray *ip... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z14testInnerArrayP10InnerArrayS0_i
.globl _Z14testInnerArrayP10InnerArrayS0_i
.p2align 8
.type _Z14testInnerArrayP10InnerArrayS0_i,@function
_Z14testInnerArrayP10InnerArrayS0_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
s_wait... |
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 <sys/time.h>
#define LEN 1<<22
double seconds(){
struct timeval tp;
struct timezone tzp;
int i = gettimeofday(&tp,&tzp);
return ((double)tp.tv_sec+(double)tp.tv_usec*1.e-6);
}
struct InnerArray{
float x[LEN];
float y[LEN];
};
void initialInnerArray(InnerArray *ip... | .text
.file "simpleMathSoA.hip"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function _Z7secondsv
.LCPI0_0:
.quad 0x3eb0c6f7a0b5ed8d # double 9.9999999999999995E-7
.text
.globl _Z7secondsv
.p2align 4, 0x90
.type _Z7secondsv,@function
_Z7secondsv: ... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z6warmupP10InnerArrayS0_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_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e280000002500 ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z14testInnerArrayP10InnerArrayS0_i
.globl _Z14testInnerArrayP10InnerArrayS0_i
.p2align 8
.type _Z14testInnerArrayP10InnerArrayS0_i,@function
_Z14testInnerArrayP10InnerArrayS0_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
s_wait... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00064e86_00000000-6_simpleMathSoA.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2066:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8,... | .text
.file "simpleMathSoA.hip"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function _Z7secondsv
.LCPI0_0:
.quad 0x3eb0c6f7a0b5ed8d # double 9.9999999999999995E-7
.text
.globl _Z7secondsv
.p2align 4, 0x90
.type _Z7secondsv,@function
_Z7secondsv: ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <device_launch_parameters.h>
#include <device_functions.h>
// Function that catches errors
// Function that catches the error
void testCUDA(cudaError_t error, const char *file, int line) {
if (error != cudaSuccess) {
printf("There is ... | code for sm_80
Function : _Z21Compute_all_rotationsPfS_S_PKiS1_
.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 */
/* 0x000e2200... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <device_launch_parameters.h>
#include <device_functions.h>
// Function that catches errors
// Function that catches the error
void testCUDA(cudaError_t error, const char *file, int line) {
if (error != cudaSuccess) {
printf("There is ... | .file "tmpxft_0007e846_00000000-6_version1.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2065:
.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 <stdlib.h>
#include <string.h>
#include <math.h>
#include <device_launch_parameters.h>
#include <device_functions.h>
// Function that catches errors
// Function that catches the error
void testCUDA(cudaError_t error, const char *file, int line) {
if (error != cudaSuccess) {
printf("There is ... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <hip/device_functions.h>
// Function that catches errors
// Function that catches the error
void testCUDA(hipError_t error, const char *file, int line) {
if (error != hipSuccess) {
printf("There is an erro... |
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>
#include <string.h>
#include <math.h>
#include <hip/device_functions.h>
// Function that catches errors
// Function that catches the error
void testCUDA(hipError_t error, const char *file, int line) {
if (error != hipSuccess) {
printf("There is an erro... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z21Compute_all_rotationsPfS_S_PKiS1_
.globl _Z21Compute_all_rotationsPfS_S_PKiS1_
.p2align 8
.type _Z21Compute_all_rotationsPfS_S_PKiS1_,@function
_Z21Compute_all_rotationsPfS_S_PKiS1_:
s_clause 0x2
s_load_b32 s12, s[0:1], 0x34
s_load_b256 s[4:11], 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <hip/device_functions.h>
// Function that catches errors
// Function that catches the error
void testCUDA(hipError_t error, const char *file, int line) {
if (error != hipSuccess) {
printf("There is an erro... | .text
.file "version1.hip"
.globl _Z8testCUDA10hipError_tPKci # -- Begin function _Z8testCUDA10hipError_tPKci
.p2align 4, 0x90
.type _Z8testCUDA10hipError_tPKci,@function
_Z8testCUDA10hipError_tPKci: # @_Z8testCUDA10hipError_tPKci
.cfi_startproc
# %bb.0:
testl %edi, %edi
jne .LBB0_2
# %bb.1:
retq
.LBB0_2... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z21Compute_all_rotationsPfS_S_PKiS1_
.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 */
/* 0x000e2200... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z21Compute_all_rotationsPfS_S_PKiS1_
.globl _Z21Compute_all_rotationsPfS_S_PKiS1_
.p2align 8
.type _Z21Compute_all_rotationsPfS_S_PKiS1_,@function
_Z21Compute_all_rotationsPfS_S_PKiS1_:
s_clause 0x2
s_load_b32 s12, s[0:1], 0x34
s_load_b256 s[4:11], s[0:1]... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0007e846_00000000-6_version1.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2065:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp... | .text
.file "version1.hip"
.globl _Z8testCUDA10hipError_tPKci # -- Begin function _Z8testCUDA10hipError_tPKci
.p2align 4, 0x90
.type _Z8testCUDA10hipError_tPKci,@function
_Z8testCUDA10hipError_tPKci: # @_Z8testCUDA10hipError_tPKci
.cfi_startproc
# %bb.0:
testl %edi, %edi
jne .LBB0_2
# %bb.1:
retq
.LBB0_2... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
__global__ void jacobi(double * uold, double * unew, double * f, int N, double lambda2){
int blockId = blockIdx.x + blockIdx.y * gridDim.x;
int index = blockId * (blockDim.x * blockDim.y) + (threadIdx.y * blockDim.x) + threadIdx.x;
if(index < N*N){
int M = N+2;
int i = index + M + 1 + 2 * (index / N)... | code for sm_80
Function : _Z6jacobiPdS_S_id
.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.Y ; /* 0x0000000000007919 */
/* 0x000e22000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
__global__ void jacobi(double * uold, double * unew, double * f, int N, double lambda2){
int blockId = blockIdx.x + blockIdx.y * gridDim.x;
int index = blockId * (blockDim.x * blockDim.y) + (threadIdx.y * blockDim.x) + threadIdx.x;
if(index < N*N){
int M = N+2;
int i = index + M + 1 + 2 * (index / N)... | .file "tmpxft_0014925a_00000000-6_jacobi.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2059:
.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>
__global__ void jacobi(double * uold, double * unew, double * f, int N, double lambda2){
int blockId = blockIdx.x + blockIdx.y * gridDim.x;
int index = blockId * (blockDim.x * blockDim.y) + (threadIdx.y * blockDim.x) + threadIdx.x;
if(index < N*N){
int M = N+2;
int i = index + M + 1 + 2 * (index / N)... | #include <hip/hip_runtime.h>
#include <stdio.h>
__global__ void jacobi(double * uold, double * unew, double * f, int N, double lambda2){
int blockId = blockIdx.x + blockIdx.y * gridDim.x;
int index = blockId * (blockDim.x * blockDim.y) + (threadIdx.y * blockDim.x) + threadIdx.x;
if(index < N*N){
int M = N+2;
int i = in... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
__global__ void jacobi(double * uold, double * unew, double * f, int N, double lambda2){
int blockId = blockIdx.x + blockIdx.y * gridDim.x;
int index = blockId * (blockDim.x * blockDim.y) + (threadIdx.y * blockDim.x) + threadIdx.x;
if(index < N*N){
int M = N+2;
int i = in... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6jacobiPdS_S_id
.globl _Z6jacobiPdS_S_id
.p2align 8
.type _Z6jacobiPdS_S_id,@function
_Z6jacobiPdS_S_id:
s_clause 0x2
s_load_b32 s3, s[0:1], 0x28
s_load_b32 s4, s[0:1], 0x34
s_load_b32 s2, s[0:1], 0x18
v_bfe_u32 v1, v0, 10, 10
s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.