system stringclasses 7
values | input stringlengths 10 94.5k | output stringlengths 14 55.5k |
|---|---|---|
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <cuda_runtime.h>
#include "functions.cuh"
__global__
void KernelAdd(int n, float * p_sum, float * x, float * y){
int i = blockIdx.x * blockDim.x + threadIdx.x;
if ( i < n )
p_sum[i] = x[i] + y[i];
}
void DeviceKernel(int numBlocks, int sizeBlock, int n, float * p_sum, float * x, float * y){
... | .file "tmpxft_0002a57a_00000000-6_functions.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... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <cuda_runtime.h>
#include "functions.cuh"
__global__
void KernelAdd(int n, float * p_sum, float * x, float * y){
int i = blockIdx.x * blockDim.x + threadIdx.x;
if ( i < n )
p_sum[i] = x[i] + y[i];
}
void DeviceKernel(int numBlocks, int sizeBlock, int n, float * p_sum, float * x, float * y){
... | #ifndef FUNCTIONS_CUH
#define FUNCTIONS_CUH
void DeviceKernel(int numBlocks, int sizeBlock, int n, float * p_sum, float * x, float * y);
#endif |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #ifndef FUNCTIONS_CUH
#define FUNCTIONS_CUH
void DeviceKernel(int numBlocks, int sizeBlock, int n, float * p_sum, float * x, float * y);
#endif | .text
.p2alignl 7, 3214868480
.fill 96, 4, 3214868480
.type __hip_cuid_,@object
.section .bss,"aw",@nobits
.globl __hip_cuid_
__hip_cuid_:
.byte 0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #ifndef FUNCTIONS_CUH
#define FUNCTIONS_CUH
void DeviceKernel(int numBlocks, int sizeBlock, int n, float * p_sum, float * x, float * y);
#endif | .text
.file "functions.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-projec... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z9KernelAddiPfS_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 */
/* 0x000e280000002500 */
/*00... | .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_0002a57a_00000000-6_functions.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 "functions.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-projec... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | //****************************************************************************
// Also note that we've supplied a helpful debugging function called checkCudaErrors.
// You should wrap your allocation and copying statements like we've done in the
// code we're supplying you. Here is an example of the unsafe way to alloc... | code for sm_80
Function : _Z17recombineChannelsPKhS0_S0_P6uchar4ii
.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 ; /* 0x00000000000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | //****************************************************************************
// Also note that we've supplied a helpful debugging function called checkCudaErrors.
// You should wrap your allocation and copying statements like we've done in the
// code we're supplying you. Here is an example of the unsafe way to alloc... | .file "tmpxft_001304c5_00000000-6_func.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4213:
.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. | //****************************************************************************
// Also note that we've supplied a helpful debugging function called checkCudaErrors.
// You should wrap your allocation and copying statements like we've done in the
// code we're supplying you. Here is an example of the unsafe way to alloc... | //****************************************************************************
// Also note that we've supplied a helpful debugging function called checkCudaErrors.
// You should wrap your allocation and copying statements like we've done in the
// code we're supplying you. Here is an example of the unsafe way to alloc... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | //****************************************************************************
// Also note that we've supplied a helpful debugging function called checkCudaErrors.
// You should wrap your allocation and copying statements like we've done in the
// code we're supplying you. Here is an example of the unsafe way to alloc... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10box_filterPKhPhiiPKfi
.globl _Z10box_filterPKhPhiiPKfi
.p2align 8
.type _Z10box_filterPKhPhiiPKfi,@function
_Z10box_filterPKhPhiiPKfi:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x34
s_load_b64 s[4:5], s[0:1], 0x10
v_and_b32_e32 v2, 0x3ff, v0
v_bf... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | //****************************************************************************
// Also note that we've supplied a helpful debugging function called checkCudaErrors.
// You should wrap your allocation and copying statements like we've done in the
// code we're supplying you. Here is an example of the unsafe way to alloc... | .text
.file "func.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z25__device_stub__box_filterPKhPhiiPKfi # -- Begin function _Z25__device_stub__box_filterPKhPhiiPKfi
... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
const unsigned int N_FIB = 12;
const unsigned int N_BYTES_FIB = N_FIB * sizeof(unsigned int);
const unsigned int N_THREAD = N_FIB;
unsigned int N_ELEM, N_BYTES_ARR, N_BLOCKS;
__constant__ unsigned int fib_const[N_FIB];
__device__ static unsigned int fib_gmem[N_FIB];
/* Print array... | code for sm_80
Function : _Z13calc_w_sharedPjS_PKjj
.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 R7, SR_TID.X ; /* 0x0000000000077919 */
/* 0x000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
const unsigned int N_FIB = 12;
const unsigned int N_BYTES_FIB = N_FIB * sizeof(unsigned int);
const unsigned int N_THREAD = N_FIB;
unsigned int N_ELEM, N_BYTES_ARR, N_BLOCKS;
__constant__ unsigned int fib_const[N_FIB];
__device__ static unsigned int fib_gmem[N_FIB];
/* Print array... | .file "tmpxft_000c4e3d_00000000-6_const_v_shared_test.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2065:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
ad... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <stdlib.h>
const unsigned int N_FIB = 12;
const unsigned int N_BYTES_FIB = N_FIB * sizeof(unsigned int);
const unsigned int N_THREAD = N_FIB;
unsigned int N_ELEM, N_BYTES_ARR, N_BLOCKS;
__constant__ unsigned int fib_const[N_FIB];
__device__ static unsigned int fib_gmem[N_FIB];
/* Print array... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
const unsigned int N_FIB = 12;
const unsigned int N_BYTES_FIB = N_FIB * sizeof(unsigned int);
const unsigned int N_THREAD = N_FIB;
unsigned int N_ELEM, N_BYTES_ARR, N_BLOCKS;
__constant__ unsigned int fib_const[N_FIB];
__device__ static unsigned int fi... |
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>
const unsigned int N_FIB = 12;
const unsigned int N_BYTES_FIB = N_FIB * sizeof(unsigned int);
const unsigned int N_THREAD = N_FIB;
unsigned int N_ELEM, N_BYTES_ARR, N_BLOCKS;
__constant__ unsigned int fib_const[N_FIB];
__device__ static unsigned int fi... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z12calc_w_constPjS_j
.globl _Z12calc_w_constPjS_j
.p2align 8
.type _Z12calc_w_constPjS_j,@function
_Z12calc_w_constPjS_j:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
s_waitcnt lgkmcnt(0)
s_and_b32 s4, s2, 0xffff
... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
const unsigned int N_FIB = 12;
const unsigned int N_BYTES_FIB = N_FIB * sizeof(unsigned int);
const unsigned int N_THREAD = N_FIB;
unsigned int N_ELEM, N_BYTES_ARR, N_BLOCKS;
__constant__ unsigned int fib_const[N_FIB];
__device__ static unsigned int fi... | .text
.file "const_v_shared_test.hip"
.globl _Z10printArrayPjPKcj # -- Begin function _Z10printArrayPjPKcj
.p2align 4, 0x90
.type _Z10printArrayPjPKcj,@function
_Z10printArrayPjPKcj: # @_Z10printArrayPjPKcj
.cfi_startproc
# %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
pushq %r15
.cfi_def_cfa_of... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z13calc_w_sharedPjS_PKjj
.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 R7, SR_TID.X ; /* 0x0000000000077919 */
/* 0x000... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z12calc_w_constPjS_j
.globl _Z12calc_w_constPjS_j
.p2align 8
.type _Z12calc_w_constPjS_j,@function
_Z12calc_w_constPjS_j:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
s_waitcnt lgkmcnt(0)
s_and_b32 s4, s2, 0xffff
... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000c4e3d_00000000-6_const_v_shared_test.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2065:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
ad... | .text
.file "const_v_shared_test.hip"
.globl _Z10printArrayPjPKcj # -- Begin function _Z10printArrayPjPKcj
.p2align 4, 0x90
.type _Z10printArrayPjPKcj,@function
_Z10printArrayPjPKcj: # @_Z10printArrayPjPKcj
.cfi_startproc
# %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
pushq %r15
.cfi_def_cfa_of... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | __global__ void gpu_KIDepthToVertices(const float *depthIn,
float4 * vertOut, int *segMap,
const int width,
const int height,
const float2 pp,
const float2 fl) {
const int u = blockIdx.x*blockDim.x + threadIdx.x;
const int v = blockIdx.y*blockDim.y + threadIdx.y;
const int index = u + v*width;
if (u >= width || v >= he... | code for sm_80
Function : _Z21gpu_KIDepthToVerticesPKfP6float4Piii6float2S4_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R2, SR_CTAID.Y ; /* 0x0... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | __global__ void gpu_KIDepthToVertices(const float *depthIn,
float4 * vertOut, int *segMap,
const int width,
const int height,
const float2 pp,
const float2 fl) {
const int u = blockIdx.x*blockDim.x + threadIdx.x;
const int v = blockIdx.y*blockDim.y + threadIdx.y;
const int index = u + v*width;
if (u >= width || v >= he... | .file "tmpxft_0006bdef_00000000-6_PointCloud.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2030:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %r... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | __global__ void gpu_KIDepthToVertices(const float *depthIn,
float4 * vertOut, int *segMap,
const int width,
const int height,
const float2 pp,
const float2 fl) {
const int u = blockIdx.x*blockDim.x + threadIdx.x;
const int v = blockIdx.y*blockDim.y + threadIdx.y;
const int index = u + v*width;
if (u >= width || v >= he... | #include <hip/hip_runtime.h>
__global__ void gpu_KIDepthToVertices(const float *depthIn,
float4 * vertOut, int *segMap,
const int width,
const int height,
const float2 pp,
const float2 fl) {
const int u = blockIdx.x*blockDim.x + threadIdx.x;
const int v = blockIdx.y*blockDim.y + threadIdx.y;
const int index = u + v*wid... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
__global__ void gpu_KIDepthToVertices(const float *depthIn,
float4 * vertOut, int *segMap,
const int width,
const int height,
const float2 pp,
const float2 fl) {
const int u = blockIdx.x*blockDim.x + threadIdx.x;
const int v = blockIdx.y*blockDim.y + threadIdx.y;
const int index = u + v*wid... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z21gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEPiiiS1_IfLj2EES5_
.globl _Z21gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEPiiiS1_IfLj2EES5_
.p2align 8
.type _Z21gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEPiiiS1_IfLj2EES5_,@function
_Z21gpu_KID... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
__global__ void gpu_KIDepthToVertices(const float *depthIn,
float4 * vertOut, int *segMap,
const int width,
const int height,
const float2 pp,
const float2 fl) {
const int u = blockIdx.x*blockDim.x + threadIdx.x;
const int v = blockIdx.y*blockDim.y + threadIdx.y;
const int index = u + v*wid... | .text
.file "PointCloud.hip"
.globl _Z36__device_stub__gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEPiiiS1_IfLj2EES5_ # -- Begin function _Z36__device_stub__gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEPiiiS1_IfLj2EES5_
.p2align 4, 0x90
.type _Z36__device_stub__gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEP... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z21gpu_KIDepthToVerticesPKfP6float4Piii6float2S4_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R2, SR_CTAID.Y ; /* 0x0... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z21gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEPiiiS1_IfLj2EES5_
.globl _Z21gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEPiiiS1_IfLj2EES5_
.p2align 8
.type _Z21gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEPiiiS1_IfLj2EES5_,@function
_Z21gpu_KID... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0006bdef_00000000-6_PointCloud.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2030:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %r... | .text
.file "PointCloud.hip"
.globl _Z36__device_stub__gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEPiiiS1_IfLj2EES5_ # -- Begin function _Z36__device_stub__gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEPiiiS1_IfLj2EES5_
.p2align 4, 0x90
.type _Z36__device_stub__gpu_KIDepthToVerticesPKfP15HIP_vector_typeIfLj4EEP... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void gaxpy(double *y, double *a, double *x, int m, int n){
int bid = blockIdx.x;
int tid = threadIdx.x;
extern __shared__ double dots_s[];
if(bid<m)
if(tid<n){
dots_s[bid*n+tid] = a[bid*n+tid] * *(x+tid);
__syncthreads();
if(tid == 0){
for(int i=1;i<n;i++){
dots_s[bid*n] +=dots_s[bid*n+... | code for sm_80
Function : _Z5gaxpyPdS_S_ii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R8, SR_TID.X ; /* 0x0000000000087919 */
/* 0x000e28000000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void gaxpy(double *y, double *a, double *x, int m, int n){
int bid = blockIdx.x;
int tid = threadIdx.x;
extern __shared__ double dots_s[];
if(bid<m)
if(tid<n){
dots_s[bid*n+tid] = a[bid*n+tid] * *(x+tid);
__syncthreads();
if(tid == 0){
for(int i=1;i<n;i++){
dots_s[bid*n] +=dots_s[bid*n+... | .file "tmpxft_00103964_00000000-6_gaxpy.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 gaxpy(double *y, double *a, double *x, int m, int n){
int bid = blockIdx.x;
int tid = threadIdx.x;
extern __shared__ double dots_s[];
if(bid<m)
if(tid<n){
dots_s[bid*n+tid] = a[bid*n+tid] * *(x+tid);
__syncthreads();
if(tid == 0){
for(int i=1;i<n;i++){
dots_s[bid*n] +=dots_s[bid*n+... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void gaxpy(double *y, double *a, double *x, int m, int n){
int bid = blockIdx.x;
int tid = threadIdx.x;
extern __shared__ double dots_s[];
if(bid<m)
if(tid<n){
dots_s[bid*n+tid] = a[bid*n+tid] * *(x+tid);
__syncthreads();
if(tid == 0){
for(int i=1;i<n;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 gaxpy(double *y, double *a, double *x, int m, int n){
int bid = blockIdx.x;
int tid = threadIdx.x;
extern __shared__ double dots_s[];
if(bid<m)
if(tid<n){
dots_s[bid*n+tid] = a[bid*n+tid] * *(x+tid);
__syncthreads();
if(tid == 0){
for(int i=1;i<n;i++){
... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z5gaxpyPdS_S_ii
.globl _Z5gaxpyPdS_S_ii
.p2align 8
.type _Z5gaxpyPdS_S_ii,@function
_Z5gaxpyPdS_S_ii:
s_load_b64 s[4:5], s[0:1], 0x18
s_waitcnt lgkmcnt(0)
v_cmp_gt_i32_e32 vcc_lo, s5, v0
s_cmp_lt_i32 s15, s4
s_cselect_b32 s3, -... |
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 gaxpy(double *y, double *a, double *x, int m, int n){
int bid = blockIdx.x;
int tid = threadIdx.x;
extern __shared__ double dots_s[];
if(bid<m)
if(tid<n){
dots_s[bid*n+tid] = a[bid*n+tid] * *(x+tid);
__syncthreads();
if(tid == 0){
for(int i=1;i<n;i++){
... | .text
.file "gaxpy.hip"
.globl _Z20__device_stub__gaxpyPdS_S_ii # -- Begin function _Z20__device_stub__gaxpyPdS_S_ii
.p2align 4, 0x90
.type _Z20__device_stub__gaxpyPdS_S_ii,@function
_Z20__device_stub__gaxpyPdS_S_ii: # @_Z20__device_stub__gaxpyPdS_S_ii
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset 1... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z5gaxpyPdS_S_ii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R8, SR_TID.X ; /* 0x0000000000087919 */
/* 0x000e28000000... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z5gaxpyPdS_S_ii
.globl _Z5gaxpyPdS_S_ii
.p2align 8
.type _Z5gaxpyPdS_S_ii,@function
_Z5gaxpyPdS_S_ii:
s_load_b64 s[4:5], s[0:1], 0x18
s_waitcnt lgkmcnt(0)
v_cmp_gt_i32_e32 vcc_lo, s5, v0
s_cmp_lt_i32 s15, s4
s_cselect_b32 s3, -... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00103964_00000000-6_gaxpy.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 "gaxpy.hip"
.globl _Z20__device_stub__gaxpyPdS_S_ii # -- Begin function _Z20__device_stub__gaxpyPdS_S_ii
.p2align 4, 0x90
.type _Z20__device_stub__gaxpyPdS_S_ii,@function
_Z20__device_stub__gaxpyPdS_S_ii: # @_Z20__device_stub__gaxpyPdS_S_ii
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset 1... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
#include <string>
#include <cuda.h>
#define ThreadNum 256
#define BlockNum 16
__global__ void printOut(char *string) {
printf("%s\n", string);
}
size_t getFileSize(char *filen... | code for sm_80
Function : _Z8matchingPcS_PliiPi
.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 */
/* 0x000e2... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
#include <string>
#include <cuda.h>
#define ThreadNum 256
#define BlockNum 16
__global__ void printOut(char *string) {
printf("%s\n", string);
}
size_t getFileSize(char *filen... | .file "tmpxft_000b9dde_00000000-6_mmap_gpu.cudafe1.cpp"
.text
#APP
#NO_APP
.globl _Z5myCmpPKvS0_
.type _Z5myCmpPKvS0_, @function
_Z5myCmpPKvS0_:
.LFB3077:
.cfi_startproc
endbr64
movl (%rdi), %eax
subl (%rsi), %eax
ret
.cfi_endproc
.LFE3077:
.size _Z5myCmpPKvS0_, .-_Z5myCmpPKvS0_
.type _ZL26__cudaUnregisterBinaryUtilv, ... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
#include <string>
#include <cuda.h>
#define ThreadNum 256
#define BlockNum 16
__global__ void printOut(char *string) {
printf("%s\n", string);
}
size_t getFileSize(char *filen... | #include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
#include <string>
#include <hip/hip_runtime.h>
#define ThreadNum 256
#define BlockNum 16
__global__ void printOut(char *string) {
printf("%s\n", string);
}
size_t getFileSize(... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
#include <string>
#include <hip/hip_runtime.h>
#define ThreadNum 256
#define BlockNum 16
__global__ void printOut(char *string) {
printf("%s\n", string);
}
size_t getFileSize(... | .text
.file "mmap_gpu.hip"
.globl _Z23__device_stub__printOutPc # -- Begin function _Z23__device_stub__printOutPc
.p2align 4, 0x90
.type _Z23__device_stub__printOutPc,@function
_Z23__device_stub__printOutPc: # @_Z23__device_stub__printOutPc
.cfi_startproc
# %bb.0:
subq $72, %rsp
.cfi_def_cfa_offset 80
movq %... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000b9dde_00000000-6_mmap_gpu.cudafe1.cpp"
.text
#APP
#NO_APP
.globl _Z5myCmpPKvS0_
.type _Z5myCmpPKvS0_, @function
_Z5myCmpPKvS0_:
.LFB3077:
.cfi_startproc
endbr64
movl (%rdi), %eax
subl (%rsi), %eax
ret
.cfi_endproc
.LFE3077:
.size _Z5myCmpPKvS0_, .-_Z5myCmpPKvS0_
.type _ZL26__cudaUnregisterBinaryUtilv, ... | .text
.file "mmap_gpu.hip"
.globl _Z23__device_stub__printOutPc # -- Begin function _Z23__device_stub__printOutPc
.p2align 4, 0x90
.type _Z23__device_stub__printOutPc,@function
_Z23__device_stub__printOutPc: # @_Z23__device_stub__printOutPc
.cfi_startproc
# %bb.0:
subq $72, %rsp
.cfi_def_cfa_offset 80
movq %... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <cuda_runtime.h>
// Setup for measuing time
#include <sys/time.h>
#include <time.h>
int timeval_subtract(struct timeval* result,
struct timeval* t2,
struct timeval* t1) {
unsigned int resolution=1000000;
long int diff = (t2->tv_usec +... | code for sm_80
Function : _Z8parFunctPfS_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_TID.X ; /* 0x0000000000007919 */
/* 0x000e28000000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <cuda_runtime.h>
// Setup for measuing time
#include <sys/time.h>
#include <time.h>
int timeval_subtract(struct timeval* result,
struct timeval* t2,
struct timeval* t1) {
unsigned int resolution=1000000;
long int diff = (t2->tv_usec +... | .file "tmpxft_000f07c9_00000000-6_simpleCUDA.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2062:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %r... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <cuda_runtime.h>
// Setup for measuing time
#include <sys/time.h>
#include <time.h>
int timeval_subtract(struct timeval* result,
struct timeval* t2,
struct timeval* t1) {
unsigned int resolution=1000000;
long int diff = (t2->tv_usec +... | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <hip/hip_runtime.h>
// Setup for measuing time
#include <sys/time.h>
#include <time.h>
int timeval_subtract(struct timeval* result,
struct timeval* t2,
struct timeval* t1) {
unsigned int resolution=1000000;
long int diff = (t2->tv_use... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <hip/hip_runtime.h>
// Setup for measuing time
#include <sys/time.h>
#include <time.h>
int timeval_subtract(struct timeval* result,
struct timeval* t2,
struct timeval* t1) {
unsigned int resolution=1000000;
long int diff = (t2->tv_use... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z8parFunctPfS_i
.globl _Z8parFunctPfS_i
.p2align 8
.type _Z8parFunctPfS_i,@function
_Z8parFunctPfS_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x10
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_al... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <hip/hip_runtime.h>
// Setup for measuing time
#include <sys/time.h>
#include <time.h>
int timeval_subtract(struct timeval* result,
struct timeval* t2,
struct timeval* t1) {
unsigned int resolution=1000000;
long int diff = (t2->tv_use... | .text
.file "simpleCUDA.hip"
.globl _Z16timeval_subtractP7timevalS0_S0_ # -- Begin function _Z16timeval_subtractP7timevalS0_S0_
.p2align 4, 0x90
.type _Z16timeval_subtractP7timevalS0_S0_,@function
_Z16timeval_subtractP7timevalS0_S0_: # @_Z16timeval_subtractP7timevalS0_S0_
.cfi_startproc
# %bb.0:
movq (%rsi), %rax
mo... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000f07c9_00000000-6_simpleCUDA.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2062:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %r... | .text
.file "simpleCUDA.hip"
.globl _Z16timeval_subtractP7timevalS0_S0_ # -- Begin function _Z16timeval_subtractP7timevalS0_S0_
.p2align 4, 0x90
.type _Z16timeval_subtractP7timevalS0_S0_,@function
_Z16timeval_subtractP7timevalS0_S0_: # @_Z16timeval_subtractP7timevalS0_S0_
.cfi_startproc
# %bb.0:
movq (%rsi), %rax
mo... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | // Mezclar threads y bloques
#include <stdio.h>
#define N (2048 * 2048)
#define THREADS_PER_BLOCK 512
__global__ void add(int*a, int*b, int*c, int n) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
if(index < n)
c[index] = a[index] + b[index];
}
int main(){
int *a, *b, *c; // Copias de a b y c en el host
int *d_a,... | code for sm_80
Function : _Z3addPiS_S_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_TID.X ; /* 0x0000000000067919 */
/* 0x000e280000002100 */
/*0020*/ S2R... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | // Mezclar threads y bloques
#include <stdio.h>
#define N (2048 * 2048)
#define THREADS_PER_BLOCK 512
__global__ void add(int*a, int*b, int*c, int n) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
if(index < n)
c[index] = a[index] + b[index];
}
int main(){
int *a, *b, *c; // Copias de a b y c en el host
int *d_a,... | .file "tmpxft_0010a1db_00000000-6_indexing.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. | // Mezclar threads y bloques
#include <stdio.h>
#define N (2048 * 2048)
#define THREADS_PER_BLOCK 512
__global__ void add(int*a, int*b, int*c, int n) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
if(index < n)
c[index] = a[index] + b[index];
}
int main(){
int *a, *b, *c; // Copias de a b y c en el host
int *d_a,... | // Mezclar threads y bloques
#include <hip/hip_runtime.h>
#include <stdio.h>
#define N (2048 * 2048)
#define THREADS_PER_BLOCK 512
__global__ void add(int*a, int*b, int*c, int n) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
if(index < n)
c[index] = a[index] + b[index];
}
int main(){
int *a, *b, *c; // Copias de... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | // Mezclar threads y bloques
#include <hip/hip_runtime.h>
#include <stdio.h>
#define N (2048 * 2048)
#define THREADS_PER_BLOCK 512
__global__ void add(int*a, int*b, int*c, int n) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
if(index < n)
c[index] = a[index] + b[index];
}
int main(){
int *a, *b, *c; // Copias de... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3addPiS_S_i
.globl _Z3addPiS_S_i
.p2align 8
.type _Z3addPiS_S_i,@function
_Z3addPiS_S_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s3, s[0:1], 0x18
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_alu inst... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | // Mezclar threads y bloques
#include <hip/hip_runtime.h>
#include <stdio.h>
#define N (2048 * 2048)
#define THREADS_PER_BLOCK 512
__global__ void add(int*a, int*b, int*c, int n) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
if(index < n)
c[index] = a[index] + b[index];
}
int main(){
int *a, *b, *c; // Copias de... | .text
.file "indexing.hip"
.globl _Z18__device_stub__addPiS_S_i # -- Begin function _Z18__device_stub__addPiS_S_i
.p2align 4, 0x90
.type _Z18__device_stub__addPiS_S_i,@function
_Z18__device_stub__addPiS_S_i: # @_Z18__device_stub__addPiS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset 128
movq... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z3addPiS_S_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_TID.X ; /* 0x0000000000067919 */
/* 0x000e280000002100 */
/*0020*/ S2R... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3addPiS_S_i
.globl _Z3addPiS_S_i
.p2align 8
.type _Z3addPiS_S_i,@function
_Z3addPiS_S_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s3, s[0:1], 0x18
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_alu inst... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0010a1db_00000000-6_indexing.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 "indexing.hip"
.globl _Z18__device_stub__addPiS_S_i # -- Begin function _Z18__device_stub__addPiS_S_i
.p2align 4, 0x90
.type _Z18__device_stub__addPiS_S_i,@function
_Z18__device_stub__addPiS_S_i: # @_Z18__device_stub__addPiS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset 128
movq... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
//Bibliotecas Basicas
//Biblioteca Thrust
//Biblioteca cuRAND
//PARAMETROS GLOBAIS
const int QUANT_PAIS_AVALIA = 4;
int POP_TAM = 200;
int N_CIDADES = 20;
int BLOCKSIZE = 1024;
int TOTALTHREADS = 2048;
int N_GERA = 100;
const int MUT = 10;
const int MAX = 19;
const int MIN = 0;
const int ELITE = 2... | .file "tmpxft_0009871f_00000000-6_cruza.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"
//Bibliotecas Basicas
//Biblioteca Thrust
//Biblioteca cuRAND
//PARAMETROS GLOBAIS
const int QUANT_PAIS_AVALIA = 4;
int POP_TAM = 200;
int N_CIDADES = 20;
int BLOCKSIZE = 1024;
int TOTALTHREADS = 2048;
int N_GERA = 100;
const int MUT = 10;
const int MAX = 19;
const int MIN = 0;
const int ELITE = 2... | #include <hip/hip_runtime.h>
#include "includes.h"
//Bibliotecas Basicas
//Biblioteca Thrust
//Biblioteca cuRAND
//PARAMETROS GLOBAIS
const int QUANT_PAIS_AVALIA = 4;
int POP_TAM = 200;
int N_CIDADES = 20;
int BLOCKSIZE = 1024;
int TOTALTHREADS = 2048;
int N_GERA = 100;
const int MUT = 10;
const int MAX = 19;
const int... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
//Bibliotecas Basicas
//Biblioteca Thrust
//Biblioteca cuRAND
//PARAMETROS GLOBAIS
const int QUANT_PAIS_AVALIA = 4;
int POP_TAM = 200;
int N_CIDADES = 20;
int BLOCKSIZE = 1024;
int TOTALTHREADS = 2048;
int N_GERA = 100;
const int MUT = 10;
const int MAX = 19;
const int... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z5cruzajjPiS_S_S_S_
.globl _Z5cruzajjPiS_S_S_S_
.p2align 8
.type _Z5cruzajjPiS_S_S_S_,@function
_Z5cruzajjPiS_S_S_S_:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x3c
s_load_b32 s12, s[0:1], 0x0
s_add_u32 s2, s0, 48
s_addc_u32 s3, s1, 0
s_wait... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
//Bibliotecas Basicas
//Biblioteca Thrust
//Biblioteca cuRAND
//PARAMETROS GLOBAIS
const int QUANT_PAIS_AVALIA = 4;
int POP_TAM = 200;
int N_CIDADES = 20;
int BLOCKSIZE = 1024;
int TOTALTHREADS = 2048;
int N_GERA = 100;
const int MUT = 10;
const int MAX = 19;
const int... | .text
.file "cruza.hip"
.globl _Z20__device_stub__cruzajjPiS_S_S_S_ # -- Begin function _Z20__device_stub__cruzajjPiS_S_S_S_
.p2align 4, 0x90
.type _Z20__device_stub__cruzajjPiS_S_S_S_,@function
_Z20__device_stub__cruzajjPiS_S_S_S_: # @_Z20__device_stub__cruzajjPiS_S_S_S_
.cfi_startproc
# %bb.0:
subq $152, %rsp
.cfi_... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0009871f_00000000-6_cruza.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 "cruza.hip"
.globl _Z20__device_stub__cruzajjPiS_S_S_S_ # -- Begin function _Z20__device_stub__cruzajjPiS_S_S_S_
.p2align 4, 0x90
.type _Z20__device_stub__cruzajjPiS_S_S_S_,@function
_Z20__device_stub__cruzajjPiS_S_S_S_: # @_Z20__device_stub__cruzajjPiS_S_S_S_
.cfi_startproc
# %bb.0:
subq $152, %rsp
.cfi_... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#define ARRAY_SIZE 128
__global__ void avarage_list(float * value_in,float * value_out){
//Local memory
int index = threadIdx.x;
float sum = 0.0;
// Static shared var
__shared__ float sh_arr[ARRAY_SIZE];
//Shared mem | global memory
sh_arr[index] = value_in[index];
__syncthreads(); // Garante que ... | code for sm_80
Function : _Z12avarage_listPfS_
.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 R3, SR_TID.X ; /* 0x0000000000037919 */
/* 0x000e2200... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#define ARRAY_SIZE 128
__global__ void avarage_list(float * value_in,float * value_out){
//Local memory
int index = threadIdx.x;
float sum = 0.0;
// Static shared var
__shared__ float sh_arr[ARRAY_SIZE];
//Shared mem | global memory
sh_arr[index] = value_in[index];
__syncthreads(); // Garante que ... | .file "tmpxft_00196b5b_00000000-6_memory_examples.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 $... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#define ARRAY_SIZE 128
__global__ void avarage_list(float * value_in,float * value_out){
//Local memory
int index = threadIdx.x;
float sum = 0.0;
// Static shared var
__shared__ float sh_arr[ARRAY_SIZE];
//Shared mem | global memory
sh_arr[index] = value_in[index];
__syncthreads(); // Garante que ... | #include <hip/hip_runtime.h>
#include <stdio.h>
#define ARRAY_SIZE 128
__global__ void avarage_list(float * value_in,float * value_out){
//Local memory
int index = threadIdx.x;
float sum = 0.0;
// Static shared var
__shared__ float sh_arr[ARRAY_SIZE];
//Shared mem | global memory
sh_arr[index] = value_in[index];
__s... |
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 ARRAY_SIZE 128
__global__ void avarage_list(float * value_in,float * value_out){
//Local memory
int index = threadIdx.x;
float sum = 0.0;
// Static shared var
__shared__ float sh_arr[ARRAY_SIZE];
//Shared mem | global memory
sh_arr[index] = value_in[index];
__s... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z12avarage_listPfS_
.globl _Z12avarage_listPfS_
.p2align 8
.type _Z12avarage_listPfS_,@function
_Z12avarage_listPfS_:
s_load_b64 s[2:3], s[0:1], 0x0
v_lshlrev_b32_e32 v3, 2, v0
v_dual_mov_b32 v1, 0 :: v_dual_add_nc_u32 v2, 1, v0
s_wait... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
#define ARRAY_SIZE 128
__global__ void avarage_list(float * value_in,float * value_out){
//Local memory
int index = threadIdx.x;
float sum = 0.0;
// Static shared var
__shared__ float sh_arr[ARRAY_SIZE];
//Shared mem | global memory
sh_arr[index] = value_in[index];
__s... | .text
.file "memory_examples.hip"
.globl _Z27__device_stub__avarage_listPfS_ # -- Begin function _Z27__device_stub__avarage_listPfS_
.p2align 4, 0x90
.type _Z27__device_stub__avarage_listPfS_,@function
_Z27__device_stub__avarage_listPfS_: # @_Z27__device_stub__avarage_listPfS_
.cfi_startproc
# %bb.0:
subq $88, %rsp
... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z12avarage_listPfS_
.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 R3, SR_TID.X ; /* 0x0000000000037919 */
/* 0x000e2200... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z12avarage_listPfS_
.globl _Z12avarage_listPfS_
.p2align 8
.type _Z12avarage_listPfS_,@function
_Z12avarage_listPfS_:
s_load_b64 s[2:3], s[0:1], 0x0
v_lshlrev_b32_e32 v3, 2, v0
v_dual_mov_b32 v1, 0 :: v_dual_add_nc_u32 v2, 1, v0
s_wait... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00196b5b_00000000-6_memory_examples.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 $... | .text
.file "memory_examples.hip"
.globl _Z27__device_stub__avarage_listPfS_ # -- Begin function _Z27__device_stub__avarage_listPfS_
.p2align 4, 0x90
.type _Z27__device_stub__avarage_listPfS_,@function
_Z27__device_stub__avarage_listPfS_: # @_Z27__device_stub__avarage_listPfS_
.cfi_startproc
# %bb.0:
subq $88, %rsp
... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #ifdef __cplusplus
extern "C" {
#endif
__global__ void mandelbrot(int* A, const int N, const int largeur, const int hauteur){
int idx = blockDim.x * blockIdx.x + threadIdx.x;
int y = idx / hauteur;
int x = idx - (y * largeur);
if (y < hauteur && x < largeur)
{
int cpt = 0;
float x1 = 0.;
float y1 = 0.;
float x2 = 0.;
... | code for sm_80
Function : game
.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*/ IABS R7, c[0x0][0x170] ; /* 0x00005c0000077a13 */
/* 0x000fe20000000000 *... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #ifdef __cplusplus
extern "C" {
#endif
__global__ void mandelbrot(int* A, const int N, const int largeur, const int hauteur){
int idx = blockDim.x * blockIdx.x + threadIdx.x;
int y = idx / hauteur;
int x = idx - (y * largeur);
if (y < hauteur && x < largeur)
{
int cpt = 0;
float x1 = 0.;
float y1 = 0.;
float x2 = 0.;
... | .file "tmpxft_000fffa4_00000000-6_Game.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
.cf... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #ifdef __cplusplus
extern "C" {
#endif
__global__ void mandelbrot(int* A, const int N, const int largeur, const int hauteur){
int idx = blockDim.x * blockIdx.x + threadIdx.x;
int y = idx / hauteur;
int x = idx - (y * largeur);
if (y < hauteur && x < largeur)
{
int cpt = 0;
float x1 = 0.;
float y1 = 0.;
float x2 = 0.;
... | #include <hip/hip_runtime.h>
#ifdef __cplusplus
extern "C" {
#endif
__global__ void mandelbrot(int* A, const int N, const int largeur, const int hauteur){
int idx = blockDim.x * blockIdx.x + threadIdx.x;
int y = idx / hauteur;
int x = idx - (y * largeur);
if (y < hauteur && x < largeur)
{
int cpt = 0;
float x1 = 0.;
fl... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#ifdef __cplusplus
extern "C" {
#endif
__global__ void mandelbrot(int* A, const int N, const int largeur, const int hauteur){
int idx = blockDim.x * blockIdx.x + threadIdx.x;
int y = idx / hauteur;
int x = idx - (y * largeur);
if (y < hauteur && x < largeur)
{
int cpt = 0;
float x1 = 0.;
fl... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected mandelbrot
.globl mandelbrot
.p2align 8
.type mandelbrot,@function
mandelbrot:
s_clause 0x1
s_load_b64 s[4:5], s[0:1], 0xc
s_load_b32 s2, s[0:1], 0x24
s_waitcnt lgkmcnt(0)
s_ashr_i32 s3, s5, 31
s_and_b32 s2, s2, 0xff... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#ifdef __cplusplus
extern "C" {
#endif
__global__ void mandelbrot(int* A, const int N, const int largeur, const int hauteur){
int idx = blockDim.x * blockIdx.x + threadIdx.x;
int y = idx / hauteur;
int x = idx - (y * largeur);
if (y < hauteur && x < largeur)
{
int cpt = 0;
float x1 = 0.;
fl... | .text
.file "Game.hip"
.globl __device_stub__mandelbrot # -- Begin function __device_stub__mandelbrot
.p2align 4, 0x90
.type __device_stub__mandelbrot,@function
__device_stub__mandelbrot: # @__device_stub__mandelbrot
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset 128
movq %rdi, 72(%rsp)
... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000fffa4_00000000-6_Game.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
.cf... | .text
.file "Game.hip"
.globl __device_stub__mandelbrot # -- Begin function __device_stub__mandelbrot
.p2align 4, 0x90
.type __device_stub__mandelbrot,@function
__device_stub__mandelbrot: # @__device_stub__mandelbrot
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_offset 128
movq %rdi, 72(%rsp)
... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <curand_kernel.h> // CURAND lib header file
#define TRIALS_PER_THREAD 1024 // Set the value for global variables
#define BLOCKS 256
#define THREADS 512
#define PI 3.1415926535 // Known value of pi, to calculate error
__global__ void pi_mc(float *estimate, curandState *sta... | code for sm_80
Function : _Z5pi_mcPfP17curandStateXORWOW
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <curand_kernel.h> // CURAND lib header file
#define TRIALS_PER_THREAD 1024 // Set the value for global variables
#define BLOCKS 256
#define THREADS 512
#define PI 3.1415926535 // Known value of pi, to calculate error
__global__ void pi_mc(float *estimate, curandState *sta... | .file "tmpxft_000aab80_00000000-6_cuda_monte_carlo_pi.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2274:
.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 <curand_kernel.h> // CURAND lib header file
#define TRIALS_PER_THREAD 1024 // Set the value for global variables
#define BLOCKS 256
#define THREADS 512
#define PI 3.1415926535 // Known value of pi, to calculate error
__global__ void pi_mc(float *estimate, curandState *sta... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <hiprand/hiprand_kernel.h> // CURAND lib header file
#define TRIALS_PER_THREAD 1024 // Set the value for global variables
#define BLOCKS 256
#define THREADS 512
#define PI 3.1415926535 // Known value of pi, to calculate error
__global__ void p... |
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 <hiprand/hiprand_kernel.h> // CURAND lib header file
#define TRIALS_PER_THREAD 1024 // Set the value for global variables
#define BLOCKS 256
#define THREADS 512
#define PI 3.1415926535 // Known value of pi, to calculate error
__global__ void p... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z5pi_mcPfP12hiprandState
.globl _Z5pi_mcPfP12hiprandState
.p2align 8
.type _Z5pi_mcPfP12hiprandState,@function
_Z5pi_mcPfP12hiprandState:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x1c
s_load_b64 s[2:3], s[0:1], 0x8
v_dual_mov_b32 v7, 0 :: v_dual_mo... |
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 <hiprand/hiprand_kernel.h> // CURAND lib header file
#define TRIALS_PER_THREAD 1024 // Set the value for global variables
#define BLOCKS 256
#define THREADS 512
#define PI 3.1415926535 // Known value of pi, to calculate error
__global__ void p... | .text
.file "cuda_monte_carlo_pi.hip"
.globl _Z20__device_stub__pi_mcPfP12hiprandState # -- Begin function _Z20__device_stub__pi_mcPfP12hiprandState
.p2align 4, 0x90
.type _Z20__device_stub__pi_mcPfP12hiprandState,@function
_Z20__device_stub__pi_mcPfP12hiprandState: # @_Z20__device_stub__pi_mcPfP12hiprandState
.cfi_sta... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z5pi_mcPfP17curandStateXORWOW
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z5pi_mcPfP12hiprandState
.globl _Z5pi_mcPfP12hiprandState
.p2align 8
.type _Z5pi_mcPfP12hiprandState,@function
_Z5pi_mcPfP12hiprandState:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x1c
s_load_b64 s[2:3], s[0:1], 0x8
v_dual_mov_b32 v7, 0 :: v_dual_mo... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000aab80_00000000-6_cuda_monte_carlo_pi.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2274:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
ad... | .text
.file "cuda_monte_carlo_pi.hip"
.globl _Z20__device_stub__pi_mcPfP12hiprandState # -- Begin function _Z20__device_stub__pi_mcPfP12hiprandState
.p2align 4, 0x90
.type _Z20__device_stub__pi_mcPfP12hiprandState,@function
_Z20__device_stub__pi_mcPfP12hiprandState: # @_Z20__device_stub__pi_mcPfP12hiprandState
.cfi_sta... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
unsigned int N = 1 << 12;
unsigned int N_p = N/4;
__global__
void mul(unsigned int n, unsigned int *x, unsigned int *y)
{
unsigned int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) y[i] = x[i] * y[i];
}
int main(void)
{
unsigned int /**x, *y,*/ *d_x, *d_y;
int8_t *x, *y;
x = (int8_t*)malloc(N*s... | code for sm_80
Function : _Z3muljPjS_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e280000002500 */
/*0020*/ S2R... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
unsigned int N = 1 << 12;
unsigned int N_p = N/4;
__global__
void mul(unsigned int n, unsigned int *x, unsigned int *y)
{
unsigned int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) y[i] = x[i] * y[i];
}
int main(void)
{
unsigned int /**x, *y,*/ *d_x, *d_y;
int8_t *x, *y;
x = (int8_t*)malloc(N*s... | .file "tmpxft_00197819_00000000-6_mul_packed.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>
unsigned int N = 1 << 12;
unsigned int N_p = N/4;
__global__
void mul(unsigned int n, unsigned int *x, unsigned int *y)
{
unsigned int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) y[i] = x[i] * y[i];
}
int main(void)
{
unsigned int /**x, *y,*/ *d_x, *d_y;
int8_t *x, *y;
x = (int8_t*)malloc(N*s... | #include <hip/hip_runtime.h>
#include <stdio.h>
unsigned int N = 1 << 12;
unsigned int N_p = N/4;
__global__
void mul(unsigned int n, unsigned int *x, unsigned int *y)
{
unsigned int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) y[i] = x[i] * y[i];
}
int main(void)
{
unsigned int /**x, *y,*/ *d_x, *d_y;
int8_t *x... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
unsigned int N = 1 << 12;
unsigned int N_p = N/4;
__global__
void mul(unsigned int n, unsigned int *x, unsigned int *y)
{
unsigned int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) y[i] = x[i] * y[i];
}
int main(void)
{
unsigned int /**x, *y,*/ *d_x, *d_y;
int8_t *x... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3muljPjS_
.globl _Z3muljPjS_
.p2align 8
.type _Z3muljPjS_,@function
_Z3muljPjS_:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_and_b32 s2, 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 <stdio.h>
unsigned int N = 1 << 12;
unsigned int N_p = N/4;
__global__
void mul(unsigned int n, unsigned int *x, unsigned int *y)
{
unsigned int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n) y[i] = x[i] * y[i];
}
int main(void)
{
unsigned int /**x, *y,*/ *d_x, *d_y;
int8_t *x... | .text
.file "mul_packed.hip"
.globl _Z18__device_stub__muljPjS_ # -- Begin function _Z18__device_stub__muljPjS_
.p2align 4, 0x90
.type _Z18__device_stub__muljPjS_,@function
_Z18__device_stub__muljPjS_: # @_Z18__device_stub__muljPjS_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset 112
movl %ed... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z3muljPjS_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R4, SR_CTAID.X ; /* 0x0000000000047919 */
/* 0x000e280000002500 */
/*0020*/ S2R... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3muljPjS_
.globl _Z3muljPjS_
.p2align 8
.type _Z3muljPjS_,@function
_Z3muljPjS_:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x24
s_load_b32 s3, s[0:1], 0x0
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_alu instid0(S... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00197819_00000000-6_mul_packed.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 "mul_packed.hip"
.globl _Z18__device_stub__muljPjS_ # -- Begin function _Z18__device_stub__muljPjS_
.p2align 4, 0x90
.type _Z18__device_stub__muljPjS_,@function
_Z18__device_stub__muljPjS_: # @_Z18__device_stub__muljPjS_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset 112
movl %ed... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/copy.h>
#include <thrust/functional.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/sequence.h>
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <chrono>
using namespace std;
using sys_clock = std::chrono::s... | code for sm_80
Function : _ZN3cub17CUB_200700_800_NS6detail8for_each13static_kernelINS2_12policy_hub_t12policy_350_tElNS2_12op_wrapper_tIl11matrix_multN6thrust20THRUST_200700_800_NS12zip_iteratorINS9_5tupleIJNS9_6detail15normal_iteratorINS9_10device_ptrIfEEEESG_NSD_INSE_IiEEEESG_EEEEEEEEEvT0_T1_
.headerflags @"EF_CUDA_... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/copy.h>
#include <thrust/functional.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/sequence.h>
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <chrono>
using namespace std;
using sys_clock = std::chrono::s... | #include <hip/hip_runtime.h>
#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/copy.h>
#include <thrust/functional.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/sequence.h>
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <chrono>
using namespace std;
usi... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/copy.h>
#include <thrust/functional.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/sequence.h>
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <chrono>
using namespace std;
usi... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.section .text._ZN6thrust11hip_rocprim14__parallel_for6kernelILj256ENS0_20__uninitialized_fill7functorINS_10device_ptrIfEEfEEmLj1EEEvT0_T1_S9_,"axG",@progbits,_ZN6thrust11hip_rocprim14__parallel_for6kernelILj256ENS0_20__uninitialized_fill7functorINS_10device_ptrIfEEfEEm... |
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 <math.h>
#define N 64 // constant array lenght
#define TPB 32 // threads per block
__device__ float scale(int i, int n)
{
return ((float)i) / (n - 1);
}
__device__ float distance(float x1, float x2)
{
return sqrt((x2 - x1) * (x2... | code for sm_80
Function : _Z14distanceKernelPffi
.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 */
/* 0x000e... |
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 <math.h>
#define N 64 // constant array lenght
#define TPB 32 // threads per block
__device__ float scale(int i, int n)
{
return ((float)i) / (n - 1);
}
__device__ float distance(float x1, float x2)
{
return sqrt((x2 - x1) * (x2... | .file "tmpxft_0015a754_00000000-6_kernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2062:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <math.h>
#define N 64 // constant array lenght
#define TPB 32 // threads per block
__device__ float scale(int i, int n)
{
return ((float)i) / (n - 1);
}
__device__ float distance(float x1, float x2)
{
return sqrt((x2 - x1) * (x2... | #include "hip/hip_runtime.h"
#include <stdio.h>
#include <math.h>
#define N 64 // constant array lenght
#define TPB 32 // threads per block
__device__ float scale(int i, int n)
{
return ((float)i) / (n - 1);
}
__device__ float distance(float x1, float x2)
{
return sqrt((x2 - x1) * (x2 - x1));
}
// converted from serial... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include "hip/hip_runtime.h"
#include <stdio.h>
#include <math.h>
#define N 64 // constant array lenght
#define TPB 32 // threads per block
__device__ float scale(int i, int n)
{
return ((float)i) / (n - 1);
}
__device__ float distance(float x1, float x2)
{
return sqrt((x2 - x1) * (x2 - x1));
}
// converted from serial... | .text
.file "kernel.hip"
.globl _Z29__device_stub__distanceKernelPffi # -- Begin function _Z29__device_stub__distanceKernelPffi
.p2align 4, 0x90
.type _Z29__device_stub__distanceKernelPffi,@function
_Z29__device_stub__distanceKernelPffi: # @_Z29__device_stub__distanceKernelPffi
.cfi_startproc
# %bb.0:
subq $88, %rsp
.... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0015a754_00000000-6_kernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2062:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.... | .text
.file "kernel.hip"
.globl _Z29__device_stub__distanceKernelPffi # -- Begin function _Z29__device_stub__distanceKernelPffi
.p2align 4, 0x90
.type _Z29__device_stub__distanceKernelPffi,@function
_Z29__device_stub__distanceKernelPffi: # @_Z29__device_stub__distanceKernelPffi
.cfi_startproc
# %bb.0:
subq $88, %rsp
.... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
__device__ void MatrixMultiply(void *input)
{
int warp_size=32;
int thread = threadIdx.x % warp_size;
float* inputIn = (float*)input;
int matrixWidth = inputIn[0];
float *matrixA = inputIn+1;
float *matrixB = matrixA + matrixWidth*matrixWidth;
float *matrixOut = matrixA + 2*matrixWidth*matrixWidth;... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
__device__ void MatrixMultiply(void *input)
{
int warp_size=32;
int thread = threadIdx.x % warp_size;
float* inputIn = (float*)input;
int matrixWidth = inputIn[0];
float *matrixA = inputIn+1;
float *matrixB = matrixA + matrixWidth*matrixWidth;
float *matrixOut = matrixA + 2*matrixWidth*matrixWidth;... | .file "tmpxft_001a7564_00000000-6_MatrixMultiply.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... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
__device__ void MatrixMultiply(void *input)
{
int warp_size=32;
int thread = threadIdx.x % warp_size;
float* inputIn = (float*)input;
int matrixWidth = inputIn[0];
float *matrixA = inputIn+1;
float *matrixB = matrixA + matrixWidth*matrixWidth;
float *matrixOut = matrixA + 2*matrixWidth*matrixWidth;... | #include <hip/hip_runtime.h>
#include <stdio.h>
__device__ void MatrixMultiply(void *input)
{
int warp_size=32;
int thread = threadIdx.x % warp_size;
float* inputIn = (float*)input;
int matrixWidth = inputIn[0];
float *matrixA = inputIn+1;
float *matrixB = matrixA + matrixWidth*matrixWidth;
float *matrixOut = matrixA... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
__device__ void MatrixMultiply(void *input)
{
int warp_size=32;
int thread = threadIdx.x % warp_size;
float* inputIn = (float*)input;
int matrixWidth = inputIn[0];
float *matrixA = inputIn+1;
float *matrixB = matrixA + matrixWidth*matrixWidth;
float *matrixOut = matrixA... | .text
.p2alignl 7, 3214868480
.fill 96, 4, 3214868480
.type __hip_cuid_,@object
.section .bss,"aw",@nobits
.globl __hip_cuid_
__hip_cuid_:
.byte 0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
__device__ void MatrixMultiply(void *input)
{
int warp_size=32;
int thread = threadIdx.x % warp_size;
float* inputIn = (float*)input;
int matrixWidth = inputIn[0];
float *matrixA = inputIn+1;
float *matrixB = matrixA + matrixWidth*matrixWidth;
float *matrixOut = matrixA... | .text
.file "MatrixMultiply.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 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_001a7564_00000000-6_MatrixMultiply.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... | .text
.file "MatrixMultiply.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<cuda.h>
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#define CHECK 0
const unsigned int SINGLE_PRECISION = 1;
const unsigned int DOUBLE_PRECISION = 0;
float *SMd, *SNd, *SPd;
double *DMd, *DNd, *DPd;
const unsigned int WIDTH = 1024;
//generate matrix
template<typename T>
T *GenMatrix(const unsigned ... | code for sm_80
Function : _Z15MatrixAddKernelIdEvPT_PKS0_S3_j
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e2200... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include<cuda.h>
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#define CHECK 0
const unsigned int SINGLE_PRECISION = 1;
const unsigned int DOUBLE_PRECISION = 0;
float *SMd, *SNd, *SPd;
double *DMd, *DNd, *DPd;
const unsigned int WIDTH = 1024;
//generate matrix
template<typename T>
T *GenMatrix(const unsigned ... | .file "tmpxft_0010e5b9_00000000-6_addm_s_d.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.section .text._Z15MatrixAddKernelIfEvPT_PKS0_S3_j,"axG",@progbits,_Z15MatrixAddKernelIfEvPT_PKS0_S3_j,comdat
.weak _Z15MatrixAddKernelIfEvPT_PKS0_S3_j
.type _Z15MatrixAddKernelIfEvPT_PKS0_S3_j, @function
_Z15... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include<cuda.h>
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#define CHECK 0
const unsigned int SINGLE_PRECISION = 1;
const unsigned int DOUBLE_PRECISION = 0;
float *SMd, *SNd, *SPd;
double *DMd, *DNd, *DPd;
const unsigned int WIDTH = 1024;
//generate matrix
template<typename T>
T *GenMatrix(const unsigned ... | #include<hip/hip_runtime.h>
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#define CHECK 0
const unsigned int SINGLE_PRECISION = 1;
const unsigned int DOUBLE_PRECISION = 0;
float *SMd, *SNd, *SPd;
double *DMd, *DNd, *DPd;
const unsigned int WIDTH = 1024;
//generate matrix
template<typename T>
T *GenMatrix(cons... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.