system stringclasses 7
values | input stringlengths 10 94.5k | output stringlengths 14 55.5k |
|---|---|---|
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0009d04b_00000000-6_testing_size_of_shared_memory.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBin... | .text
.file "testing_size_of_shared_memory.hip"
.globl _Z14checkCUDAErrorPKc # -- Begin function _Z14checkCUDAErrorPKc
.p2align 4, 0x90
.type _Z14checkCUDAErrorPKc,@function
_Z14checkCUDAErrorPKc: # @_Z14checkCUDAErrorPKc
.cfi_startproc
# %bb.0:
pushq %r14
.cfi_def_cfa_offset 16
pushq %rbx
.c... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include<stdio.h>
#define N 1000
__global__ void addvec(int *a, int *b, int *c)
{
int tid=blockIdx.x; //manejar los datos a este índice
if(tid<N)
c[tid]=a[tid]+b[tid];
}
//función principal
int main(void){
int a[N], b[N], c[N];
int *dev_a, *dev_b, *dev_c;
//asignar memoria en la GPU
cudaMalloc((void**)&dev_a,N*sizeof(i... | code for sm_80
Function : _Z6addvecPiS_S_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_CTAID.X ; /* 0x0000000000067919 */
/* 0x000e240000002500 */
/*0020*/... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include<stdio.h>
#define N 1000
__global__ void addvec(int *a, int *b, int *c)
{
int tid=blockIdx.x; //manejar los datos a este índice
if(tid<N)
c[tid]=a[tid]+b[tid];
}
//función principal
int main(void){
int a[N], b[N], c[N];
int *dev_a, *dev_b, *dev_c;
//asignar memoria en la GPU
cudaMalloc((void**)&dev_a,N*sizeof(i... | .file "tmpxft_001236da_00000000-6_addition.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<stdio.h>
#define N 1000
__global__ void addvec(int *a, int *b, int *c)
{
int tid=blockIdx.x; //manejar los datos a este índice
if(tid<N)
c[tid]=a[tid]+b[tid];
}
//función principal
int main(void){
int a[N], b[N], c[N];
int *dev_a, *dev_b, *dev_c;
//asignar memoria en la GPU
cudaMalloc((void**)&dev_a,N*sizeof(i... | #include <hip/hip_runtime.h>
#include<stdio.h>
#define N 1000
__global__ void addvec(int *a, int *b, int *c)
{
int tid=blockIdx.x; //manejar los datos a este índice
if(tid<N)
c[tid]=a[tid]+b[tid];
}
//función principal
int main(void){
int a[N], b[N], c[N];
int *dev_a, *dev_b, *dev_c;
//asignar memoria en la GPU
hipMall... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include<stdio.h>
#define N 1000
__global__ void addvec(int *a, int *b, int *c)
{
int tid=blockIdx.x; //manejar los datos a este índice
if(tid<N)
c[tid]=a[tid]+b[tid];
}
//función principal
int main(void){
int a[N], b[N], c[N];
int *dev_a, *dev_b, *dev_c;
//asignar memoria en la GPU
hipMall... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6addvecPiS_S_
.globl _Z6addvecPiS_S_
.p2align 8
.type _Z6addvecPiS_S_,@function
_Z6addvecPiS_S_:
s_cmpk_gt_i32 s15, 0x3e7
s_cbranch_scc1 .LBB0_2
s_load_b128 s[4:7], s[0:1], 0x0
s_mov_b32 s2, s15
s_ashr_i32 s3, s15, 31
s_load... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include<stdio.h>
#define N 1000
__global__ void addvec(int *a, int *b, int *c)
{
int tid=blockIdx.x; //manejar los datos a este índice
if(tid<N)
c[tid]=a[tid]+b[tid];
}
//función principal
int main(void){
int a[N], b[N], c[N];
int *dev_a, *dev_b, *dev_c;
//asignar memoria en la GPU
hipMall... | .text
.file "addition.hip"
.globl _Z21__device_stub__addvecPiS_S_ # -- Begin function _Z21__device_stub__addvecPiS_S_
.p2align 4, 0x90
.type _Z21__device_stub__addvecPiS_S_,@function
_Z21__device_stub__addvecPiS_S_: # @_Z21__device_stub__addvecPiS_S_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset 11... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z6addvecPiS_S_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_CTAID.X ; /* 0x0000000000067919 */
/* 0x000e240000002500 */
/*0020*/... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6addvecPiS_S_
.globl _Z6addvecPiS_S_
.p2align 8
.type _Z6addvecPiS_S_,@function
_Z6addvecPiS_S_:
s_cmpk_gt_i32 s15, 0x3e7
s_cbranch_scc1 .LBB0_2
s_load_b128 s[4:7], s[0:1], 0x0
s_mov_b32 s2, s15
s_ashr_i32 s3, s15, 31
s_load... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001236da_00000000-6_addition.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 "addition.hip"
.globl _Z21__device_stub__addvecPiS_S_ # -- Begin function _Z21__device_stub__addvecPiS_S_
.p2align 4, 0x90
.type _Z21__device_stub__addvecPiS_S_,@function
_Z21__device_stub__addvecPiS_S_: # @_Z21__device_stub__addvecPiS_S_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset 11... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void kernelCalculateHistogram(unsigned int* histogram, unsigned char* rawPixels, long chunkSize, long totalPixels)
{
int id = blockDim.x * blockIdx.x + threadIdx.x;
int startPosition = id * chunkSize;
for (int i = startPosition; i < (startPosition + chunkSize); i++) {
if (i < totalPixel... | code for sm_80
Function : _Z24kernelCalculateHistogramPjPhll
.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 R2, RZ, RZ, c[0x0][0x170] ; /*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void kernelCalculateHistogram(unsigned int* histogram, unsigned char* rawPixels, long chunkSize, long totalPixels)
{
int id = blockDim.x * blockIdx.x + threadIdx.x;
int startPosition = id * chunkSize;
for (int i = startPosition; i < (startPosition + chunkSize); i++) {
if (i < totalPixel... | .file "tmpxft_001b9132_00000000-6_kernelCalculateHistogram.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@P... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void kernelCalculateHistogram(unsigned int* histogram, unsigned char* rawPixels, long chunkSize, long totalPixels)
{
int id = blockDim.x * blockIdx.x + threadIdx.x;
int startPosition = id * chunkSize;
for (int i = startPosition; i < (startPosition + chunkSize); i++) {
if (i < totalPixel... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void kernelCalculateHistogram(unsigned int* histogram, unsigned char* rawPixels, long chunkSize, long totalPixels)
{
int id = blockDim.x * blockIdx.x + threadIdx.x;
int startPosition = id * chunkSize;
for (int i = startPosition; i < (startPosition + chunkSiz... |
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 kernelCalculateHistogram(unsigned int* histogram, unsigned char* rawPixels, long chunkSize, long totalPixels)
{
int id = blockDim.x * blockIdx.x + threadIdx.x;
int startPosition = id * chunkSize;
for (int i = startPosition; i < (startPosition + chunkSiz... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z24kernelCalculateHistogramPjPhll
.globl _Z24kernelCalculateHistogramPjPhll
.p2align 8
.type _Z24kernelCalculateHistogramPjPhll,@function
_Z24kernelCalculateHistogramPjPhll:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x2c
s_load_b64 s[2:3], s[0:1], 0x10
s_wai... |
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 kernelCalculateHistogram(unsigned int* histogram, unsigned char* rawPixels, long chunkSize, long totalPixels)
{
int id = blockDim.x * blockIdx.x + threadIdx.x;
int startPosition = id * chunkSize;
for (int i = startPosition; i < (startPosition + chunkSiz... | .text
.file "kernelCalculateHistogram.hip"
.globl _Z39__device_stub__kernelCalculateHistogramPjPhll # -- Begin function _Z39__device_stub__kernelCalculateHistogramPjPhll
.p2align 4, 0x90
.type _Z39__device_stub__kernelCalculateHistogramPjPhll,@function
_Z39__device_stub__kernelCalculateHistogramPjPhll: # @_Z39__device_... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z24kernelCalculateHistogramPjPhll
.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 R2, RZ, RZ, c[0x0][0x170] ; /*... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z24kernelCalculateHistogramPjPhll
.globl _Z24kernelCalculateHistogramPjPhll
.p2align 8
.type _Z24kernelCalculateHistogramPjPhll,@function
_Z24kernelCalculateHistogramPjPhll:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x2c
s_load_b64 s[2:3], s[0:1], 0x10
s_wai... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001b9132_00000000-6_kernelCalculateHistogram.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@P... | .text
.file "kernelCalculateHistogram.hip"
.globl _Z39__device_stub__kernelCalculateHistogramPjPhll # -- Begin function _Z39__device_stub__kernelCalculateHistogramPjPhll
.p2align 4, 0x90
.type _Z39__device_stub__kernelCalculateHistogramPjPhll,@function
_Z39__device_stub__kernelCalculateHistogramPjPhll: # @_Z39__device_... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void initTempNodeArray( const int hitNum, const int allowableGap, int* tempNodeArray_score, int* tempNodeArray_vertical, int* tempNodeArray_horizontal, int* tempNodeArray_matchNum) {
const int bIdx = gridDim.x * blockIdx.y + blockIdx.x;
const int idx = blockDim.x * bIdx + threadIdx.x;
c... | code for sm_80
Function : _Z17initTempNodeArrayiiPiS_S_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.Y ; /* 0x0000000000007919 */
... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void initTempNodeArray( const int hitNum, const int allowableGap, int* tempNodeArray_score, int* tempNodeArray_vertical, int* tempNodeArray_horizontal, int* tempNodeArray_matchNum) {
const int bIdx = gridDim.x * blockIdx.y + blockIdx.x;
const int idx = blockDim.x * bIdx + threadIdx.x;
c... | .file "tmpxft_000fe717_00000000-6_initTempNodeArray.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 initTempNodeArray( const int hitNum, const int allowableGap, int* tempNodeArray_score, int* tempNodeArray_vertical, int* tempNodeArray_horizontal, int* tempNodeArray_matchNum) {
const int bIdx = gridDim.x * blockIdx.y + blockIdx.x;
const int idx = blockDim.x * bIdx + threadIdx.x;
c... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void initTempNodeArray( const int hitNum, const int allowableGap, int* tempNodeArray_score, int* tempNodeArray_vertical, int* tempNodeArray_horizontal, int* tempNodeArray_matchNum) {
const int bIdx = gridDim.x * blockIdx.y + blockIdx.x;
const int idx = block... |
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 initTempNodeArray( const int hitNum, const int allowableGap, int* tempNodeArray_score, int* tempNodeArray_vertical, int* tempNodeArray_horizontal, int* tempNodeArray_matchNum) {
const int bIdx = gridDim.x * blockIdx.y + blockIdx.x;
const int idx = block... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z17initTempNodeArrayiiPiS_S_S_
.globl _Z17initTempNodeArrayiiPiS_S_S_
.p2align 8
.type _Z17initTempNodeArrayiiPiS_S_S_,@function
_Z17initTempNodeArrayiiPiS_S_S_:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x28
s_load_b32 s3, s[0:1], 0x34
s_load_b64 s[4:5],... |
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 initTempNodeArray( const int hitNum, const int allowableGap, int* tempNodeArray_score, int* tempNodeArray_vertical, int* tempNodeArray_horizontal, int* tempNodeArray_matchNum) {
const int bIdx = gridDim.x * blockIdx.y + blockIdx.x;
const int idx = block... | .text
.file "initTempNodeArray.hip"
.globl _Z32__device_stub__initTempNodeArrayiiPiS_S_S_ # -- Begin function _Z32__device_stub__initTempNodeArrayiiPiS_S_S_
.p2align 4, 0x90
.type _Z32__device_stub__initTempNodeArrayiiPiS_S_S_,@function
_Z32__device_stub__initTempNodeArrayiiPiS_S_S_: # @_Z32__device_stub__initTempNodeA... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z17initTempNodeArrayiiPiS_S_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.Y ; /* 0x0000000000007919 */
... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z17initTempNodeArrayiiPiS_S_S_
.globl _Z17initTempNodeArrayiiPiS_S_S_
.p2align 8
.type _Z17initTempNodeArrayiiPiS_S_S_,@function
_Z17initTempNodeArrayiiPiS_S_S_:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x28
s_load_b32 s3, s[0:1], 0x34
s_load_b64 s[4:5],... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000fe717_00000000-6_initTempNodeArray.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 "initTempNodeArray.hip"
.globl _Z32__device_stub__initTempNodeArrayiiPiS_S_S_ # -- Begin function _Z32__device_stub__initTempNodeArrayiiPiS_S_S_
.p2align 4, 0x90
.type _Z32__device_stub__initTempNodeArrayiiPiS_S_S_,@function
_Z32__device_stub__initTempNodeArrayiiPiS_S_S_: # @_Z32__device_stub__initTempNodeA... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z22matproductsharedmemoryPxS_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 R29, SR_TID.X ; /* 0x00000000001d7919 */
... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z22matproductsharedmemoryPxS_S_
.globl _Z22matproductsharedmemoryPxS_S_
.p2align 8
.type _Z22matproductsharedmemoryPxS_S_,@function
_Z22matproductsharedmemoryPxS_S_:
s_clause 0x1
s_load_b64 s[8:9], s[0:1], 0x10
s_load_b128 s[4:7], s[0:1], 0x0
s_mov_b... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00022211_00000000-6_matMatMul.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, %rs... | .text
.file "matMatMul.hip"
.globl _Z37__device_stub__matproductsharedmemoryPxS_S_ # -- Begin function _Z37__device_stub__matproductsharedmemoryPxS_S_
.p2align 4, 0x90
.type _Z37__device_stub__matproductsharedmemoryPxS_S_,@function
_Z37__device_stub__matproductsharedmemoryPxS_S_: # @_Z37__device_stub__matproductsharedm... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <iostream>
#include <fstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <stdlib.h>
#include <vector>
#include <random>
using namespace std;
void printNeighbours(unordered_map<long, unordered_set<long>> neighbours) {
for (auto& n : neighbours) {
cout << n.first << ": ";
for (a... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <iostream>
#include <fstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <stdlib.h>
#include <vector>
#include <random>
using namespace std;
void printNeighbours(unordered_map<long, unordered_set<long>> neighbours) {
for (auto& n : neighbours) {
cout << n.first << ": ";
for (a... | #include <hip/hip_runtime.h>
#include <iostream>
#include <fstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <stdlib.h>
#include <vector>
#include <random>
using namespace std;
void printNeighbours(unordered_map<long, unordered_set<long>> neighbours) {
for (auto& n : neighbours) {
co... |
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>
#include <unordered_map>
#include <unordered_set>
#include <stdlib.h>
#include <vector>
#include <random>
using namespace std;
void printNeighbours(unordered_map<long, unordered_set<long>> neighbours) {
for (auto& n : neighbours) {
co... | .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 <iostream>
#include <math.h>
// Kernel function to generate random numbers
__global__
void genran(int *rnd,double m)
{
double n,a=1103515245, c=12345;
n=blockIdx.x*blockDim.x+threadIdx.x;
//n=threadIdx.x;
for(int i=0;i<threadIdx.x;i++)
n=fmod(((n*a)+c),m);
__syncthreads();
atomicAdd(&rnd[(unsigned long int)n],... | code for sm_80
Function : _Z6genranPid
.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.X ; /* 0x0000000000027919 */
/* 0x000e2200000025... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <iostream>
#include <math.h>
// Kernel function to generate random numbers
__global__
void genran(int *rnd,double m)
{
double n,a=1103515245, c=12345;
n=blockIdx.x*blockDim.x+threadIdx.x;
//n=threadIdx.x;
for(int i=0;i<threadIdx.x;i++)
n=fmod(((n*a)+c),m);
__syncthreads();
atomicAdd(&rnd[(unsigned long int)n],... | .file "tmpxft_0016f7e6_00000000-6_cuda10.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>
#include <math.h>
// Kernel function to generate random numbers
__global__
void genran(int *rnd,double m)
{
double n,a=1103515245, c=12345;
n=blockIdx.x*blockDim.x+threadIdx.x;
//n=threadIdx.x;
for(int i=0;i<threadIdx.x;i++)
n=fmod(((n*a)+c),m);
__syncthreads();
atomicAdd(&rnd[(unsigned long int)n],... | #include <hip/hip_runtime.h>
#include <iostream>
#include <math.h>
// Kernel function to generate random numbers
__global__
void genran(int *rnd,double m)
{
double n,a=1103515245, c=12345;
n=blockIdx.x*blockDim.x+threadIdx.x;
//n=threadIdx.x;
for(int i=0;i<threadIdx.x;i++)
n=fmod(((n*a)+c),m);
__syncthreads();
atomicAd... |
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>
// Kernel function to generate random numbers
__global__
void genran(int *rnd,double m)
{
double n,a=1103515245, c=12345;
n=blockIdx.x*blockDim.x+threadIdx.x;
//n=threadIdx.x;
for(int i=0;i<threadIdx.x;i++)
n=fmod(((n*a)+c),m);
__syncthreads();
atomicAd... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6genranPid
.globl _Z6genranPid
.p2align 8
.type _Z6genranPid,@function
_Z6genranPid:
s_load_b32 s2, s[0:1], 0x1c
s_mov_b32 s8, 0
s_mov_b32 s3, exec_lo
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_alu instid0(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>
// Kernel function to generate random numbers
__global__
void genran(int *rnd,double m)
{
double n,a=1103515245, c=12345;
n=blockIdx.x*blockDim.x+threadIdx.x;
//n=threadIdx.x;
for(int i=0;i<threadIdx.x;i++)
n=fmod(((n*a)+c),m);
__syncthreads();
atomicAd... | .text
.file "cuda10.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z21__device_stub__genranPid # -- Begin function _Z21__device_stub__genranPid
.p2align 4, 0x90
.t... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0016f7e6_00000000-6_cuda10.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 "cuda10.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z21__device_stub__genranPid # -- Begin function _Z21__device_stub__genranPid
.p2align 4, 0x90
.t... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void LeftRightBound2D(double *Hs, double *Ztopo, double *K2e, double *K2w, int BC2D, int M, int N) {
int tid = threadIdx.x + blockIdx.x * blockDim.x;
while (tid < M) {
// no-flow BCs
if (BC2D == 0) {
Hs[tid*N] = Hs[tid*N+1];
Hs[(tid+1)*N-1] = Hs[(tid+1)*N-2];
} else { // Critical depth ... | code for sm_80
Function : _Z16LeftRightBound2DPdS_S_S_iii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e28000000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void LeftRightBound2D(double *Hs, double *Ztopo, double *K2e, double *K2w, int BC2D, int M, int N) {
int tid = threadIdx.x + blockIdx.x * blockDim.x;
while (tid < M) {
// no-flow BCs
if (BC2D == 0) {
Hs[tid*N] = Hs[tid*N+1];
Hs[(tid+1)*N-1] = Hs[(tid+1)*N-2];
} else { // Critical depth ... | .file "tmpxft_00021ec0_00000000-6_LeftRightBound2D.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 LeftRightBound2D(double *Hs, double *Ztopo, double *K2e, double *K2w, int BC2D, int M, int N) {
int tid = threadIdx.x + blockIdx.x * blockDim.x;
while (tid < M) {
// no-flow BCs
if (BC2D == 0) {
Hs[tid*N] = Hs[tid*N+1];
Hs[(tid+1)*N-1] = Hs[(tid+1)*N-2];
} else { // Critical depth ... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void LeftRightBound2D(double *Hs, double *Ztopo, double *K2e, double *K2w, int BC2D, int M, int N) {
int tid = threadIdx.x + blockIdx.x * blockDim.x;
while (tid < M) {
// no-flow BCs
if (BC2D == 0) {
Hs[tid*N] = Hs[tid*N+1];
Hs[(tid+1)*N-1] = Hs[(tid+1)*N-2]... |
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 LeftRightBound2D(double *Hs, double *Ztopo, double *K2e, double *K2w, int BC2D, int M, int N) {
int tid = threadIdx.x + blockIdx.x * blockDim.x;
while (tid < M) {
// no-flow BCs
if (BC2D == 0) {
Hs[tid*N] = Hs[tid*N+1];
Hs[(tid+1)*N-1] = Hs[(tid+1)*N-2]... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z16LeftRightBound2DPdS_S_S_iii
.globl _Z16LeftRightBound2DPdS_S_S_iii
.p2align 8
.type _Z16LeftRightBound2DPdS_S_S_iii,@function
_Z16LeftRightBound2DPdS_S_S_iii:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x3c
s_load_b32 s10, s[0:1], 0x24
s_add_u32 s2, s0,... |
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 LeftRightBound2D(double *Hs, double *Ztopo, double *K2e, double *K2w, int BC2D, int M, int N) {
int tid = threadIdx.x + blockIdx.x * blockDim.x;
while (tid < M) {
// no-flow BCs
if (BC2D == 0) {
Hs[tid*N] = Hs[tid*N+1];
Hs[(tid+1)*N-1] = Hs[(tid+1)*N-2]... | .text
.file "LeftRightBound2D.hip"
.globl _Z31__device_stub__LeftRightBound2DPdS_S_S_iii # -- Begin function _Z31__device_stub__LeftRightBound2DPdS_S_S_iii
.p2align 4, 0x90
.type _Z31__device_stub__LeftRightBound2DPdS_S_S_iii,@function
_Z31__device_stub__LeftRightBound2DPdS_S_S_iii: # @_Z31__device_stub__LeftRightBound... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z16LeftRightBound2DPdS_S_S_iii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e28000000... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z16LeftRightBound2DPdS_S_S_iii
.globl _Z16LeftRightBound2DPdS_S_S_iii
.p2align 8
.type _Z16LeftRightBound2DPdS_S_S_iii,@function
_Z16LeftRightBound2DPdS_S_S_iii:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x3c
s_load_b32 s10, s[0:1], 0x24
s_add_u32 s2, s0,... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00021ec0_00000000-6_LeftRightBound2D.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 "LeftRightBound2D.hip"
.globl _Z31__device_stub__LeftRightBound2DPdS_S_S_iii # -- Begin function _Z31__device_stub__LeftRightBound2DPdS_S_S_iii
.p2align 4, 0x90
.type _Z31__device_stub__LeftRightBound2DPdS_S_S_iii,@function
_Z31__device_stub__LeftRightBound2DPdS_S_S_iii: # @_Z31__device_stub__LeftRightBound... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <iostream>
#include <ctype.h>
#include <vector>
#include <string>
typedef std::vector<double> double_vec;
int main()
{
double_vec aapl, msft;
std::string values;
std::string delimiter = " ";
while (true)
{
std::getline(std::cin, values);
if (!is... | #include <hip/hip_runtime.h>
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <iostream>
#include <ctype.h>
#include <vector>
#include <string>
typedef std::vector<double> double_vec;
int main()
{
double_vec aapl, msft;
std::string values;
std::string delimiter = " ";
while (true)
{
std::getli... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void lga_filter_backward (const int n, const float *bottom_data, const float *top_diff, const int height, const int width, const int channel, const int radius, float *filter_diff){
int index = blockIdx.x * blockDim.x + threadIdx.x;
if (index >= n)
{
return;
}
int step = height * width;
... | .file "tmpxft_000d69f3_00000000-6_lga_filter_backward.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
ad... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void lga_filter_backward (const int n, const float *bottom_data, const float *top_diff, const int height, const int width, const int channel, const int radius, float *filter_diff){
int index = blockIdx.x * blockDim.x + threadIdx.x;
if (index >= n)
{
return;
}
int step = height * width;
... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void lga_filter_backward (const int n, const float *bottom_data, const float *top_diff, const int height, const int width, const int channel, const int radius, float *filter_diff){
int index = blockIdx.x * blockDim.x + threadIdx.x;
if (index >= n)
{
return;
... |
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 lga_filter_backward (const int n, const float *bottom_data, const float *top_diff, const int height, const int width, const int channel, const int radius, float *filter_diff){
int index = blockIdx.x * blockDim.x + threadIdx.x;
if (index >= n)
{
return;
... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z19lga_filter_backwardiPKfS0_iiiiPf
.globl _Z19lga_filter_backwardiPKfS0_iiiiPf
.p2align 8
.type _Z19lga_filter_backwardiPKfS0_iiiiPf,@function
_Z19lga_filter_backwardiPKfS0_iiiiPf:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x3c
s_load_b32 s3, s[0:1], 0x0
s_wa... |
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 lga_filter_backward (const int n, const float *bottom_data, const float *top_diff, const int height, const int width, const int channel, const int radius, float *filter_diff){
int index = blockIdx.x * blockDim.x + threadIdx.x;
if (index >= n)
{
return;
... | .text
.file "lga_filter_backward.hip"
.globl _Z34__device_stub__lga_filter_backwardiPKfS0_iiiiPf # -- Begin function _Z34__device_stub__lga_filter_backwardiPKfS0_iiiiPf
.p2align 4, 0x90
.type _Z34__device_stub__lga_filter_backwardiPKfS0_iiiiPf,@function
_Z34__device_stub__lga_filter_backwardiPKfS0_iiiiPf: # @_Z34__devi... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000d69f3_00000000-6_lga_filter_backward.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
ad... | .text
.file "lga_filter_backward.hip"
.globl _Z34__device_stub__lga_filter_backwardiPKfS0_iiiiPf # -- Begin function _Z34__device_stub__lga_filter_backwardiPKfS0_iiiiPf
.p2align 4, 0x90
.type _Z34__device_stub__lga_filter_backwardiPKfS0_iiiiPf,@function
_Z34__device_stub__lga_filter_backwardiPKfS0_iiiiPf: # @_Z34__devi... |
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 BilinearResampleKernel(float *input, float *output, int inputWidth, int inputHeight, int outputWidth, int outputHeight)
{
int id = blockDim.x * blockIdx.y * gridDim.x
+ blockDim.x * blockIdx.x
+ threadIdx.x;
int size = outputWidth * outputHeight;
float iT, iB;
if (id < size)
{
//ou... | code for sm_80
Function : _Z22BilinearResampleKernelPfS_iiii
.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 ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void BilinearResampleKernel(float *input, float *output, int inputWidth, int inputHeight, int outputWidth, int outputHeight)
{
int id = blockDim.x * blockIdx.y * gridDim.x
+ blockDim.x * blockIdx.x
+ threadIdx.x;
int size = outputWidth * outputHeight;
float iT, iB;
if (id < size)
{
//ou... | .file "tmpxft_000d3e34_00000000-6_BilinearResampleKernel.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 BilinearResampleKernel(float *input, float *output, int inputWidth, int inputHeight, int outputWidth, int outputHeight)
{
int id = blockDim.x * blockIdx.y * gridDim.x
+ blockDim.x * blockIdx.x
+ threadIdx.x;
int size = outputWidth * outputHeight;
float iT, iB;
if (id < size)
{
//ou... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void BilinearResampleKernel(float *input, float *output, int inputWidth, int inputHeight, int outputWidth, int outputHeight)
{
int id = blockDim.x * blockIdx.y * gridDim.x
+ blockDim.x * blockIdx.x
+ threadIdx.x;
int size = outputWidth * outputHeight;
float ... |
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 BilinearResampleKernel(float *input, float *output, int inputWidth, int inputHeight, int outputWidth, int outputHeight)
{
int id = blockDim.x * blockIdx.y * gridDim.x
+ blockDim.x * blockIdx.x
+ threadIdx.x;
int size = outputWidth * outputHeight;
float ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z22BilinearResampleKernelPfS_iiii
.globl _Z22BilinearResampleKernelPfS_iiii
.p2align 8
.type _Z22BilinearResampleKernelPfS_iiii,@function
_Z22BilinearResampleKernelPfS_iiii:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x20
s_load_b32 s3, s[0:1], 0x2c
s_load_b6... |
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 BilinearResampleKernel(float *input, float *output, int inputWidth, int inputHeight, int outputWidth, int outputHeight)
{
int id = blockDim.x * blockIdx.y * gridDim.x
+ blockDim.x * blockIdx.x
+ threadIdx.x;
int size = outputWidth * outputHeight;
float ... | .text
.file "BilinearResampleKernel.hip"
.globl _Z37__device_stub__BilinearResampleKernelPfS_iiii # -- Begin function _Z37__device_stub__BilinearResampleKernelPfS_iiii
.p2align 4, 0x90
.type _Z37__device_stub__BilinearResampleKernelPfS_iiii,@function
_Z37__device_stub__BilinearResampleKernelPfS_iiii: # @_Z37__device_st... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z22BilinearResampleKernelPfS_iiii
.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 ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z22BilinearResampleKernelPfS_iiii
.globl _Z22BilinearResampleKernelPfS_iiii
.p2align 8
.type _Z22BilinearResampleKernelPfS_iiii,@function
_Z22BilinearResampleKernelPfS_iiii:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x20
s_load_b32 s3, s[0:1], 0x2c
s_load_b6... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000d3e34_00000000-6_BilinearResampleKernel.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 "BilinearResampleKernel.hip"
.globl _Z37__device_stub__BilinearResampleKernelPfS_iiii # -- Begin function _Z37__device_stub__BilinearResampleKernelPfS_iiii
.p2align 4, 0x90
.type _Z37__device_stub__BilinearResampleKernelPfS_iiii,@function
_Z37__device_stub__BilinearResampleKernelPfS_iiii: # @_Z37__device_st... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include<stdlib.h>
#include<stdio.h>
__global__ void add(int* a , int *b,int *c)
{
*c = *a + *b;
}
int main(void)
{
int a , b ,c;
int *d_a , *d_b ,*d_c;
int size = sizeof(int);
cudaMalloc((void**)&d_a,size);
cudaMalloc((void**)&d_b,size);
cudaMalloc((void**)&d_c,size);
a = 3;
b = 5;
cudaMemcpy(d_a,&a,size,cudaMemcpyHos... | code for sm_80
Function : _Z3addPiS_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*/ IMAD.MOV.U32 R2, RZ, RZ, c[0x0][0x160] ; /* 0x00005800ff027624 */... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include<stdlib.h>
#include<stdio.h>
__global__ void add(int* a , int *b,int *c)
{
*c = *a + *b;
}
int main(void)
{
int a , b ,c;
int *d_a , *d_b ,*d_c;
int size = sizeof(int);
cudaMalloc((void**)&d_a,size);
cudaMalloc((void**)&d_b,size);
cudaMalloc((void**)&d_c,size);
a = 3;
b = 5;
cudaMemcpy(d_a,&a,size,cudaMemcpyHos... | .file "tmpxft_000dee9c_00000000-6_sample.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<stdlib.h>
#include<stdio.h>
__global__ void add(int* a , int *b,int *c)
{
*c = *a + *b;
}
int main(void)
{
int a , b ,c;
int *d_a , *d_b ,*d_c;
int size = sizeof(int);
cudaMalloc((void**)&d_a,size);
cudaMalloc((void**)&d_b,size);
cudaMalloc((void**)&d_c,size);
a = 3;
b = 5;
cudaMemcpy(d_a,&a,size,cudaMemcpyHos... | #include <hip/hip_runtime.h>
#include<stdlib.h>
#include<stdio.h>
__global__ void add(int* a , int *b,int *c)
{
*c = *a + *b;
}
int main(void)
{
int a , b ,c;
int *d_a , *d_b ,*d_c;
int size = sizeof(int);
hipMalloc((void**)&d_a,size);
hipMalloc((void**)&d_b,size);
hipMalloc((void**)&d_c,size);
a = 3;
b = 5;
hipMemcpy(... |
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>
__global__ void add(int* a , int *b,int *c)
{
*c = *a + *b;
}
int main(void)
{
int a , b ,c;
int *d_a , *d_b ,*d_c;
int size = sizeof(int);
hipMalloc((void**)&d_a,size);
hipMalloc((void**)&d_b,size);
hipMalloc((void**)&d_c,size);
a = 3;
b = 5;
hipMemcpy(... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3addPiS_S_
.globl _Z3addPiS_S_
.p2align 8
.type _Z3addPiS_S_,@function
_Z3addPiS_S_:
s_clause 0x1
s_load_b128 s[4:7], s[0:1], 0x0
s_load_b64 s[0:1], s[0:1], 0x10
s_waitcnt lgkmcnt(0)
s_load_b32 s2, s[4:5], 0x0
s_load_b... |
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>
__global__ void add(int* a , int *b,int *c)
{
*c = *a + *b;
}
int main(void)
{
int a , b ,c;
int *d_a , *d_b ,*d_c;
int size = sizeof(int);
hipMalloc((void**)&d_a,size);
hipMalloc((void**)&d_b,size);
hipMalloc((void**)&d_c,size);
a = 3;
b = 5;
hipMemcpy(... | .text
.file "sample.hip"
.globl _Z18__device_stub__addPiS_S_ # -- Begin function _Z18__device_stub__addPiS_S_
.p2align 4, 0x90
.type _Z18__device_stub__addPiS_S_,@function
_Z18__device_stub__addPiS_S_: # @_Z18__device_stub__addPiS_S_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset 112
movq %rdi... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z3addPiS_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*/ IMAD.MOV.U32 R2, RZ, RZ, c[0x0][0x160] ; /* 0x00005800ff027624 */... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3addPiS_S_
.globl _Z3addPiS_S_
.p2align 8
.type _Z3addPiS_S_,@function
_Z3addPiS_S_:
s_clause 0x1
s_load_b128 s[4:7], s[0:1], 0x0
s_load_b64 s[0:1], s[0:1], 0x10
s_waitcnt lgkmcnt(0)
s_load_b32 s2, s[4:5], 0x0
s_load_b... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000dee9c_00000000-6_sample.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 "sample.hip"
.globl _Z18__device_stub__addPiS_S_ # -- Begin function _Z18__device_stub__addPiS_S_
.p2align 4, 0x90
.type _Z18__device_stub__addPiS_S_,@function
_Z18__device_stub__addPiS_S_: # @_Z18__device_stub__addPiS_S_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset 112
movq %rdi... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
#define BLOCK_SIZE 16
typedef struct {
int width;
int height;
float* elements;
} Matrix;
__global__
void MatMulKernel(Matrix A, Matrix B, Matrix C)
{
// Each thread computes one element of C
// by accumulating results into Cvalue
float Cvalue = 0;
int row = blockIdx.y * blockDim.y... | code for sm_80
Function : _Z12MatMulKernel6MatrixS_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 */
/* 0x000e280000002500... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
#define BLOCK_SIZE 16
typedef struct {
int width;
int height;
float* elements;
} Matrix;
__global__
void MatMulKernel(Matrix A, Matrix B, Matrix C)
{
// Each thread computes one element of C
// by accumulating results into Cvalue
float Cvalue = 0;
int row = blockIdx.y * blockDim.y... | .file "tmpxft_001257fa_00000000-6_matrixmultiply.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <stdlib.h>
#define BLOCK_SIZE 16
typedef struct {
int width;
int height;
float* elements;
} Matrix;
__global__
void MatMulKernel(Matrix A, Matrix B, Matrix C)
{
// Each thread computes one element of C
// by accumulating results into Cvalue
float Cvalue = 0;
int row = blockIdx.y * blockDim.y... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#define BLOCK_SIZE 16
typedef struct {
int width;
int height;
float* elements;
} Matrix;
__global__
void MatMulKernel(Matrix A, Matrix B, Matrix C)
{
// Each thread computes one element of C
// by accumulating results into Cvalue
float Cvalue = 0;
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>
#define BLOCK_SIZE 16
typedef struct {
int width;
int height;
float* elements;
} Matrix;
__global__
void MatMulKernel(Matrix A, Matrix B, Matrix C)
{
// Each thread computes one element of C
// by accumulating results into Cvalue
float Cvalue = 0;
int ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z12MatMulKernel6MatrixS_S_
.globl _Z12MatMulKernel6MatrixS_S_
.p2align 8
.type _Z12MatMulKernel6MatrixS_S_,@function
_Z12MatMulKernel6MatrixS_S_:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x3c
s_load_b32 s3, s[0:1], 0x4
s_load_b32 s6, s[0:1], 0x10
v_b... |
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>
#define BLOCK_SIZE 16
typedef struct {
int width;
int height;
float* elements;
} Matrix;
__global__
void MatMulKernel(Matrix A, Matrix B, Matrix C)
{
// Each thread computes one element of C
// by accumulating results into Cvalue
float Cvalue = 0;
int ... | .text
.file "matrixmultiply.hip"
.globl _Z27__device_stub__MatMulKernel6MatrixS_S_ # -- Begin function _Z27__device_stub__MatMulKernel6MatrixS_S_
.p2align 4, 0x90
.type _Z27__device_stub__MatMulKernel6MatrixS_S_,@function
_Z27__device_stub__MatMulKernel6MatrixS_S_: # @_Z27__device_stub__MatMulKernel6MatrixS_S_
.cfi_sta... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z12MatMulKernel6MatrixS_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 */
/* 0x000e280000002500... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z12MatMulKernel6MatrixS_S_
.globl _Z12MatMulKernel6MatrixS_S_
.p2align 8
.type _Z12MatMulKernel6MatrixS_S_,@function
_Z12MatMulKernel6MatrixS_S_:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x3c
s_load_b32 s3, s[0:1], 0x4
s_load_b32 s6, s[0:1], 0x10
v_b... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001257fa_00000000-6_matrixmultiply.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8... | .text
.file "matrixmultiply.hip"
.globl _Z27__device_stub__MatMulKernel6MatrixS_S_ # -- Begin function _Z27__device_stub__MatMulKernel6MatrixS_S_
.p2align 4, 0x90
.type _Z27__device_stub__MatMulKernel6MatrixS_S_,@function
_Z27__device_stub__MatMulKernel6MatrixS_S_: # @_Z27__device_stub__MatMulKernel6MatrixS_S_
.cfi_sta... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | //---------------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <iostream>
//---------------------------------------------------------------------------------
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// **** A = M x N **** AxB=C
//**** B = ... | code for sm_80
Function : _Z15MatrixMulKerneliiiiiiPjS_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.Y ; /* 0x0000000000007919 */
... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | //---------------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <iostream>
//---------------------------------------------------------------------------------
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// **** A = M x N **** AxB=C
//**** B = ... | .file "tmpxft_00061c9a_00000000-6_matrixMul.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 __cuda... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | //---------------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <iostream>
//---------------------------------------------------------------------------------
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// **** A = M x N **** AxB=C
//**** B = ... | //---------------------------------------------------------------------------------
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <iostream>
//---------------------------------------------------------------------------------
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// **** A =... |
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 <time.h>
#include <iostream>
//---------------------------------------------------------------------------------
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// **** A =... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z15MatrixMulKerneliiiiiiPjS_S_
.globl _Z15MatrixMulKerneliiiiiiPjS_S_
.p2align 8
.type _Z15MatrixMulKerneliiiiiiPjS_S_,@function
_Z15MatrixMulKerneliiiiiiPjS_S_:
s_load_b32 s3, s[0:1], 0x4
v_bfe_u32 v1, v0, 10, 10
v_and_b32_e32 v0, 0x3ff, v0
s_delay... |
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 <time.h>
#include <iostream>
//---------------------------------------------------------------------------------
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// **** A =... | .text
.file "matrixMul.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z30__device_stub__MatrixMulKerneliiiiiiPjS_S_ # -- Begin function _Z30__device_stub__MatrixMulKe... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z15MatrixMulKerneliiiiiiPjS_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.Y ; /* 0x0000000000007919 */
... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z15MatrixMulKerneliiiiiiPjS_S_
.globl _Z15MatrixMulKerneliiiiiiPjS_S_
.p2align 8
.type _Z15MatrixMulKerneliiiiiiPjS_S_,@function
_Z15MatrixMulKerneliiiiiiPjS_S_:
s_load_b32 s3, s[0:1], 0x4
v_bfe_u32 v1, v0, 10, 10
v_and_b32_e32 v0, 0x3ff, v0
s_delay... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
__global__ void vectorMultiplyBy2(float *v, float *w, size_t n)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
w[i] = v[i] * 2;
}
int main() {
size_t N = 1024 * 1024 * 1024;
size_t size = N * sizeof(float);
float *a = (float *) malloc(size);
float *b = (float *) malloc(size);
float *b_check = (floa... | code for sm_80
Function : _Z17vectorMultiplyBy2PfS_m
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e220000002500 ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
__global__ void vectorMultiplyBy2(float *v, float *w, size_t n)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
w[i] = v[i] * 2;
}
int main() {
size_t N = 1024 * 1024 * 1024;
size_t size = N * sizeof(float);
float *a = (float *) malloc(size);
float *b = (float *) malloc(size);
float *b_check = (floa... | .file "tmpxft_0019ea13_00000000-6_vector_multiply_by_2.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
a... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
__global__ void vectorMultiplyBy2(float *v, float *w, size_t n)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
w[i] = v[i] * 2;
}
int main() {
size_t N = 1024 * 1024 * 1024;
size_t size = N * sizeof(float);
float *a = (float *) malloc(size);
float *b = (float *) malloc(size);
float *b_check = (floa... | #include <hip/hip_runtime.h>
#include <stdio.h>
__global__ void vectorMultiplyBy2(float *v, float *w, size_t n)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
w[i] = v[i] * 2;
}
int main() {
size_t N = 1024 * 1024 * 1024;
size_t size = N * sizeof(float);
float *a = (float *) malloc(size);
float *b = (float *) malloc(... |
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 vectorMultiplyBy2(float *v, float *w, size_t n)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
w[i] = v[i] * 2;
}
int main() {
size_t N = 1024 * 1024 * 1024;
size_t size = N * sizeof(float);
float *a = (float *) malloc(size);
float *b = (float *) malloc(... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z17vectorMultiplyBy2PfS_m
.globl _Z17vectorMultiplyBy2PfS_m
.p2align 8
.type _Z17vectorMultiplyBy2PfS_m,@function
_Z17vectorMultiplyBy2PfS_m:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x24
s_load_b128 s[0:3], s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_and_b3... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
__global__ void vectorMultiplyBy2(float *v, float *w, size_t n)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
w[i] = v[i] * 2;
}
int main() {
size_t N = 1024 * 1024 * 1024;
size_t size = N * sizeof(float);
float *a = (float *) malloc(size);
float *b = (float *) malloc(... | .text
.file "vector_multiply_by_2.hip"
.globl _Z32__device_stub__vectorMultiplyBy2PfS_m # -- Begin function _Z32__device_stub__vectorMultiplyBy2PfS_m
.p2align 4, 0x90
.type _Z32__device_stub__vectorMultiplyBy2PfS_m,@function
_Z32__device_stub__vectorMultiplyBy2PfS_m: # @_Z32__device_stub__vectorMultiplyBy2PfS_m
.cfi_st... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z17vectorMultiplyBy2PfS_m
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e220000002500 ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z17vectorMultiplyBy2PfS_m
.globl _Z17vectorMultiplyBy2PfS_m
.p2align 8
.type _Z17vectorMultiplyBy2PfS_m,@function
_Z17vectorMultiplyBy2PfS_m:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x24
s_load_b128 s[0:3], s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_and_b3... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0019ea13_00000000-6_vector_multiply_by_2.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
a... | .text
.file "vector_multiply_by_2.hip"
.globl _Z32__device_stub__vectorMultiplyBy2PfS_m # -- Begin function _Z32__device_stub__vectorMultiplyBy2PfS_m
.p2align 4, 0x90
.type _Z32__device_stub__vectorMultiplyBy2PfS_m,@function
_Z32__device_stub__vectorMultiplyBy2PfS_m: # @_Z32__device_stub__vectorMultiplyBy2PfS_m
.cfi_st... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not ... | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <math.h>
__global__ void cuda_hello(){
printf("Hello World from GPU!\n");
}
int main(){
cuda_hello<<<1,1>>>();
printf("Hello World from CPU!\n");
cudaGetLastError();
return 0;
} | code for sm_80
Function : _Z10cuda_hellov
.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*/ MOV R0, 0x0 ; /* 0x0000000000007802 */
/* 0x000fe20000000f00 *... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <math.h>
__global__ void cuda_hello(){
printf("Hello World from GPU!\n");
}
int main(){
cuda_hello<<<1,1>>>();
printf("Hello World from CPU!\n");
cudaGetLastError();
return 0;
} | .file "tmpxft_000bbab2_00000000-6_matrixNorm.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 <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <math.h>
__global__ void cuda_hello(){
printf("Hello World from GPU!\n");
}
int main(){
cuda_hello<<<1,1>>>();
printf("Hello World from CPU!\n");
cudaGetLastError();
return 0;
} | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <math.h>
__global__ void cuda_hello(){
printf("Hello World from GPU!\n");
}
int main(){
cuda_hello<<<1,1>>>();
printf("Hello World from CPU!\n");
hipGetLastError();
return 0;
} |
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 <time.h>
#include <sys/time.h>
#include <math.h>
__global__ void cuda_hello(){
printf("Hello World from GPU!\n");
}
int main(){
cuda_hello<<<1,1>>>();
printf("Hello World from CPU!\n");
hipGetLastError();
return 0;
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10cuda_hellov
.globl _Z10cuda_hellov
.p2align 8
.type _Z10cuda_hellov,@function
_Z10cuda_hellov:
s_load_b64 s[2:3], s[0:1], 0x50
v_mbcnt_lo_u32_b32 v20, -1, 0
v_mov_b32_e32 v6, 0
s_delay_alu instid0(VALU_DEP_2) | instskip(SK... |
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 <time.h>
#include <sys/time.h>
#include <math.h>
__global__ void cuda_hello(){
printf("Hello World from GPU!\n");
}
int main(){
cuda_hello<<<1,1>>>();
printf("Hello World from CPU!\n");
hipGetLastError();
return 0;
} | .text
.file "matrixNorm.hip"
.globl _Z25__device_stub__cuda_hellov # -- Begin function _Z25__device_stub__cuda_hellov
.p2align 4, 0x90
.type _Z25__device_stub__cuda_hellov,@function
_Z25__device_stub__cuda_hellov: # @_Z25__device_stub__cuda_hellov
.cfi_startproc
# %bb.0:
subq $56, %rsp
.cfi_def_cfa_offset 64
l... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z10cuda_hellov
.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*/ MOV R0, 0x0 ; /* 0x0000000000007802 */
/* 0x000fe20000000f00 *... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10cuda_hellov
.globl _Z10cuda_hellov
.p2align 8
.type _Z10cuda_hellov,@function
_Z10cuda_hellov:
s_load_b64 s[2:3], s[0:1], 0x50
v_mbcnt_lo_u32_b32 v20, -1, 0
v_mov_b32_e32 v6, 0
s_delay_alu instid0(VALU_DEP_2) | instskip(SK... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000bbab2_00000000-6_matrixNorm.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 "matrixNorm.hip"
.globl _Z25__device_stub__cuda_hellov # -- Begin function _Z25__device_stub__cuda_hellov
.p2align 4, 0x90
.type _Z25__device_stub__cuda_hellov,@function
_Z25__device_stub__cuda_hellov: # @_Z25__device_stub__cuda_hellov
.cfi_startproc
# %bb.0:
subq $56, %rsp
.cfi_def_cfa_offset 64
l... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | __global__ void variance2(double *g_idata, double *g_odata, double* reduce_sum, double sum_divider){
double mean = reduce_sum[0] / sum_divider;
// Sequential addressing is conflict free
extern __shared__ double sdata[];
// each thread loads one element from global to shared mem
unsigned int tid = threadIdx.x;
unsigned... | .file "tmpxft_00065d53_00000000-6_reductionMixed.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. | __global__ void variance2(double *g_idata, double *g_odata, double* reduce_sum, double sum_divider){
double mean = reduce_sum[0] / sum_divider;
// Sequential addressing is conflict free
extern __shared__ double sdata[];
// each thread loads one element from global to shared mem
unsigned int tid = threadIdx.x;
unsigned... | #include <hip/hip_runtime.h>
//#ifndef VARIANCE_CUDA_H
//#define VARIANCE_CUDA_H
__global__ void variance2(double *g_idata, double *g_odata, double* reduce_sum, double sum_divider);
__global__ void norm_fro(double *g_idata, double *g_odata);
__global__ void norm_fro2(double *g_idata1, double *g_idata2, double *g_odata)... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
//#ifndef VARIANCE_CUDA_H
//#define VARIANCE_CUDA_H
__global__ void variance2(double *g_idata, double *g_odata, double* reduce_sum, double sum_divider);
__global__ void norm_fro(double *g_idata, double *g_odata);
__global__ void norm_fro2(double *g_idata1, double *g_idata2, double *g_odata)... | .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>
//#ifndef VARIANCE_CUDA_H
//#define VARIANCE_CUDA_H
__global__ void variance2(double *g_idata, double *g_odata, double* reduce_sum, double sum_divider);
__global__ void norm_fro(double *g_idata, double *g_odata);
__global__ void norm_fro2(double *g_idata1, double *g_idata2, double *g_odata)... | .text
.file "reductionMixed.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-p... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00065d53_00000000-6_reductionMixed.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 "reductionMixed.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-p... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <cuda.h>
#include <stdlib.h>
#include <assert.h>
#define N 2//64
__device__ int f(int x) {
return x + 2;
}
__global__ void foo(int *y, int x) {
*y = f(x);
} | code for sm_80
Function : _Z3fooPii
.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][0x168] ; /* 0x00005a00ff057624 */
/*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <cuda.h>
#include <stdlib.h>
#include <assert.h>
#define N 2//64
__device__ int f(int x) {
return x + 2;
}
__global__ void foo(int *y, int x) {
*y = f(x);
} | .file "tmpxft_0015cd7c_00000000-6_main.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <cuda.h>
#include <stdlib.h>
#include <assert.h>
#define N 2//64
__device__ int f(int x) {
return x + 2;
}
__global__ void foo(int *y, int x) {
*y = f(x);
} | #include <stdio.h>
#include <hip/hip_runtime.h>
#include <stdlib.h>
#include <assert.h>
#define N 2//64
__device__ int f(int x) {
return x + 2;
}
__global__ void foo(int *y, int x) {
*y = f(x);
} |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdio.h>
#include <hip/hip_runtime.h>
#include <stdlib.h>
#include <assert.h>
#define N 2//64
__device__ int f(int x) {
return x + 2;
}
__global__ void foo(int *y, int x) {
*y = f(x);
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3fooPii
.globl _Z3fooPii
.p2align 8
.type _Z3fooPii,@function
_Z3fooPii:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x8
s_load_b64 s[0:1], s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_add_i32 s2, s2, 2
s_delay_alu instid0(SALU_CY... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdio.h>
#include <hip/hip_runtime.h>
#include <stdlib.h>
#include <assert.h>
#define N 2//64
__device__ int f(int x) {
return x + 2;
}
__global__ void foo(int *y, int x) {
*y = f(x);
} | .text
.file "main.hip"
.globl _Z18__device_stub__fooPii # -- Begin function _Z18__device_stub__fooPii
.p2align 4, 0x90
.type _Z18__device_stub__fooPii,@function
_Z18__device_stub__fooPii: # @_Z18__device_stub__fooPii
.cfi_startproc
# %bb.0:
subq $88, %rsp
.cfi_def_cfa_offset 96
movq %rdi, 56(%rsp)
mo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.