system stringclasses 7
values | input stringlengths 10 94.5k | output stringlengths 14 55.5k |
|---|---|---|
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <iostream>
int main( int argc, char* argv[] )
{
// Size of vectors
int n = 10;
// Device input vectors
double *d_a;
// Size, in bytes, of each vector
size_t bytes = n*sizeof(double);
// Allocate memory for each vector on ... | .text
.file "vector_add.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl main # -- Begin function main
.p2align 4, 0x90
.type main,@function
m... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80 | .text
.p2alignl 7, 3214868480
.fill 96, 4, 3214868480
.type __hip_cuid_,@object
.section .bss,"aw",@nobits
.globl __hip_cuid_
__hip_cuid_:
.byte 0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00169a73_00000000-6_vector_add.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 "vector_add.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl main # -- Begin function main
.p2align 4, 0x90
.type main,@function
m... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#define HANDLE_ERROR(err) \
do { if (err != cudaSuccess) { printf("ERROR: %s\n", cudaGetErrorString(err)); exit(0);} } while (0)
__constant__ double AVG[32][3];
__constant__ double COV[32][3][3];
__constant__ double COV_INV[32][3][3];
__constant_... | .file "tmpxft_0017a0fd_00000000-6_main.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4169:
.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 <vector>
#include <cmath>
#define HANDLE_ERROR(err) \
do { if (err != cudaSuccess) { printf("ERROR: %s\n", cudaGetErrorString(err)); exit(0);} } while (0)
__constant__ double AVG[32][3];
__constant__ double COV[32][3][3];
__constant__ double COV_INV[32][3][3];
__constant_... | #include <hip/hip_runtime.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#define HANDLE_ERROR(err) \
do { if (err != hipSuccess) { printf("ERROR: %s\n", hipGetErrorString(err)); exit(0);} } while (0)
__constant__ double AVG[32][3];
__constant__ double COV[32][3][3];
__constant__ double COV... |
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 <vector>
#include <cmath>
#define HANDLE_ERROR(err) \
do { if (err != hipSuccess) { printf("ERROR: %s\n", hipGetErrorString(err)); exit(0);} } while (0)
__constant__ double AVG[32][3];
__constant__ double COV[32][3][3];
__constant__ double COV... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6kernelP15HIP_vector_typeIhLj4EEiii
.globl _Z6kernelP15HIP_vector_typeIhLj4EEiii
.p2align 8
.type _Z6kernelP15HIP_vector_typeIhLj4EEiii,@function
_Z6kernelP15HIP_vector_typeIhLj4EEiii:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x24
s_load_b32 s33, s[0:1], 0x8
... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | // A C / C++ program for Prim's Minimum
// Spanning Tree (MST) algorithm. The program is
// for adjacency matrix representation of the graph
#include <stdio.h>
#include <limits.h>
#include<stdbool.h>
#include <cstdlib>
#include <ctime>
#include <algorithm>
// Number of vertices in the graph
#define V 26
#define... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | // A C / C++ program for Prim's Minimum
// Spanning Tree (MST) algorithm. The program is
// for adjacency matrix representation of the graph
#include <stdio.h>
#include <limits.h>
#include<stdbool.h>
#include <cstdlib>
#include <ctime>
#include <algorithm>
// Number of vertices in the graph
#define V 26
#define... | .file "tmpxft_000cf4c1_00000000-6_kernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2343:
.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. | // A C / C++ program for Prim's Minimum
// Spanning Tree (MST) algorithm. The program is
// for adjacency matrix representation of the graph
#include <stdio.h>
#include <limits.h>
#include<stdbool.h>
#include <cstdlib>
#include <ctime>
#include <algorithm>
// Number of vertices in the graph
#define V 26
#define... | // A C / C++ program for Prim's Minimum
// Spanning Tree (MST) algorithm. The program is
// for adjacency matrix representation of the graph
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <limits.h>
#include<stdbool.h>
#include <cstdlib>
#include <ctime>
#include <algorithm>
// Number of vertices in the... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | // A C / C++ program for Prim's Minimum
// Spanning Tree (MST) algorithm. The program is
// for adjacency matrix representation of the graph
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <limits.h>
#include<stdbool.h>
#include <cstdlib>
#include <ctime>
#include <algorithm>
// Number of vertices in the... | .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. | // A C / C++ program for Prim's Minimum
// Spanning Tree (MST) algorithm. The program is
// for adjacency matrix representation of the graph
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <limits.h>
#include<stdbool.h>
#include <cstdlib>
#include <ctime>
#include <algorithm>
// Number of vertices in the... | .text
.file "kernel.hip"
.globl _Z6minKeyPiPb # -- Begin function _Z6minKeyPiPb
.p2align 4, 0x90
.type _Z6minKeyPiPb,@function
_Z6minKeyPiPb: # @_Z6minKeyPiPb
.cfi_startproc
# %bb.0:
movl $2147483647, %ecx # imm = 0x7FFFFFFF
xorl %edx, %edx
xorl %eax, %eax
jmp .L... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80 | .text
.p2alignl 7, 3214868480
.fill 96, 4, 3214868480
.type __hip_cuid_,@object
.section .bss,"aw",@nobits
.globl __hip_cuid_
__hip_cuid_:
.byte 0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000cf4c1_00000000-6_kernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2343:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.... | .text
.file "kernel.hip"
.globl _Z6minKeyPiPb # -- Begin function _Z6minKeyPiPb
.p2align 4, 0x90
.type _Z6minKeyPiPb,@function
_Z6minKeyPiPb: # @_Z6minKeyPiPb
.cfi_startproc
# %bb.0:
movl $2147483647, %ecx # imm = 0x7FFFFFFF
xorl %edx, %edx
xorl %eax, %eax
jmp .L... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <sstream>
#include <fstream>
#include <set>
#include <iostream>
#include <map>
#include <vector>
#include <iostream>
#include <bits/stdc++.h>
#include <sstream>
#include <ctime>
#include <cstdint>
#include <stdint.h>
#define SQUEEZE 32
#define DELIMITR " "
#define IS_CHANGED 1
#define NOT_CHANGED 0
#define BLO... | #include <hip/hip_runtime.h>
#include <sstream>
#include <fstream>
#include <set>
#include <iostream>
#include <map>
#include <vector>
#include <iostream>
#include <bits/stdc++.h>
#include <sstream>
#include <ctime>
#include <cstdint>
#include <stdint.h>
#define SQUEEZE 32
#define DELIMITR " "
#define IS_CHANGED 1
#def... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void transposeGlobalRow(float *in, float *out, const int nx, const int ny)
{
unsigned int i = threadIdx.x+blockDim.x*blockIdx.x;
unsigned int j = threadIdx.y+blockDim.y*blockIdx.y;
if (i<nx && j<ny)
{
out[i*ny+j] = in[j*nx+i];
}
} | code for sm_80
Function : _Z18transposeGlobalRowPfS_ii
.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 R5, SR_CTAID.Y ; /* 0x0000000000057919 */
/* 0x000e28000000260... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void transposeGlobalRow(float *in, float *out, const int nx, const int ny)
{
unsigned int i = threadIdx.x+blockDim.x*blockIdx.x;
unsigned int j = threadIdx.y+blockDim.y*blockIdx.y;
if (i<nx && j<ny)
{
out[i*ny+j] = in[j*nx+i];
}
} | .file "tmpxft_000480da_00000000-6_transposeGlobalRow.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
add... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void transposeGlobalRow(float *in, float *out, const int nx, const int ny)
{
unsigned int i = threadIdx.x+blockDim.x*blockIdx.x;
unsigned int j = threadIdx.y+blockDim.y*blockIdx.y;
if (i<nx && j<ny)
{
out[i*ny+j] = in[j*nx+i];
}
} | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void transposeGlobalRow(float *in, float *out, const int nx, const int ny)
{
unsigned int i = threadIdx.x+blockDim.x*blockIdx.x;
unsigned int j = threadIdx.y+blockDim.y*blockIdx.y;
if (i<nx && j<ny)
{
out[i*ny+j] = in[j*nx+i];
}
} |
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 transposeGlobalRow(float *in, float *out, const int nx, const int ny)
{
unsigned int i = threadIdx.x+blockDim.x*blockIdx.x;
unsigned int j = threadIdx.y+blockDim.y*blockIdx.y;
if (i<nx && j<ny)
{
out[i*ny+j] = in[j*nx+i];
}
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z18transposeGlobalRowPfS_ii
.globl _Z18transposeGlobalRowPfS_ii
.p2align 8
.type _Z18transposeGlobalRowPfS_ii,@function
_Z18transposeGlobalRowPfS_ii:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b64 s[4:5], s[0:1], 0x10
v_and_b32_e32 v2, 0x3ff... |
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 transposeGlobalRow(float *in, float *out, const int nx, const int ny)
{
unsigned int i = threadIdx.x+blockDim.x*blockIdx.x;
unsigned int j = threadIdx.y+blockDim.y*blockIdx.y;
if (i<nx && j<ny)
{
out[i*ny+j] = in[j*nx+i];
}
} | .text
.file "transposeGlobalRow.hip"
.globl _Z33__device_stub__transposeGlobalRowPfS_ii # -- Begin function _Z33__device_stub__transposeGlobalRowPfS_ii
.p2align 4, 0x90
.type _Z33__device_stub__transposeGlobalRowPfS_ii,@function
_Z33__device_stub__transposeGlobalRowPfS_ii: # @_Z33__device_stub__transposeGlobalRowPfS_ii... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z18transposeGlobalRowPfS_ii
.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 R5, SR_CTAID.Y ; /* 0x0000000000057919 */
/* 0x000e28000000260... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z18transposeGlobalRowPfS_ii
.globl _Z18transposeGlobalRowPfS_ii
.p2align 8
.type _Z18transposeGlobalRowPfS_ii,@function
_Z18transposeGlobalRowPfS_ii:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b64 s[4:5], s[0:1], 0x10
v_and_b32_e32 v2, 0x3ff... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000480da_00000000-6_transposeGlobalRow.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
add... | .text
.file "transposeGlobalRow.hip"
.globl _Z33__device_stub__transposeGlobalRowPfS_ii # -- Begin function _Z33__device_stub__transposeGlobalRowPfS_ii
.p2align 4, 0x90
.type _Z33__device_stub__transposeGlobalRowPfS_ii,@function
_Z33__device_stub__transposeGlobalRowPfS_ii: # @_Z33__device_stub__transposeGlobalRowPfS_ii... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <iostream>
#define DEFAULT_BLOCK_COUNT 128
#define DEFAULT_TPB_COUNT 128
using namespace std;
int blockCnt = DEFAULT_BLOCK_COUNT;
int tpbCnt = DEFAULT_TPB_COUNT;
int totalThreads;
int * id;
//Declaration of pointers to CPU memory (host)
int * blockx_h;
int * idx_h;
//Declaration of pointers to GPU memory (dev... | code for sm_80
Function : _Z13MyFirstKernelPiS_
.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 R7, SR_CTAID.X ; /* 0x0000000000077919 */
/* 0x000e220000002500 */
/*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <iostream>
#define DEFAULT_BLOCK_COUNT 128
#define DEFAULT_TPB_COUNT 128
using namespace std;
int blockCnt = DEFAULT_BLOCK_COUNT;
int tpbCnt = DEFAULT_TPB_COUNT;
int totalThreads;
int * id;
//Declaration of pointers to CPU memory (host)
int * blockx_h;
int * idx_h;
//Declaration of pointers to GPU memory (dev... | .file "tmpxft_001a1a94_00000000-6_tid_basic.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3681:
.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 <iostream>
#define DEFAULT_BLOCK_COUNT 128
#define DEFAULT_TPB_COUNT 128
using namespace std;
int blockCnt = DEFAULT_BLOCK_COUNT;
int tpbCnt = DEFAULT_TPB_COUNT;
int totalThreads;
int * id;
//Declaration of pointers to CPU memory (host)
int * blockx_h;
int * idx_h;
//Declaration of pointers to GPU memory (dev... | #include <hip/hip_runtime.h>
#include <iostream>
#define DEFAULT_BLOCK_COUNT 128
#define DEFAULT_TPB_COUNT 128
using namespace std;
int blockCnt = DEFAULT_BLOCK_COUNT;
int tpbCnt = DEFAULT_TPB_COUNT;
int totalThreads;
int * id;
//Declaration of pointers to CPU memory (host)
int * blockx_h;
int * idx_h;
//Declaration o... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <iostream>
#define DEFAULT_BLOCK_COUNT 128
#define DEFAULT_TPB_COUNT 128
using namespace std;
int blockCnt = DEFAULT_BLOCK_COUNT;
int tpbCnt = DEFAULT_TPB_COUNT;
int totalThreads;
int * id;
//Declaration of pointers to CPU memory (host)
int * blockx_h;
int * idx_h;
//Declaration o... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z13MyFirstKernelPiS_
.globl _Z13MyFirstKernelPiS_
.p2align 8
.type _Z13MyFirstKernelPiS_,@function
_Z13MyFirstKernelPiS_:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x1c
s_load_b128 s[0:3], s[0:1], 0x0
v_mov_b32_e32 v5, s15
s_waitcnt lgkmcnt(0)... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <iostream>
#define DEFAULT_BLOCK_COUNT 128
#define DEFAULT_TPB_COUNT 128
using namespace std;
int blockCnt = DEFAULT_BLOCK_COUNT;
int tpbCnt = DEFAULT_TPB_COUNT;
int totalThreads;
int * id;
//Declaration of pointers to CPU memory (host)
int * blockx_h;
int * idx_h;
//Declaration o... | .text
.file "tid_basic.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z28__device_stub__MyFirstKernelPiS_ # -- Begin function _Z28__device_stub__MyFirstKernelPiS_
.p2... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z13MyFirstKernelPiS_
.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 R7, SR_CTAID.X ; /* 0x0000000000077919 */
/* 0x000e220000002500 */
/*... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z13MyFirstKernelPiS_
.globl _Z13MyFirstKernelPiS_
.p2align 8
.type _Z13MyFirstKernelPiS_,@function
_Z13MyFirstKernelPiS_:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x1c
s_load_b128 s[0:3], s[0:1], 0x0
v_mov_b32_e32 v5, s15
s_waitcnt lgkmcnt(0)... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001a1a94_00000000-6_tid_basic.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3681:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cuda... | .text
.file "tid_basic.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z28__device_stub__MyFirstKernelPiS_ # -- Begin function _Z28__device_stub__MyFirstKernelPiS_
.p2... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | // nvcc matrixNorm_CUDA.cu -lm -o norm.out
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <math.h>
/* Program Parameters */
#define N 6000 /* Matrix size */
// pointers to the device arrays
float *a_d, *b_d;
/* Matrices */
volatile float A[N][N], B[N][N];
/* Initialize A and B*/... | .file "tmpxft_000f6f76_00000000-6_matrixNorm_cuda.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 $... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | // nvcc matrixNorm_CUDA.cu -lm -o norm.out
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <math.h>
/* Program Parameters */
#define N 6000 /* Matrix size */
// pointers to the device arrays
float *a_d, *b_d;
/* Matrices */
volatile float A[N][N], B[N][N];
/* Initialize A and B*/... | // nvcc matrixNorm_CUDA.cu -lm -o norm.out
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <math.h>
/* Program Parameters */
#define N 6000 /* Matrix size */
// pointers to the device arrays
float *a_d, *b_d;
/* Matrices */
volatile float A[N][N], B[N... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | // nvcc matrixNorm_CUDA.cu -lm -o norm.out
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <math.h>
/* Program Parameters */
#define N 6000 /* Matrix size */
// pointers to the device arrays
float *a_d, *b_d;
/* Matrices */
volatile float A[N][N], B[N... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10matrixNormPfS_
.globl _Z10matrixNormPfS_
.p2align 8
.type _Z10matrixNormPfS_,@function
_Z10matrixNormPfS_:
s_load_b32 s2, s[0:1], 0x1c
s_mov_b32 s6, exec_lo
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_alu instid0(SALU_... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | // nvcc matrixNorm_CUDA.cu -lm -o norm.out
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <math.h>
/* Program Parameters */
#define N 6000 /* Matrix size */
// pointers to the device arrays
float *a_d, *b_d;
/* Matrices */
volatile float A[N][N], B[N... | .text
.file "matrixNorm_cuda.hip"
.section .rodata.cst4,"aM",@progbits,4
.p2align 2, 0x0 # -- Begin function _Z17initialize_inputsv
.LCPI0_0:
.long 0x38000000 # float 3.05175781E-5
.text
.globl _Z17initialize_inputsv
.p2align 4, 0x90
.type _Z17initialize_inputsv,@function
_... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000f6f76_00000000-6_matrixNorm_cuda.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 $... | .text
.file "matrixNorm_cuda.hip"
.section .rodata.cst4,"aM",@progbits,4
.p2align 2, 0x0 # -- Begin function _Z17initialize_inputsv
.LCPI0_0:
.long 0x38000000 # float 3.05175781E-5
.text
.globl _Z17initialize_inputsv
.p2align 4, 0x90
.type _Z17initialize_inputsv,@function
_... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void Float(float * x, int* y, size_t idxf, size_t idxi, size_t N)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
x[(idxf)*N + i] = float(y[(idxi-1)*N + i]);
return;
} | code for sm_80
Function : _Z5FloatPfPimmm
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e2800000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void Float(float * x, int* y, size_t idxf, size_t idxi, size_t N)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
x[(idxf)*N + i] = float(y[(idxi-1)*N + i]);
return;
} | .file "tmpxft_0008e06a_00000000-6_Float.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
.c... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void Float(float * x, int* y, size_t idxf, size_t idxi, size_t N)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
x[(idxf)*N + i] = float(y[(idxi-1)*N + i]);
return;
} | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void Float(float * x, int* y, size_t idxf, size_t idxi, size_t N)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
x[(idxf)*N + i] = float(y[(idxi-1)*N + i]);
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 Float(float * x, int* y, size_t idxf, size_t idxi, size_t N)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
x[(idxf)*N + i] = float(y[(idxi-1)*N + i]);
return;
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z5FloatPfPimmm
.globl _Z5FloatPfPimmm
.p2align 8
.type _Z5FloatPfPimmm,@function
_Z5FloatPfPimmm:
s_clause 0x1
s_load_b32 s6, s[0:1], 0x34
s_load_b64 s[2:3], s[0:1], 0x20
s_add_u32 s4, s0, 40
s_addc_u32 s5, s1, 0
s_mov_b32 s7... |
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 Float(float * x, int* y, size_t idxf, size_t idxi, size_t N)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x)
x[(idxf)*N + i] = float(y[(idxi-1)*N + i]);
return;
} | .text
.file "Float.hip"
.globl _Z20__device_stub__FloatPfPimmm # -- Begin function _Z20__device_stub__FloatPfPimmm
.p2align 4, 0x90
.type _Z20__device_stub__FloatPfPimmm,@function
_Z20__device_stub__FloatPfPimmm: # @_Z20__device_stub__FloatPfPimmm
.cfi_startproc
# %bb.0:
subq $136, %rsp
.cfi_def_cfa_offset 144
m... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z5FloatPfPimmm
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e2800000... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z5FloatPfPimmm
.globl _Z5FloatPfPimmm
.p2align 8
.type _Z5FloatPfPimmm,@function
_Z5FloatPfPimmm:
s_clause 0x1
s_load_b32 s6, s[0:1], 0x34
s_load_b64 s[2:3], s[0:1], 0x20
s_add_u32 s4, s0, 40
s_addc_u32 s5, s1, 0
s_mov_b32 s7... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0008e06a_00000000-6_Float.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
.c... | .text
.file "Float.hip"
.globl _Z20__device_stub__FloatPfPimmm # -- Begin function _Z20__device_stub__FloatPfPimmm
.p2align 4, 0x90
.type _Z20__device_stub__FloatPfPimmm,@function
_Z20__device_stub__FloatPfPimmm: # @_Z20__device_stub__FloatPfPimmm
.cfi_startproc
# %bb.0:
subq $136, %rsp
.cfi_def_cfa_offset 144
m... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
extern "C"
// don't forget to compile with "nvcc -ptx cudaKernel.cu -o cudaKernel.ptx
// And to move the ptx file in the resources !
__global__ void add(int n, float* a, float* b, float* sum) {
int index = blockIdx.x * blockDim.x + threadIdx.x;
int stride = blockDim.x * gridDim.x;
for (int i = ind... | code for sm_80
Function : add
.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 */
/*0020*/ S2R R0, SR_... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
extern "C"
// don't forget to compile with "nvcc -ptx cudaKernel.cu -o cudaKernel.ptx
// And to move the ptx file in the resources !
__global__ void add(int n, float* a, float* b, float* sum) {
int index = blockIdx.x * blockDim.x + threadIdx.x;
int stride = blockDim.x * gridDim.x;
for (int i = ind... | .file "tmpxft_0014056e_00000000-6_add.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cfi... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
extern "C"
// don't forget to compile with "nvcc -ptx cudaKernel.cu -o cudaKernel.ptx
// And to move the ptx file in the resources !
__global__ void add(int n, float* a, float* b, float* sum) {
int index = blockIdx.x * blockDim.x + threadIdx.x;
int stride = blockDim.x * gridDim.x;
for (int i = ind... | #include <hip/hip_runtime.h>
#include "includes.h"
extern "C"
// don't forget to compile with "nvcc -ptx cudaKernel.cu -o cudaKernel.ptx
// And to move the ptx file in the resources !
__global__ void add(int n, float* a, float* b, float* sum) {
int index = blockIdx.x * blockDim.x + threadIdx.x;
int stride = blockDim.x ... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
extern "C"
// don't forget to compile with "nvcc -ptx cudaKernel.cu -o cudaKernel.ptx
// And to move the ptx file in the resources !
__global__ void add(int n, float* a, float* b, float* sum) {
int index = blockIdx.x * blockDim.x + threadIdx.x;
int stride = blockDim.x ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected add
.globl add
.p2align 8
.type add,@function
add:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x2c
s_load_b32 s12, s[0:1], 0x0
s_add_u32 s2, s0, 32
s_addc_u32 s3, s1, 0
s_waitcnt lgkmcnt(0)
s_and_b32 s8, s4, 0... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
extern "C"
// don't forget to compile with "nvcc -ptx cudaKernel.cu -o cudaKernel.ptx
// And to move the ptx file in the resources !
__global__ void add(int n, float* a, float* b, float* sum) {
int index = blockIdx.x * blockDim.x + threadIdx.x;
int stride = blockDim.x ... | .text
.file "add.hip"
.globl __device_stub__add # -- Begin function __device_stub__add
.p2align 4, 0x90
.type __device_stub__add,@function
__device_stub__add: # @__device_stub__add
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset 128
movl %edi, 4(%rsp)
movq %rsi, 72(%rsp)
mov... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : add
.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 */
/*0020*/ S2R R0, SR_... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected add
.globl add
.p2align 8
.type add,@function
add:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x2c
s_load_b32 s12, s[0:1], 0x0
s_add_u32 s2, s0, 32
s_addc_u32 s3, s1, 0
s_waitcnt lgkmcnt(0)
s_and_b32 s8, s4, 0... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0014056e_00000000-6_add.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cfi... | .text
.file "add.hip"
.globl __device_stub__add # -- Begin function __device_stub__add
.p2align 4, 0x90
.type __device_stub__add,@function
__device_stub__add: # @__device_stub__add
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset 128
movl %edi, 4(%rsp)
movq %rsi, 72(%rsp)
mov... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /* This is a automatically generated test. Do not modify */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, int var_1,int var_2,float var_3,float var_4,float var_5,float var_6,float var_7,float var_8,float var_9,float var_10,float var_11,float var_12,float* var_13,float* var... | .file "tmpxft_0006182e_00000000-6_test.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | /* This is a automatically generated test. Do not modify */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, int var_1,int var_2,float var_3,float var_4,float var_5,float var_6,float var_7,float var_8,float var_9,float var_10,float var_11,float var_12,float* var_13,float* var... | /* This is a automatically generated test. Do not modify */
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, int var_1,int var_2,float var_3,float var_4,float var_5,float var_6,float var_7,float var_8,float var_9,float var_10,float var_11,float va... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | /* This is a automatically generated test. Do not modify */
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, int var_1,int var_2,float var_3,float var_4,float var_5,float var_6,float var_7,float var_8,float var_9,float var_10,float var_11,float va... | .text
.file "test.hip"
.globl _Z22__device_stub__computefiiffffffffffPfS_ffffS_fff # -- Begin function _Z22__device_stub__computefiiffffffffffPfS_ffffS_fff
.p2align 4, 0x90
.type _Z22__device_stub__computefiiffffffffffPfS_ffffS_fff,@function
_Z22__device_stub__computefiiffffffffffPfS_ffffS_fff: # @_Z22__device_stub__co... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0006182e_00000000-6_test.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... | .text
.file "test.hip"
.globl _Z22__device_stub__computefiiffffffffffPfS_ffffS_fff # -- Begin function _Z22__device_stub__computefiiffffffffffPfS_ffffS_fff
.p2align 4, 0x90
.type _Z22__device_stub__computefiiffffffffffPfS_ffffS_fff,@function
_Z22__device_stub__computefiiffffffffffPfS_ffffS_fff: # @_Z22__device_stub__co... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | /*
============================================================================
Filename : algorithm.c
Author : Your name goes here
SCIPER : Your SCIPER number
============================================================================
*/
#include <iostream>
#include <iomanip>
#include <sys/time.h>
#include <cuda_runt... | code for sm_80
Function : _Z15gpu_calculationPdS_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 R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e220000002500 */... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /*
============================================================================
Filename : algorithm.c
Author : Your name goes here
SCIPER : Your SCIPER number
============================================================================
*/
#include <iostream>
#include <iomanip>
#include <sys/time.h>
#include <cuda_runt... | .file "tmpxft_0008219e_00000000-6_implementation.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3953:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call _... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | /*
============================================================================
Filename : algorithm.c
Author : Your name goes here
SCIPER : Your SCIPER number
============================================================================
*/
#include <iostream>
#include <iomanip>
#include <sys/time.h>
#include <cuda_runt... | /*
============================================================================
Filename : algorithm.c
Author : Your name goes here
SCIPER : Your SCIPER number
============================================================================
*/
#include <iostream>
#include <iomanip>
#include <sys/time.h>
#include <hip/hip_r... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | /*
============================================================================
Filename : algorithm.c
Author : Your name goes here
SCIPER : Your SCIPER number
============================================================================
*/
#include <iostream>
#include <iomanip>
#include <sys/time.h>
#include <hip/hip_r... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z15gpu_calculationPdS_i
.globl _Z15gpu_calculationPdS_i
.p2align 8
.type _Z15gpu_calculationPdS_i,@function
_Z15gpu_calculationPdS_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
v_and_b32_e32 v2, 0x3ff, v0
v_bfe_u32 v... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | /*
============================================================================
Filename : algorithm.c
Author : Your name goes here
SCIPER : Your SCIPER number
============================================================================
*/
#include <iostream>
#include <iomanip>
#include <sys/time.h>
#include <hip/hip_r... | .text
.file "implementation.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z15gpu_calculationPdS_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 R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e220000002500 */... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z15gpu_calculationPdS_i
.globl _Z15gpu_calculationPdS_i
.p2align 8
.type _Z15gpu_calculationPdS_i,@function
_Z15gpu_calculationPdS_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
v_and_b32_e32 v2, 0x3ff, v0
v_bfe_u32 v... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0008219e_00000000-6_implementation.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3953:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call _... | .text
.file "implementation.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void matrixMult(int* m,int* n, int* p, int size)
{
// matrixMult<<< grid_size,block_size >>>(d_m,d_n,d_p,n);
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[col*size+i];
}
p[row*size+col... | code for sm_80
Function : _Z10matrixMultPiS_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 R7, SR_CTAID.Y ; /* 0x0000000000077919 */
/* 0x000e220000002600 */
/*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void matrixMult(int* m,int* n, int* p, int size)
{
// matrixMult<<< grid_size,block_size >>>(d_m,d_n,d_p,n);
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[col*size+i];
}
p[row*size+col... | .file "tmpxft_001368de_00000000-6_matrixMult.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, %r... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void matrixMult(int* m,int* n, int* p, int size)
{
// matrixMult<<< grid_size,block_size >>>(d_m,d_n,d_p,n);
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[col*size+i];
}
p[row*size+col... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void matrixMult(int* m,int* n, int* p, int size)
{
// matrixMult<<< grid_size,block_size >>>(d_m,d_n,d_p,n);
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void matrixMult(int* m,int* n, int* p, int size)
{
// matrixMult<<< grid_size,block_size >>>(d_m,d_n,d_p,n);
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10matrixMultPiS_S_i
.globl _Z10matrixMultPiS_S_i
.p2align 8
.type _Z10matrixMultPiS_S_i,@function
_Z10matrixMultPiS_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_b32_e32 v3, 0x3... |
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 matrixMult(int* m,int* n, int* p, int size)
{
// matrixMult<<< grid_size,block_size >>>(d_m,d_n,d_p,n);
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[... | .text
.file "matrixMult.hip"
.globl _Z25__device_stub__matrixMultPiS_S_i # -- Begin function _Z25__device_stub__matrixMultPiS_S_i
.p2align 4, 0x90
.type _Z25__device_stub__matrixMultPiS_S_i,@function
_Z25__device_stub__matrixMultPiS_S_i: # @_Z25__device_stub__matrixMultPiS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z10matrixMultPiS_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 R7, SR_CTAID.Y ; /* 0x0000000000077919 */
/* 0x000e220000002600 */
/*... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10matrixMultPiS_S_i
.globl _Z10matrixMultPiS_S_i
.p2align 8
.type _Z10matrixMultPiS_S_i,@function
_Z10matrixMultPiS_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_b32_e32 v3, 0x3... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001368de_00000000-6_matrixMult.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, %r... | .text
.file "matrixMult.hip"
.globl _Z25__device_stub__matrixMultPiS_S_i # -- Begin function _Z25__device_stub__matrixMultPiS_S_i
.p2align 4, 0x90
.type _Z25__device_stub__matrixMultPiS_S_i,@function
_Z25__device_stub__matrixMultPiS_S_i: # @_Z25__device_stub__matrixMultPiS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#define ARR_SIZE 102400
#define THREADS 512
#define ARR_BYTE sizeof(int) * ARR_SIZE
__global__ void gpuSort(int * d_arr, size_t maxSize);
int main(int argv, char ** argc)
{
int * h_arr;
int * d_arr;
... | code for sm_80
Function : _Z7gpuSortPim
.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 */
/* 0x000e220000002... |
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 <time.h>
#include <stdlib.h>
#define ARR_SIZE 102400
#define THREADS 512
#define ARR_BYTE sizeof(int) * ARR_SIZE
__global__ void gpuSort(int * d_arr, size_t maxSize);
int main(int argv, char ** argc)
{
int * h_arr;
int * d_arr;
... | .file "tmpxft_00130519_00000000-6_bubblesort.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 "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#define ARR_SIZE 102400
#define THREADS 512
#define ARR_BYTE sizeof(int) * ARR_SIZE
__global__ void gpuSort(int * d_arr, size_t maxSize);
int main(int argv, char ** argc)
{
int * h_arr;
int * d_arr;
... | #include "hip/hip_runtime.h"
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#define ARR_SIZE 102400
#define THREADS 512
#define ARR_BYTE sizeof(int) * ARR_SIZE
__global__ void gpuSort(int * d_arr, size_t maxSize);
int main(int argv, char ** argc)
{
int * h_arr;
int * d_arr;
int temp;
int blockSize;
size_t i;
... |
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 <time.h>
#include <stdlib.h>
#define ARR_SIZE 102400
#define THREADS 512
#define ARR_BYTE sizeof(int) * ARR_SIZE
__global__ void gpuSort(int * d_arr, size_t maxSize);
int main(int argv, char ** argc)
{
int * h_arr;
int * d_arr;
int temp;
int blockSize;
size_t i;
... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z7gpuSortPim
.globl _Z7gpuSortPim
.p2align 8
.type _Z7gpuSortPim,@function
_Z7gpuSortPim:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x1c
s_load_b128 s[4:7], s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_and_b32 s0, s2, 0xffff
s_delay_alu ... |
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 <time.h>
#include <stdlib.h>
#define ARR_SIZE 102400
#define THREADS 512
#define ARR_BYTE sizeof(int) * ARR_SIZE
__global__ void gpuSort(int * d_arr, size_t maxSize);
int main(int argv, char ** argc)
{
int * h_arr;
int * d_arr;
int temp;
int blockSize;
size_t i;
... | .text
.file "bubblesort.hip"
.section .rodata.cst4,"aM",@progbits,4
.p2align 2, 0x0 # -- Begin function main
.LCPI0_0:
.long 0x447a0000 # float 1000
.text
.globl main
.p2align 4, 0x90
.type main,@function
main: # @main
.cfi_startproc
# %bb.... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z7gpuSortPim
.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 */
/* 0x000e220000002... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z7gpuSortPim
.globl _Z7gpuSortPim
.p2align 8
.type _Z7gpuSortPim,@function
_Z7gpuSortPim:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x1c
s_load_b128 s[4:7], s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_and_b32 s0, s2, 0xffff
s_delay_alu ... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00130519_00000000-6_bubblesort.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 "bubblesort.hip"
.section .rodata.cst4,"aM",@progbits,4
.p2align 2, 0x0 # -- Begin function main
.LCPI0_0:
.long 0x447a0000 # float 1000
.text
.globl main
.p2align 4, 0x90
.type main,@function
main: # @main
.cfi_startproc
# %bb.... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void KerSortDataParticles(unsigned n,unsigned pini,const unsigned *sortpart,const float3 *a,float3 *a2)
{
const unsigned p=blockIdx.x*blockDim.x + threadIdx.x; //-Particle number.
if(p<n){
const unsigned oldpos=(p<pini? p: sortpart[p]);
a2[p]=a[oldpos];
}
} | code for sm_80
Function : _Z20KerSortDataParticlesjjPKjPK6float3PS1_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x000000000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void KerSortDataParticles(unsigned n,unsigned pini,const unsigned *sortpart,const float3 *a,float3 *a2)
{
const unsigned p=blockIdx.x*blockDim.x + threadIdx.x; //-Particle number.
if(p<n){
const unsigned oldpos=(p<pini? p: sortpart[p]);
a2[p]=a[oldpos];
}
} | .file "tmpxft_0000dfdb_00000000-6_KerSortDataParticles.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
a... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void KerSortDataParticles(unsigned n,unsigned pini,const unsigned *sortpart,const float3 *a,float3 *a2)
{
const unsigned p=blockIdx.x*blockDim.x + threadIdx.x; //-Particle number.
if(p<n){
const unsigned oldpos=(p<pini? p: sortpart[p]);
a2[p]=a[oldpos];
}
} | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void KerSortDataParticles(unsigned n,unsigned pini,const unsigned *sortpart,const float3 *a,float3 *a2)
{
const unsigned p=blockIdx.x*blockDim.x + threadIdx.x; //-Particle number.
if(p<n){
const unsigned oldpos=(p<pini? p: sortpart[p]);
a2[p]=a[oldpos];
}
} |
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 KerSortDataParticles(unsigned n,unsigned pini,const unsigned *sortpart,const float3 *a,float3 *a2)
{
const unsigned p=blockIdx.x*blockDim.x + threadIdx.x; //-Particle number.
if(p<n){
const unsigned oldpos=(p<pini? p: sortpart[p]);
a2[p]=a[oldpos];
}
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z20KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_
.globl _Z20KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_
.p2align 8
.type _Z20KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_,@function
_Z20KerSortDataParticlesjjPKjPK15HIP_vector_... |
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 KerSortDataParticles(unsigned n,unsigned pini,const unsigned *sortpart,const float3 *a,float3 *a2)
{
const unsigned p=blockIdx.x*blockDim.x + threadIdx.x; //-Particle number.
if(p<n){
const unsigned oldpos=(p<pini? p: sortpart[p]);
a2[p]=a[oldpos];
}
} | .text
.file "KerSortDataParticles.hip"
.globl _Z35__device_stub__KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_ # -- Begin function _Z35__device_stub__KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_
.p2align 4, 0x90
.type _Z35__device_stub__KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_,@funct... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z20KerSortDataParticlesjjPKjPK6float3PS1_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x000000000... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z20KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_
.globl _Z20KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_
.p2align 8
.type _Z20KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_,@function
_Z20KerSortDataParticlesjjPKjPK15HIP_vector_... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0000dfdb_00000000-6_KerSortDataParticles.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
a... | .text
.file "KerSortDataParticles.hip"
.globl _Z35__device_stub__KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_ # -- Begin function _Z35__device_stub__KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_
.p2align 4, 0x90
.type _Z35__device_stub__KerSortDataParticlesjjPKjPK15HIP_vector_typeIfLj3EEPS2_,@funct... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <string.h>
#include <limits.h>
#include <stdbool.h>
#define MAX_EDGE 100000000
__global__ void BFS(int* off,int* edge,int* current,int* size,int N,int E,int* c_arr,int* c_size,int* dist){
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id < *size){
// p... | code for sm_80
Function : _Z3BFSPiS_S_S_iiS_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*/ IMAD.MOV.U32 R2, RZ, RZ, c[0x0][0x178] ; /* 0x00005e00f... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <string.h>
#include <limits.h>
#include <stdbool.h>
#define MAX_EDGE 100000000
__global__ void BFS(int* off,int* edge,int* current,int* size,int N,int E,int* c_arr,int* c_size,int* dist){
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id < *size){
// p... | .file "tmpxft_00007c4f_00000000-6_bfs_hx.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>
#include <stdlib.h>
#include <cuda.h>
#include <string.h>
#include <limits.h>
#include <stdbool.h>
#define MAX_EDGE 100000000
__global__ void BFS(int* off,int* edge,int* current,int* size,int N,int E,int* c_arr,int* c_size,int* dist){
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id < *size){
// p... | #include <stdio.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <string.h>
#include <limits.h>
#include <stdbool.h>
#define MAX_EDGE 100000000
__global__ void BFS(int* off,int* edge,int* current,int* size,int N,int E,int* c_arr,int* c_size,int* dist){
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id < *... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <string.h>
#include <limits.h>
#include <stdbool.h>
#define MAX_EDGE 100000000
__global__ void BFS(int* off,int* edge,int* current,int* size,int N,int E,int* c_arr,int* c_size,int* dist){
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id < *... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3BFSPiS_S_S_iiS_S_S_
.globl _Z3BFSPiS_S_S_iiS_S_S_
.p2align 8
.type _Z3BFSPiS_S_S_iiS_S_S_,@function
_Z3BFSPiS_S_S_iiS_S_S_:
s_clause 0x1
s_load_b64 s[2:3], s[0:1], 0x18
s_load_b32 s4, s[0:1], 0x4c
s_waitcnt lgkmcnt(0)
s_load_b32 s2, s[2:... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <string.h>
#include <limits.h>
#include <stdbool.h>
#define MAX_EDGE 100000000
__global__ void BFS(int* off,int* edge,int* current,int* size,int N,int E,int* c_arr,int* c_size,int* dist){
int id = blockIdx.x*blockDim.x+threadIdx.x;
if(id < *... | .text
.file "bfs_hx.hip"
.globl _Z18__device_stub__BFSPiS_S_S_iiS_S_S_ # -- Begin function _Z18__device_stub__BFSPiS_S_S_iiS_S_S_
.p2align 4, 0x90
.type _Z18__device_stub__BFSPiS_S_S_iiS_S_S_,@function
_Z18__device_stub__BFSPiS_S_S_iiS_S_S_: # @_Z18__device_stub__BFSPiS_S_S_iiS_S_S_
.cfi_startproc
# %bb.0:
subq $168, %... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z3BFSPiS_S_S_iiS_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*/ IMAD.MOV.U32 R2, RZ, RZ, c[0x0][0x178] ; /* 0x00005e00f... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3BFSPiS_S_S_iiS_S_S_
.globl _Z3BFSPiS_S_S_iiS_S_S_
.p2align 8
.type _Z3BFSPiS_S_S_iiS_S_S_,@function
_Z3BFSPiS_S_S_iiS_S_S_:
s_clause 0x1
s_load_b64 s[2:3], s[0:1], 0x18
s_load_b32 s4, s[0:1], 0x4c
s_waitcnt lgkmcnt(0)
s_load_b32 s2, s[2:... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00007c4f_00000000-6_bfs_hx.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 "bfs_hx.hip"
.globl _Z18__device_stub__BFSPiS_S_S_iiS_S_S_ # -- Begin function _Z18__device_stub__BFSPiS_S_S_iiS_S_S_
.p2align 4, 0x90
.type _Z18__device_stub__BFSPiS_S_S_iiS_S_S_,@function
_Z18__device_stub__BFSPiS_S_S_iiS_S_S_: # @_Z18__device_stub__BFSPiS_S_S_iiS_S_S_
.cfi_startproc
# %bb.0:
subq $168, %... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include<stdio.h>
#include<stdlib.h>
#include<cmath>
int NPTS = 20000;
__global__ void kernel (float *a, float *b, int dimx, int dimy)
{
// Compute the index variable
int ix = blockIdx.x*blockDim.x + threadIdx.x;
int iy = blockIdx.y*blockDim.y + threadIdx.y;
int idx = iy*dimx + ix;
//a[idx] = a[idx]+1;
float r, xdiff, ... | code for sm_80
Function : _Z6kernelPfS_ii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ EXIT ; /* 0x000000000000794d */
/* 0x000fea0003800000 */
/*0020*/ BRA 0x20; /* ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include<stdio.h>
#include<stdlib.h>
#include<cmath>
int NPTS = 20000;
__global__ void kernel (float *a, float *b, int dimx, int dimy)
{
// Compute the index variable
int ix = blockIdx.x*blockDim.x + threadIdx.x;
int iy = blockIdx.y*blockDim.y + threadIdx.y;
int idx = iy*dimx + ix;
//a[idx] = a[idx]+1;
float r, xdiff, ... | .file "tmpxft_001227b5_00000000-6_calc_distances_Matt.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<cmath>
int NPTS = 20000;
__global__ void kernel (float *a, float *b, int dimx, int dimy)
{
// Compute the index variable
int ix = blockIdx.x*blockDim.x + threadIdx.x;
int iy = blockIdx.y*blockDim.y + threadIdx.y;
int idx = iy*dimx + ix;
//a[idx] = a[idx]+1;
float r, xdiff, ... | #include <hip/hip_runtime.h>
#include<stdio.h>
#include<stdlib.h>
#include<cmath>
int NPTS = 20000;
__global__ void kernel (float *a, float *b, int dimx, int dimy)
{
// Compute the index variable
int ix = blockIdx.x*blockDim.x + threadIdx.x;
int iy = blockIdx.y*blockDim.y + threadIdx.y;
int idx = iy*dimx + ix;
//a[idx]... |
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<cmath>
int NPTS = 20000;
__global__ void kernel (float *a, float *b, int dimx, int dimy)
{
// Compute the index variable
int ix = blockIdx.x*blockDim.x + threadIdx.x;
int iy = blockIdx.y*blockDim.y + threadIdx.y;
int idx = iy*dimx + ix;
//a[idx]... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6kernelPfS_ii
.globl _Z6kernelPfS_ii
.p2align 8
.type _Z6kernelPfS_ii,@function
_Z6kernelPfS_ii:
s_endpgm
.section .rodata,"a",@progbits
.p2align 6, 0x0
.amdhsa_kernel _Z6kernelPfS_ii
.amdhsa_group_segment_fixed_size 0
.am... |
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<cmath>
int NPTS = 20000;
__global__ void kernel (float *a, float *b, int dimx, int dimy)
{
// Compute the index variable
int ix = blockIdx.x*blockDim.x + threadIdx.x;
int iy = blockIdx.y*blockDim.y + threadIdx.y;
int idx = iy*dimx + ix;
//a[idx]... | .text
.file "calc_distances_Matt.hip"
.globl _Z21__device_stub__kernelPfS_ii # -- Begin function _Z21__device_stub__kernelPfS_ii
.p2align 4, 0x90
.type _Z21__device_stub__kernelPfS_ii,@function
_Z21__device_stub__kernelPfS_ii: # @_Z21__device_stub__kernelPfS_ii
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cf... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z6kernelPfS_ii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ EXIT ; /* 0x000000000000794d */
/* 0x000fea0003800000 */
/*0020*/ BRA 0x20; /* ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6kernelPfS_ii
.globl _Z6kernelPfS_ii
.p2align 8
.type _Z6kernelPfS_ii,@function
_Z6kernelPfS_ii:
s_endpgm
.section .rodata,"a",@progbits
.p2align 6, 0x0
.amdhsa_kernel _Z6kernelPfS_ii
.amdhsa_group_segment_fixed_size 0
.am... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001227b5_00000000-6_calc_distances_Matt.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 "calc_distances_Matt.hip"
.globl _Z21__device_stub__kernelPfS_ii # -- Begin function _Z21__device_stub__kernelPfS_ii
.p2align 4, 0x90
.type _Z21__device_stub__kernelPfS_ii,@function
_Z21__device_stub__kernelPfS_ii: # @_Z21__device_stub__kernelPfS_ii
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cf... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <cstdlib>
#include <chrono>
__global__ void test() {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
printf("Test %d\n", idx);
}
int main(int argc, char const *argv[]) {
int block_size = 1024;
int grid_size = 1024;
test<<<grid_size, block_size>>>();
c... | code for sm_80
Function : _Z4testv
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e220000002500 *... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <cstdlib>
#include <chrono>
__global__ void test() {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
printf("Test %d\n", idx);
}
int main(int argc, char const *argv[]) {
int block_size = 1024;
int grid_size = 1024;
test<<<grid_size, block_size>>>();
c... | .file "tmpxft_000bfb59_00000000-6_test.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3771:
.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 <stdlib.h>
#include <stdio.h>
#include <cstdlib>
#include <chrono>
__global__ void test() {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
printf("Test %d\n", idx);
}
int main(int argc, char const *argv[]) {
int block_size = 1024;
int grid_size = 1024;
test<<<grid_size, block_size>>>();
c... | #include <hip/hip_runtime.h>
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <cstdlib>
#include <chrono>
__global__ void test() {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
printf("Test %d\n", idx);
}
int main(int argc, char const *argv[]) {
int block_size = 1024;
int grid_size = 1024;
test<<<... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <cstdlib>
#include <chrono>
__global__ void test() {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
printf("Test %d\n", idx);
}
int main(int argc, char const *argv[]) {
int block_size = 1024;
int grid_size = 1024;
test<<<... | .text
.file "test.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z19__device_stub__testv # -- Begin function _Z19__device_stub__testv
.p2align 4, 0x90
.type _Z... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000bfb59_00000000-6_test.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3771:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnreg... | .text
.file "test.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z19__device_stub__testv # -- Begin function _Z19__device_stub__testv
.p2align 4, 0x90
.type _Z... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | extern "C" {
/*
#define BLOCK_SIZE 16
__global__ void matrix_multiply(const float* a, size_t lda, const float* b, size_t ldb, float* c, size_t ldc, int n)
{
__shared__ float matA[BLOCK_SIZE][BLOCK_SIZE];
__shared__ float matB[BLOCK_SIZE][BLOCK_SIZE];
const int tidc = threadIdx.x;
const int tidr = threadIdx.y;
const int... | .file "tmpxft_000937b3_00000000-6_10-matrix-multiply.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
add... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | extern "C" {
/*
#define BLOCK_SIZE 16
__global__ void matrix_multiply(const float* a, size_t lda, const float* b, size_t ldb, float* c, size_t ldc, int n)
{
__shared__ float matA[BLOCK_SIZE][BLOCK_SIZE];
__shared__ float matB[BLOCK_SIZE][BLOCK_SIZE];
const int tidc = threadIdx.x;
const int tidr = threadIdx.y;
const int... | #include <hip/hip_runtime.h>
extern "C" {
/*
#define BLOCK_SIZE 16
__global__ void matrix_multiply(const float* a, size_t lda, const float* b, size_t ldb, float* c, size_t ldc, int n)
{
__shared__ float matA[BLOCK_SIZE][BLOCK_SIZE];
__shared__ float matB[BLOCK_SIZE][BLOCK_SIZE];
const int tidc = threadIdx.x;
const int ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.