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. | /*
* Adding two vectors using CUDA
*/
#include <hip/hip_runtime.h>
#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace::std;
__global__
void add(int n, float *x, float *y){
int index = blockIdx.x * blockDim.x + threadIdx.x;
int stride = blockDim.x * gridDim.x;
for(int i=index; i< n ; i+=stride){
y[i]... | .text
.file "add_cuda.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z18__device_stub__addiPfS_ # -- Begin function _Z18__device_stub__addiPfS_
.p2align 4, 0x90
.... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0012abf7_00000000-6_add_cuda.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 __cudaU... | .text
.file "add_cuda.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z18__device_stub__addiPfS_ # -- Begin function _Z18__device_stub__addiPfS_
.p2align 4, 0x90
.... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void gpuSmMM( float *Ad , float *Bd , float *Cd , int dimention )
{
//Taking shared array to break the MAtrix in Tile widht and fatch them in that array per ele
__shared__ float Ads [tilewidth][tilewidth] ;
__shared__ float Bds [tilewidth][tilewidth] ;
// calculate thread id
unsigned in... | code for sm_80
Function : _Z7gpuSmMMPfS_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*/ MOV R0, c[0x0][0x178] ; /* 0x00005e0000007a02 */
/* 0x000fc80000000f00 */
/*0... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void gpuSmMM( float *Ad , float *Bd , float *Cd , int dimention )
{
//Taking shared array to break the MAtrix in Tile widht and fatch them in that array per ele
__shared__ float Ads [tilewidth][tilewidth] ;
__shared__ float Bds [tilewidth][tilewidth] ;
// calculate thread id
unsigned in... | .file "tmpxft_0001f878_00000000-6_gpuSmMM.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void gpuSmMM( float *Ad , float *Bd , float *Cd , int dimention )
{
//Taking shared array to break the MAtrix in Tile widht and fatch them in that array per ele
__shared__ float Ads [tilewidth][tilewidth] ;
__shared__ float Bds [tilewidth][tilewidth] ;
// calculate thread id
unsigned in... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void gpuSmMM( float *Ad , float *Bd , float *Cd , int dimention )
{
//Taking shared array to break the MAtrix in Tile widht and fatch them in that array per ele
__shared__ float Ads [tilewidth][tilewidth] ;
__shared__ float Bds [tilewidth][tilewidth] ;
// ca... |
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 gpuSmMM( float *Ad , float *Bd , float *Cd , int dimention )
{
//Taking shared array to break the MAtrix in Tile widht and fatch them in that array per ele
__shared__ float Ads [tilewidth][tilewidth] ;
__shared__ float Bds [tilewidth][tilewidth] ;
// ca... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z7gpuSmMMPfS_S_i
.globl _Z7gpuSmMMPfS_S_i
.p2align 8
.type _Z7gpuSmMMPfS_S_i,@function
_Z7gpuSmMMPfS_S_i:
s_load_b32 s4, s[0:1], 0x18
s_waitcnt lgkmcnt(0)
s_cmp_lt_i32 s4, 2
s_cbranch_scc1 .LBB0_5
v_bfe_u32 v5, v0, 10, 10
v_dual_... |
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 gpuSmMM( float *Ad , float *Bd , float *Cd , int dimention )
{
//Taking shared array to break the MAtrix in Tile widht and fatch them in that array per ele
__shared__ float Ads [tilewidth][tilewidth] ;
__shared__ float Bds [tilewidth][tilewidth] ;
// ca... | .text
.file "gpuSmMM.hip"
.globl _Z22__device_stub__gpuSmMMPfS_S_i # -- Begin function _Z22__device_stub__gpuSmMMPfS_S_i
.p2align 4, 0x90
.type _Z22__device_stub__gpuSmMMPfS_S_i,@function
_Z22__device_stub__gpuSmMMPfS_S_i: # @_Z22__device_stub__gpuSmMMPfS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
.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 : _Z7gpuSmMMPfS_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*/ MOV R0, c[0x0][0x178] ; /* 0x00005e0000007a02 */
/* 0x000fc80000000f00 */
/*0... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z7gpuSmMMPfS_S_i
.globl _Z7gpuSmMMPfS_S_i
.p2align 8
.type _Z7gpuSmMMPfS_S_i,@function
_Z7gpuSmMMPfS_S_i:
s_load_b32 s4, s[0:1], 0x18
s_waitcnt lgkmcnt(0)
s_cmp_lt_i32 s4, 2
s_cbranch_scc1 .LBB0_5
v_bfe_u32 v5, v0, 10, 10
v_dual_... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0001f878_00000000-6_gpuSmMM.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
... | .text
.file "gpuSmMM.hip"
.globl _Z22__device_stub__gpuSmMMPfS_S_i # -- Begin function _Z22__device_stub__gpuSmMMPfS_S_i
.p2align 4, 0x90
.type _Z22__device_stub__gpuSmMMPfS_S_i,@function
_Z22__device_stub__gpuSmMMPfS_S_i: # @_Z22__device_stub__gpuSmMMPfS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cfa_of... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void grayscale(unsigned char * data_rgb, unsigned char * data_gray, std::size_t rows, std::size_t cols)
{
auto i = blockIdx.x * blockDim.x + threadIdx.x;
auto j = blockIdx.y * blockDim.y + threadIdx.y;
if( i < cols && j < rows )
{
data_gray[ j * cols + i ] = (
307 * data_rgb[ 3 * (j * c... | code for sm_80
Function : _Z9grayscalePhS_mm
.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 */
/*002... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void grayscale(unsigned char * data_rgb, unsigned char * data_gray, std::size_t rows, std::size_t cols)
{
auto i = blockIdx.x * blockDim.x + threadIdx.x;
auto j = blockIdx.y * blockDim.y + threadIdx.y;
if( i < cols && j < rows )
{
data_gray[ j * cols + i ] = (
307 * data_rgb[ 3 * (j * c... | .file "tmpxft_000dc75c_00000000-6_grayscale.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, %rs... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void grayscale(unsigned char * data_rgb, unsigned char * data_gray, std::size_t rows, std::size_t cols)
{
auto i = blockIdx.x * blockDim.x + threadIdx.x;
auto j = blockIdx.y * blockDim.y + threadIdx.y;
if( i < cols && j < rows )
{
data_gray[ j * cols + i ] = (
307 * data_rgb[ 3 * (j * c... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void grayscale(unsigned char * data_rgb, unsigned char * data_gray, std::size_t rows, std::size_t cols)
{
auto i = blockIdx.x * blockDim.x + threadIdx.x;
auto j = blockIdx.y * blockDim.y + threadIdx.y;
if( i < cols && j < rows )
{
data_gray[ j * cols + 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 grayscale(unsigned char * data_rgb, unsigned char * data_gray, std::size_t rows, std::size_t cols)
{
auto i = blockIdx.x * blockDim.x + threadIdx.x;
auto j = blockIdx.y * blockDim.y + threadIdx.y;
if( i < cols && j < rows )
{
data_gray[ j * cols + i ] =... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z9grayscalePhS_mm
.globl _Z9grayscalePhS_mm
.p2align 8
.type _Z9grayscalePhS_mm,@function
_Z9grayscalePhS_mm:
s_clause 0x1
s_load_b32 s6, s[0:1], 0x2c
s_load_b64 s[2:3], s[0:1], 0x18
v_dual_mov_b32 v1, 0 :: v_dual_and_b32 v4, 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 grayscale(unsigned char * data_rgb, unsigned char * data_gray, std::size_t rows, std::size_t cols)
{
auto i = blockIdx.x * blockDim.x + threadIdx.x;
auto j = blockIdx.y * blockDim.y + threadIdx.y;
if( i < cols && j < rows )
{
data_gray[ j * cols + i ] =... | .text
.file "grayscale.hip"
.globl _Z24__device_stub__grayscalePhS_mm # -- Begin function _Z24__device_stub__grayscalePhS_mm
.p2align 4, 0x90
.type _Z24__device_stub__grayscalePhS_mm,@function
_Z24__device_stub__grayscalePhS_mm: # @_Z24__device_stub__grayscalePhS_mm
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z9grayscalePhS_mm
.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 */
/*002... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z9grayscalePhS_mm
.globl _Z9grayscalePhS_mm
.p2align 8
.type _Z9grayscalePhS_mm,@function
_Z9grayscalePhS_mm:
s_clause 0x1
s_load_b32 s6, s[0:1], 0x2c
s_load_b64 s[2:3], s[0:1], 0x18
v_dual_mov_b32 v1, 0 :: v_dual_and_b32 v4, 0x3ff... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000dc75c_00000000-6_grayscale.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, %rs... | .text
.file "grayscale.hip"
.globl _Z24__device_stub__grayscalePhS_mm # -- Begin function _Z24__device_stub__grayscalePhS_mm
.p2align 4, 0x90
.type _Z24__device_stub__grayscalePhS_mm,@function
_Z24__device_stub__grayscalePhS_mm: # @_Z24__device_stub__grayscalePhS_mm
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | /*
* Copyright (c) 2018 Preferred Networks, Inc. All rights reserved.
*/
// This is a utility for conversion between float and half.
// From CUDA 9.2, __float2half/__half2float can be called from host and GCC can
// compile them, but with CUDA 9.0 they can't, so this utils are needed.
#include <cuda_fp16.h>
#include <i... | code for sm_80
Function : _ZN11chainer_trt8internal17half2float_kernelEPK6__halfPfi
.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 ; /* 0x00000000000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /*
* Copyright (c) 2018 Preferred Networks, Inc. All rights reserved.
*/
// This is a utility for conversion between float and half.
// From CUDA 9.2, __float2half/__half2float can be called from host and GCC can
// compile them, but with CUDA 9.0 they can't, so this utils are needed.
#include <cuda_fp16.h>
#include <i... | .file "tmpxft_0015e51e_00000000-6_half.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4047:
.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. | /*
* Copyright (c) 2018 Preferred Networks, Inc. All rights reserved.
*/
// This is a utility for conversion between float and half.
// From CUDA 9.2, __float2half/__half2float can be called from host and GCC can
// compile them, but with CUDA 9.0 they can't, so this utils are needed.
#include <cuda_fp16.h>
#include <i... | /*
* Copyright (c) 2018 Preferred Networks, Inc. All rights reserved.
*/
// This is a utility for conversion between float and half.
// From CUDA 9.2, __float2half/__half2float can be called from host and GCC can
// compile them, but with CUDA 9.0 they can't, so this utils are needed.
#include <hip/hip_runtime.h>
#incl... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | /*
* Copyright (c) 2018 Preferred Networks, Inc. All rights reserved.
*/
// This is a utility for conversion between float and half.
// From CUDA 9.2, __float2half/__half2float can be called from host and GCC can
// compile them, but with CUDA 9.0 they can't, so this utils are needed.
#include <hip/hip_runtime.h>
#incl... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _ZN11chainer_trt8internal17float2half_kernelEPKfP6__halfi
.globl _ZN11chainer_trt8internal17float2half_kernelEPKfP6__halfi
.p2align 8
.type _ZN11chainer_trt8internal17float2half_kernelEPKfP6__halfi,@function
_ZN11chainer_trt8internal17float2half_kernelEPKfP6... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | /*
* Copyright (c) 2018 Preferred Networks, Inc. All rights reserved.
*/
// This is a utility for conversion between float and half.
// From CUDA 9.2, __float2half/__half2float can be called from host and GCC can
// compile them, but with CUDA 9.0 they can't, so this utils are needed.
#include <hip/hip_runtime.h>
#incl... | .text
.file "half.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _ZN11chainer_trt8internal32__device_stub__float2half_kernelEPKfP6__halfi # -- Begin function _ZN11chai... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _ZN11chainer_trt8internal17half2float_kernelEPK6__halfPfi
.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 ; /* 0x00000000000... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _ZN11chainer_trt8internal17float2half_kernelEPKfP6__halfi
.globl _ZN11chainer_trt8internal17float2half_kernelEPKfP6__halfi
.p2align 8
.type _ZN11chainer_trt8internal17float2half_kernelEPKfP6__halfi,@function
_ZN11chainer_trt8internal17float2half_kernelEPKfP6... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0015e51e_00000000-6_half.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4047:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnreg... | .text
.file "half.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _ZN11chainer_trt8internal32__device_stub__float2half_kernelEPKfP6__halfi # -- Begin function _ZN11chai... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void gpu_rBRIEF_Loop(int N, float4* patches, int4* pattern)
{
// // 1) Shared memory management
// extern __shared__ float4 shared[];
// int4* sharedPattern = (int4*) shared;
// float4* sharedPatches0 = (float4*) &shared[256];
// float4* sharedPatches1 = (float4*) &shared[N*blockDim.x*2... | code for sm_80
Function : _Z15gpu_rBRIEF_LoopiP6float4P4int4
.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 */
/*0... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void gpu_rBRIEF_Loop(int N, float4* patches, int4* pattern)
{
// // 1) Shared memory management
// extern __shared__ float4 shared[];
// int4* sharedPattern = (int4*) shared;
// float4* sharedPatches0 = (float4*) &shared[256];
// float4* sharedPatches1 = (float4*) &shared[N*blockDim.x*2... | .file "tmpxft_0006f14a_00000000-6_gpu_rBRIEF_Loop.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void gpu_rBRIEF_Loop(int N, float4* patches, int4* pattern)
{
// // 1) Shared memory management
// extern __shared__ float4 shared[];
// int4* sharedPattern = (int4*) shared;
// float4* sharedPatches0 = (float4*) &shared[256];
// float4* sharedPatches1 = (float4*) &shared[N*blockDim.x*2... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void gpu_rBRIEF_Loop(int N, float4* patches, int4* pattern)
{
// // 1) Shared memory management
// extern __shared__ float4 shared[];
// int4* sharedPattern = (int4*) shared;
// float4* sharedPatches0 = (float4*) &shared[256];
// float4* sharedPatches1 = (fl... |
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 gpu_rBRIEF_Loop(int N, float4* patches, int4* pattern)
{
// // 1) Shared memory management
// extern __shared__ float4 shared[];
// int4* sharedPattern = (int4*) shared;
// float4* sharedPatches0 = (float4*) &shared[256];
// float4* sharedPatches1 = (fl... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z15gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE
.globl _Z15gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE
.p2align 8
.type _Z15gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE,@function
_Z15gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE:... |
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 gpu_rBRIEF_Loop(int N, float4* patches, int4* pattern)
{
// // 1) Shared memory management
// extern __shared__ float4 shared[];
// int4* sharedPattern = (int4*) shared;
// float4* sharedPatches0 = (float4*) &shared[256];
// float4* sharedPatches1 = (fl... | .text
.file "gpu_rBRIEF_Loop.hip"
.globl _Z30__device_stub__gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE # -- Begin function _Z30__device_stub__gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE
.p2align 4, 0x90
.type _Z30__device_stub__gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE,@function
_Z30__device_... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z15gpu_rBRIEF_LoopiP6float4P4int4
.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 */
/*0... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z15gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE
.globl _Z15gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE
.p2align 8
.type _Z15gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE,@function
_Z15gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE:... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0006f14a_00000000-6_gpu_rBRIEF_Loop.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $... | .text
.file "gpu_rBRIEF_Loop.hip"
.globl _Z30__device_stub__gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE # -- Begin function _Z30__device_stub__gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE
.p2align 4, 0x90
.type _Z30__device_stub__gpu_rBRIEF_LoopiP15HIP_vector_typeIfLj4EEPS_IiLj4EE,@function
_Z30__device_... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdlib.h>
#include <stdio.h>
#include <float.h>
#include <math.h>
double **malloc_matrix(int m, int n){
int i;
if (m <= 0 || n <= 0)
return NULL;
double **A = (double **)malloc(m * sizeof(double *));
if (A == NULL)
return NULL;
A[0] = (double *)malloc(m*n*sizeof(double));
if (A[0] == NULL) {
free(A);
return N... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdlib.h>
#include <stdio.h>
#include <float.h>
#include <math.h>
double **malloc_matrix(int m, int n){
int i;
if (m <= 0 || n <= 0)
return NULL;
double **A = (double **)malloc(m * sizeof(double *));
if (A == NULL)
return NULL;
A[0] = (double *)malloc(m*n*sizeof(double));
if (A[0] == NULL) {
free(A);
return N... | .file "tmpxft_00160313_00000000-6_Mallocation.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2063:
.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 <stdlib.h>
#include <stdio.h>
#include <float.h>
#include <math.h>
double **malloc_matrix(int m, int n){
int i;
if (m <= 0 || n <= 0)
return NULL;
double **A = (double **)malloc(m * sizeof(double *));
if (A == NULL)
return NULL;
A[0] = (double *)malloc(m*n*sizeof(double));
if (A[0] == NULL) {
free(A);
return N... | #include <hip/hip_runtime.h>
#include <stdlib.h>
#include <stdio.h>
#include <float.h>
#include <math.h>
double **malloc_matrix(int m, int n){
int i;
if (m <= 0 || n <= 0)
return NULL;
double **A = (double **)malloc(m * sizeof(double *));
if (A == NULL)
return NULL;
A[0] = (double *)malloc(m*n*sizeof(double));
if (A[0]... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <stdlib.h>
#include <stdio.h>
#include <float.h>
#include <math.h>
double **malloc_matrix(int m, int n){
int i;
if (m <= 0 || n <= 0)
return NULL;
double **A = (double **)malloc(m * sizeof(double *));
if (A == NULL)
return NULL;
A[0] = (double *)malloc(m*n*sizeof(double));
if (A[0]... | .text
.p2alignl 7, 3214868480
.fill 96, 4, 3214868480
.type __hip_cuid_,@object
.section .bss,"aw",@nobits
.globl __hip_cuid_
__hip_cuid_:
.byte 0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdlib.h>
#include <stdio.h>
#include <float.h>
#include <math.h>
double **malloc_matrix(int m, int n){
int i;
if (m <= 0 || n <= 0)
return NULL;
double **A = (double **)malloc(m * sizeof(double *));
if (A == NULL)
return NULL;
A[0] = (double *)malloc(m*n*sizeof(double));
if (A[0]... | .text
.file "Mallocation.hip"
.globl _Z13malloc_matrixii # -- Begin function _Z13malloc_matrixii
.p2align 4, 0x90
.type _Z13malloc_matrixii,@function
_Z13malloc_matrixii: # @_Z13malloc_matrixii
.cfi_startproc
# %bb.0:
xorl %eax, %eax
testl %edi, %edi
jle .LBB0_10
# %bb.1:
pushq %rbp
.cfi_... |
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_00160313_00000000-6_Mallocation.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2063:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %... | .text
.file "Mallocation.hip"
.globl _Z13malloc_matrixii # -- Begin function _Z13malloc_matrixii
.p2align 4, 0x90
.type _Z13malloc_matrixii,@function
_Z13malloc_matrixii: # @_Z13malloc_matrixii
.cfi_startproc
# %bb.0:
xorl %eax, %eax
testl %edi, %edi
jle .LBB0_10
# %bb.1:
pushq %rbp
.cfi_... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void vectorAdd(int *A, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < numElements)
{
A[i] = A[i] * 2;
}
} | code for sm_80
Function : _Z9vectorAddPii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R2, SR_CTAID.X ; /* 0x0000000000027919 */
/* 0x000e280000002500 */
/*0020*/... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void vectorAdd(int *A, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < numElements)
{
A[i] = A[i] * 2;
}
} | .file "tmpxft_000ed3d0_00000000-6_vectorAdd.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, %rs... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void vectorAdd(int *A, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < numElements)
{
A[i] = A[i] * 2;
}
} | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void vectorAdd(int *A, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < numElements)
{
A[i] = A[i] * 2;
}
} |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void vectorAdd(int *A, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < numElements)
{
A[i] = A[i] * 2;
}
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z9vectorAddPii
.globl _Z9vectorAddPii
.p2align 8
.type _Z9vectorAddPii,@function
_Z9vectorAddPii:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x1c
s_load_b32 s3, s[0:1], 0x8
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_alu i... |
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 vectorAdd(int *A, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < numElements)
{
A[i] = A[i] * 2;
}
} | .text
.file "vectorAdd.hip"
.globl _Z24__device_stub__vectorAddPii # -- Begin function _Z24__device_stub__vectorAddPii
.p2align 4, 0x90
.type _Z24__device_stub__vectorAddPii,@function
_Z24__device_stub__vectorAddPii: # @_Z24__device_stub__vectorAddPii
.cfi_startproc
# %bb.0:
subq $88, %rsp
.cfi_def_cfa_offset 96... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z9vectorAddPii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R2, SR_CTAID.X ; /* 0x0000000000027919 */
/* 0x000e280000002500 */
/*0020*/... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z9vectorAddPii
.globl _Z9vectorAddPii
.p2align 8
.type _Z9vectorAddPii,@function
_Z9vectorAddPii:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x1c
s_load_b32 s3, s[0:1], 0x8
s_waitcnt lgkmcnt(0)
s_and_b32 s2, s2, 0xffff
s_delay_alu i... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000ed3d0_00000000-6_vectorAdd.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, %rs... | .text
.file "vectorAdd.hip"
.globl _Z24__device_stub__vectorAddPii # -- Begin function _Z24__device_stub__vectorAddPii
.p2align 4, 0x90
.type _Z24__device_stub__vectorAddPii,@function
_Z24__device_stub__vectorAddPii: # @_Z24__device_stub__vectorAddPii
.cfi_startproc
# %bb.0:
subq $88, %rsp
.cfi_def_cfa_offset 96... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void reduce0(float *g_idata, float *g_odata, int N){
extern __shared__ float sdata[];
// each thread loads one element from global to shared mem
int tid = threadIdx.x;
int i = blockIdx.x*blockDim.x*2 + threadIdx.x;
if((i+blockDim.x)<N)
sdata[tid] = g_idata[i] + g_idata[i+blockDim.x];
el... | code for sm_80
Function : _Z7reduce0PfS_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 */
/*0020*/... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void reduce0(float *g_idata, float *g_odata, int N){
extern __shared__ float sdata[];
// each thread loads one element from global to shared mem
int tid = threadIdx.x;
int i = blockIdx.x*blockDim.x*2 + threadIdx.x;
if((i+blockDim.x)<N)
sdata[tid] = g_idata[i] + g_idata[i+blockDim.x];
el... | .file "tmpxft_00190edf_00000000-6_reduce0.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void reduce0(float *g_idata, float *g_odata, int N){
extern __shared__ float sdata[];
// each thread loads one element from global to shared mem
int tid = threadIdx.x;
int i = blockIdx.x*blockDim.x*2 + threadIdx.x;
if((i+blockDim.x)<N)
sdata[tid] = g_idata[i] + g_idata[i+blockDim.x];
el... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void reduce0(float *g_idata, float *g_odata, int N){
extern __shared__ float sdata[];
// each thread loads one element from global to shared mem
int tid = threadIdx.x;
int i = blockIdx.x*blockDim.x*2 + threadIdx.x;
if((i+blockDim.x)<N)
sdata[tid] = g_idata[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 reduce0(float *g_idata, float *g_odata, int N){
extern __shared__ float sdata[];
// each thread loads one element from global to shared mem
int tid = threadIdx.x;
int i = blockIdx.x*blockDim.x*2 + threadIdx.x;
if((i+blockDim.x)<N)
sdata[tid] = g_idata[i... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z7reduce0PfS_i
.globl _Z7reduce0PfS_i
.p2align 8
.type _Z7reduce0PfS_i,@function
_Z7reduce0PfS_i:
s_clause 0x2
s_load_b32 s3, s[0:1], 0x24
s_load_b32 s7, s[0:1], 0x10
s_load_b64 s[4:5], s[0:1], 0x0
s_mov_b32 s2, s15
s_waitcnt... |
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 reduce0(float *g_idata, float *g_odata, int N){
extern __shared__ float sdata[];
// each thread loads one element from global to shared mem
int tid = threadIdx.x;
int i = blockIdx.x*blockDim.x*2 + threadIdx.x;
if((i+blockDim.x)<N)
sdata[tid] = g_idata[i... | .text
.file "reduce0.hip"
.globl _Z22__device_stub__reduce0PfS_i # -- Begin function _Z22__device_stub__reduce0PfS_i
.p2align 4, 0x90
.type _Z22__device_stub__reduce0PfS_i,@function
_Z22__device_stub__reduce0PfS_i: # @_Z22__device_stub__reduce0PfS_i
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset 112... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z7reduce0PfS_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 */
/*0020*/... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z7reduce0PfS_i
.globl _Z7reduce0PfS_i
.p2align 8
.type _Z7reduce0PfS_i,@function
_Z7reduce0PfS_i:
s_clause 0x2
s_load_b32 s3, s[0:1], 0x24
s_load_b32 s7, s[0:1], 0x10
s_load_b64 s[4:5], s[0:1], 0x0
s_mov_b32 s2, s15
s_waitcnt... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00190edf_00000000-6_reduce0.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
... | .text
.file "reduce0.hip"
.globl _Z22__device_stub__reduce0PfS_i # -- Begin function _Z22__device_stub__reduce0PfS_i
.p2align 4, 0x90
.type _Z22__device_stub__reduce0PfS_i,@function
_Z22__device_stub__reduce0PfS_i: # @_Z22__device_stub__reduce0PfS_i
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset 112... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
// For the CUDA runtime routines (prefixed with "cuda_")
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
__global__ void vectorAdd(const float *A, const float *B, float *C, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < ... | code for sm_80
Function : _Z9schedulerPKfS0_PfiS0_S0_S1_iPKiS3_iiii
.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 */
/* 0x00... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
// For the CUDA runtime routines (prefixed with "cuda_")
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
__global__ void vectorAdd(const float *A, const float *B, float *C, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < ... | .file "tmpxft_000f58f8_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 <stdio.h>
#include <stdlib.h>
#include <math.h>
// For the CUDA runtime routines (prefixed with "cuda_")
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
__global__ void vectorAdd(const float *A, const float *B, float *C, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < ... | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
// For the CUDA runtime routines (prefixed with "cuda_")
#include <hip/hip_runtime.h>
__global__ void vectorAdd(const float *A, const float *B, float *C, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < numElements)
{
C[i] = A[i] + B[i];
... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
// For the CUDA runtime routines (prefixed with "cuda_")
#include <hip/hip_runtime.h>
__global__ void vectorAdd(const float *A, const float *B, float *C, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < numElements)
{
C[i] = A[i] + B[i];
... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z9vectorAddPKfS0_Pfi
.globl _Z9vectorAddPKfS0_Pfi
.p2align 8
.type _Z9vectorAddPKfS0_Pfi,@function
_Z9vectorAddPKfS0_Pfi:
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
... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
// For the CUDA runtime routines (prefixed with "cuda_")
#include <hip/hip_runtime.h>
__global__ void vectorAdd(const float *A, const float *B, float *C, int numElements)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < numElements)
{
C[i] = A[i] + B[i];
... | .text
.file "kernel.hip"
.globl _Z24__device_stub__vectorAddPKfS0_Pfi # -- Begin function _Z24__device_stub__vectorAddPKfS0_Pfi
.p2align 4, 0x90
.type _Z24__device_stub__vectorAddPKfS0_Pfi,@function
_Z24__device_stub__vectorAddPKfS0_Pfi: # @_Z24__device_stub__vectorAddPKfS0_Pfi
.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 : _Z9schedulerPKfS0_PfiS0_S0_S1_iPKiS3_iiii
.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 */
/* 0x00... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z9vectorAddPKfS0_Pfi
.globl _Z9vectorAddPKfS0_Pfi
.p2align 8
.type _Z9vectorAddPKfS0_Pfi,@function
_Z9vectorAddPKfS0_Pfi:
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
... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000f58f8_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 _Z24__device_stub__vectorAddPKfS0_Pfi # -- Begin function _Z24__device_stub__vectorAddPKfS0_Pfi
.p2align 4, 0x90
.type _Z24__device_stub__vectorAddPKfS0_Pfi,@function
_Z24__device_stub__vectorAddPKfS0_Pfi: # @_Z24__device_stub__vectorAddPKfS0_Pfi
.cfi_startproc
# %bb.0:
subq $120, %rsp
... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void rectified_linear_upd_kernel( const float4 * __restrict input, float4 * __restrict output, uint4 * __restrict bits_buffer, float negative_slope, int elem_count)
{
int elem_id = blockDim.x * blockIdx.x + threadIdx.x;
float4 val;
uint4 bits;
if (elem_id < elem_count)
val = input[elem_... | code for sm_80
Function : _Z27rectified_linear_upd_kernelPK6float4PS_P5uint4fi
.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 R12, SR_CTAID.X ; /* ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void rectified_linear_upd_kernel( const float4 * __restrict input, float4 * __restrict output, uint4 * __restrict bits_buffer, float negative_slope, int elem_count)
{
int elem_id = blockDim.x * blockIdx.x + threadIdx.x;
float4 val;
uint4 bits;
if (elem_id < elem_count)
val = input[elem_... | .file "tmpxft_00184ee8_00000000-6_rectified_linear_upd_kernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinar... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void rectified_linear_upd_kernel( const float4 * __restrict input, float4 * __restrict output, uint4 * __restrict bits_buffer, float negative_slope, int elem_count)
{
int elem_id = blockDim.x * blockIdx.x + threadIdx.x;
float4 val;
uint4 bits;
if (elem_id < elem_count)
val = input[elem_... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void rectified_linear_upd_kernel( const float4 * __restrict input, float4 * __restrict output, uint4 * __restrict bits_buffer, float negative_slope, int elem_count)
{
int elem_id = blockDim.x * blockIdx.x + threadIdx.x;
float4 val;
uint4 bits;
if (elem_id < ... |
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 rectified_linear_upd_kernel( const float4 * __restrict input, float4 * __restrict output, uint4 * __restrict bits_buffer, float negative_slope, int elem_count)
{
int elem_id = blockDim.x * blockIdx.x + threadIdx.x;
float4 val;
uint4 bits;
if (elem_id < ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z27rectified_linear_upd_kernelPK15HIP_vector_typeIfLj4EEPS0_PS_IjLj4EEfi
.globl _Z27rectified_linear_upd_kernelPK15HIP_vector_typeIfLj4EEPS0_PS_IjLj4EEfi
.p2align 8
.type _Z27rectified_linear_upd_kernelPK15HIP_vector_typeIfLj4EEPS0_PS_IjLj4EEfi,@function
_Z... |
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 rectified_linear_upd_kernel( const float4 * __restrict input, float4 * __restrict output, uint4 * __restrict bits_buffer, float negative_slope, int elem_count)
{
int elem_id = blockDim.x * blockIdx.x + threadIdx.x;
float4 val;
uint4 bits;
if (elem_id < ... | .text
.file "rectified_linear_upd_kernel.hip"
.globl _Z42__device_stub__rectified_linear_upd_kernelPK15HIP_vector_typeIfLj4EEPS0_PS_IjLj4EEfi # -- Begin function _Z42__device_stub__rectified_linear_upd_kernelPK15HIP_vector_typeIfLj4EEPS0_PS_IjLj4EEfi
.p2align 4, 0x90
.type _Z42__device_stub__rectified_linear_upd_kernel... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z27rectified_linear_upd_kernelPK6float4PS_P5uint4fi
.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 R12, SR_CTAID.X ; /* ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z27rectified_linear_upd_kernelPK15HIP_vector_typeIfLj4EEPS0_PS_IjLj4EEfi
.globl _Z27rectified_linear_upd_kernelPK15HIP_vector_typeIfLj4EEPS0_PS_IjLj4EEfi
.p2align 8
.type _Z27rectified_linear_upd_kernelPK15HIP_vector_typeIfLj4EEPS0_PS_IjLj4EEfi,@function
_Z... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00184ee8_00000000-6_rectified_linear_upd_kernel.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinar... | .text
.file "rectified_linear_upd_kernel.hip"
.globl _Z42__device_stub__rectified_linear_upd_kernelPK15HIP_vector_typeIfLj4EEPS0_PS_IjLj4EEfi # -- Begin function _Z42__device_stub__rectified_linear_upd_kernelPK15HIP_vector_typeIfLj4EEPS0_PS_IjLj4EEfi
.p2align 4, 0x90
.type _Z42__device_stub__rectified_linear_upd_kernel... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | // ###
// ###
// ### Practical Course: GPU Programming in Computer Vision
// ###
// ###
// ### Technical University Munich, Computer Vision Group
// ### Summer Semester 2017, September 11 - October 9
// ###
#include <cuda_runtime.h>
#include <iostream>
using namespace std;
// cuda error checking
#define CUDA_CHECK cuda... | code for sm_80
Function : _Z6squarePfi
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R0, SR_TID.X ; /* 0x0000000000007919 */
/* 0x000e280000002100 */
/*0020*/ S2R ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | // ###
// ###
// ### Practical Course: GPU Programming in Computer Vision
// ###
// ###
// ### Technical University Munich, Computer Vision Group
// ### Summer Semester 2017, September 11 - October 9
// ###
#include <cuda_runtime.h>
#include <iostream>
using namespace std;
// cuda error checking
#define CUDA_CHECK cuda... | .file "tmpxft_0003a390_00000000-6_squareArray.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3673:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cu... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | // ###
// ###
// ### Practical Course: GPU Programming in Computer Vision
// ###
// ###
// ### Technical University Munich, Computer Vision Group
// ### Summer Semester 2017, September 11 - October 9
// ###
#include <cuda_runtime.h>
#include <iostream>
using namespace std;
// cuda error checking
#define CUDA_CHECK cuda... | // ###
// ###
// ### Practical Course: GPU Programming in Computer Vision
// ###
// ###
// ### Technical University Munich, Computer Vision Group
// ### Summer Semester 2017, September 11 - October 9
// ###
#include <hip/hip_runtime.h>
#include <iostream>
using namespace std;
// cuda error checking
#define CUDA_CHECK c... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | // ###
// ###
// ### Practical Course: GPU Programming in Computer Vision
// ###
// ###
// ### Technical University Munich, Computer Vision Group
// ### Summer Semester 2017, September 11 - October 9
// ###
#include <hip/hip_runtime.h>
#include <iostream>
using namespace std;
// cuda error checking
#define CUDA_CHECK c... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6squarePfi
.globl _Z6squarePfi
.p2align 8
.type _Z6squarePfi,@function
_Z6squarePfi:
s_clause 0x1
s_load_b64 s[2:3], s[0:1], 0x1c
s_load_b32 s4, s[0:1], 0x8
v_and_b32_e32 v1, 0x3ff, v0
v_bfe_u32 v2, v0, 20, 10
v_bfe_u3... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | // ###
// ###
// ### Practical Course: GPU Programming in Computer Vision
// ###
// ###
// ### Technical University Munich, Computer Vision Group
// ### Summer Semester 2017, September 11 - October 9
// ###
#include <hip/hip_runtime.h>
#include <iostream>
using namespace std;
// cuda error checking
#define CUDA_CHECK c... | .text
.file "squareArray.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z10cuda_checkNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi # -- Begin function _Z10cud... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z6squarePfi
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R0, SR_TID.X ; /* 0x0000000000007919 */
/* 0x000e280000002100 */
/*0020*/ S2R ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6squarePfi
.globl _Z6squarePfi
.p2align 8
.type _Z6squarePfi,@function
_Z6squarePfi:
s_clause 0x1
s_load_b64 s[2:3], s[0:1], 0x1c
s_load_b32 s4, s[0:1], 0x8
v_and_b32_e32 v1, 0x3ff, v0
v_bfe_u32 v2, v0, 20, 10
v_bfe_u3... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0003a390_00000000-6_squareArray.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3673:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cu... | .text
.file "squareArray.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z10cuda_checkNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi # -- Begin function _Z10cud... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "argmax-accuracy.hh"
#include "graph.hh"
#include "ops-builder.hh"
#include "../runtime/node.hh"
#include "../memory/alloc.hh"
namespace ops
{
ArgmaxAccuracy::ArgmaxAccuracy(Op* y, Op* y_hat)
: Op("argmax_accuracy", Shape{}, {y, y_hat})
{}
void ArgmaxAccuracy::compile()
{
auto& g = Graph::instance();
auto& cy ... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "argmax-accuracy.hh"
#include "graph.hh"
#include "ops-builder.hh"
#include "../runtime/node.hh"
#include "../memory/alloc.hh"
namespace ops
{
ArgmaxAccuracy::ArgmaxAccuracy(Op* y, Op* y_hat)
: Op("argmax_accuracy", Shape{}, {y, y_hat})
{}
void ArgmaxAccuracy::compile()
{
auto& g = Graph::instance();
auto& cy ... | .file "tmpxft_00062b17_00000000-6_argmax-accuracy.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4629:
.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. | #include "argmax-accuracy.hh"
#include "graph.hh"
#include "ops-builder.hh"
#include "../runtime/node.hh"
#include "../memory/alloc.hh"
namespace ops
{
ArgmaxAccuracy::ArgmaxAccuracy(Op* y, Op* y_hat)
: Op("argmax_accuracy", Shape{}, {y, y_hat})
{}
void ArgmaxAccuracy::compile()
{
auto& g = Graph::instance();
auto& cy ... | #include <hip/hip_runtime.h>
#include "argmax-accuracy.hh"
#include "graph.hh"
#include "ops-builder.hh"
#include "../runtime/node.hh"
#include "../memory/alloc.hh"
namespace ops
{
ArgmaxAccuracy::ArgmaxAccuracy(Op* y, Op* y_hat)
: Op("argmax_accuracy", Shape{}, {y, y_hat})
{}
void ArgmaxAccuracy::compile()
{
auto& g =... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "argmax-accuracy.hh"
#include "graph.hh"
#include "ops-builder.hh"
#include "../runtime/node.hh"
#include "../memory/alloc.hh"
namespace ops
{
ArgmaxAccuracy::ArgmaxAccuracy(Op* y, Op* y_hat)
: Op("argmax_accuracy", Shape{}, {y, y_hat})
{}
void ArgmaxAccuracy::compile()
{
auto& g =... | .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 "argmax-accuracy.hh"
#include "graph.hh"
#include "ops-builder.hh"
#include "../runtime/node.hh"
#include "../memory/alloc.hh"
namespace ops
{
ArgmaxAccuracy::ArgmaxAccuracy(Op* y, Op* y_hat)
: Op("argmax_accuracy", Shape{}, {y, y_hat})
{}
void ArgmaxAccuracy::compile()
{
auto& g =... | .text
.file "argmax-accuracy.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.section .rodata.cst16,"aM",@progbits,16
.p2align 4, 0x0 # -- Begin funct... |
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_00062b17_00000000-6_argmax-accuracy.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4629:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call ... | .text
.file "argmax-accuracy.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.section .rodata.cst16,"aM",@progbits,16
.p2align 4, 0x0 # -- Begin funct... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdint.h>
#include <stdio.h>
#include <iostream>
#include <cuda_runtime.h>
#include <cooperative_groups.h>
#define CHECK(cmd) \
{\
cudaError_t error = cmd;\
if (error != cudaSuccess) { \
fprintf(stderr, "error: '%s'(%d) at %s:%d\n", cudaGetErrorString(error), error,__FILE__, __LINE__); \
exit(EXIT_FAILURE);\
... | code for sm_80
Function : _Z13vector_squarev
.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*/ S2UR UR4, SR_CTAID.X ; /* 0x00000000000479c3 */
/* 0x000e22... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdint.h>
#include <stdio.h>
#include <iostream>
#include <cuda_runtime.h>
#include <cooperative_groups.h>
#define CHECK(cmd) \
{\
cudaError_t error = cmd;\
if (error != cudaSuccess) { \
fprintf(stderr, "error: '%s'(%d) at %s:%d\n", cudaGetErrorString(error), error,__FILE__, __LINE__); \
exit(EXIT_FAILURE);\
... | .file "tmpxft_001b20b0_00000000-6_grid_size_rank.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB6869:
.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. | #include <stdint.h>
#include <stdio.h>
#include <iostream>
#include <cuda_runtime.h>
#include <cooperative_groups.h>
#define CHECK(cmd) \
{\
cudaError_t error = cmd;\
if (error != cudaSuccess) { \
fprintf(stderr, "error: '%s'(%d) at %s:%d\n", cudaGetErrorString(error), error,__FILE__, __LINE__); \
exit(EXIT_FAILURE);\
... | #include <stdint.h>
#include <stdio.h>
#include <iostream>
#include <hip/hip_runtime.h>
#include <hip/hip_cooperative_groups.h>
#define CHECK(cmd) \
{\
hipError_t error = cmd;\
if (error != hipSuccess) { \
fprintf(stderr, "error: '%s'(%d) at %s:%d\n", hipGetErrorString(error), error,__FILE__, __LINE__); \
exit(EXIT_FAI... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdint.h>
#include <stdio.h>
#include <iostream>
#include <hip/hip_runtime.h>
#include <hip/hip_cooperative_groups.h>
#define CHECK(cmd) \
{\
hipError_t error = cmd;\
if (error != hipSuccess) { \
fprintf(stderr, "error: '%s'(%d) at %s:%d\n", hipGetErrorString(error), error,__FILE__, __LINE__); \
exit(EXIT_FAI... | .text
.file "grid_size_rank.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z28__device_stub__vector_squarev # -- Begin function _Z28__device_stub__vector_squarev
.p2a... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001b20b0_00000000-6_grid_size_rank.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB6869:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call _... | .text
.file "grid_size_rank.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z28__device_stub__vector_squarev # -- Begin function _Z28__device_stub__vector_squarev
.p2a... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void add_img(float *image_padded, float *ave1, float *ave2, int nx, int ny, int nima) {
// Block index
int bx = blockIdx.x;
// Thread index
int tx = threadIdx.x;
float sum1 = 0.0;
float sum2 = 0.0;
int index = tx+bx*nx;
int index2 = tx+(nx>>1)+(bx+(ny>>1))*(nx*2+2);
for (int i=0; i<nima... | code for sm_80
Function : _Z7add_imgPfS_S_iii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e220000002500 */
/*00... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void add_img(float *image_padded, float *ave1, float *ave2, int nx, int ny, int nima) {
// Block index
int bx = blockIdx.x;
// Thread index
int tx = threadIdx.x;
float sum1 = 0.0;
float sum2 = 0.0;
int index = tx+bx*nx;
int index2 = tx+(nx>>1)+(bx+(ny>>1))*(nx*2+2);
for (int i=0; i<nima... | .file "tmpxft_0017de56_00000000-6_add_img.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void add_img(float *image_padded, float *ave1, float *ave2, int nx, int ny, int nima) {
// Block index
int bx = blockIdx.x;
// Thread index
int tx = threadIdx.x;
float sum1 = 0.0;
float sum2 = 0.0;
int index = tx+bx*nx;
int index2 = tx+(nx>>1)+(bx+(ny>>1))*(nx*2+2);
for (int i=0; i<nima... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void add_img(float *image_padded, float *ave1, float *ave2, int nx, int ny, int nima) {
// Block index
int bx = blockIdx.x;
// Thread index
int tx = threadIdx.x;
float sum1 = 0.0;
float sum2 = 0.0;
int index = tx+bx*nx;
int index2 = tx+(nx>>1)+(bx+(ny>>1))*(... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void add_img(float *image_padded, float *ave1, float *ave2, int nx, int ny, int nima) {
// Block index
int bx = blockIdx.x;
// Thread index
int tx = threadIdx.x;
float sum1 = 0.0;
float sum2 = 0.0;
int index = tx+bx*nx;
int index2 = tx+(nx>>1)+(bx+(ny>>1))*(... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z7add_imgPfS_S_iii
.globl _Z7add_imgPfS_S_iii
.p2align 8
.type _Z7add_imgPfS_S_iii,@function
_Z7add_imgPfS_S_iii:
s_clause 0x2
s_load_b64 s[2:3], s[0:1], 0x18
s_load_b32 s6, s[0:1], 0x20
s_load_b64 s[4:5], s[0:1], 0x0
s_waitcnt lgkmc... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void add_img(float *image_padded, float *ave1, float *ave2, int nx, int ny, int nima) {
// Block index
int bx = blockIdx.x;
// Thread index
int tx = threadIdx.x;
float sum1 = 0.0;
float sum2 = 0.0;
int index = tx+bx*nx;
int index2 = tx+(nx>>1)+(bx+(ny>>1))*(... | .text
.file "add_img.hip"
.globl _Z22__device_stub__add_imgPfS_S_iii # -- Begin function _Z22__device_stub__add_imgPfS_S_iii
.p2align 4, 0x90
.type _Z22__device_stub__add_imgPfS_S_iii,@function
_Z22__device_stub__add_imgPfS_S_iii: # @_Z22__device_stub__add_imgPfS_S_iii
.cfi_startproc
# %bb.0:
subq $152, %rsp
.cfi_de... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0017de56_00000000-6_add_img.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
... | .text
.file "add_img.hip"
.globl _Z22__device_stub__add_imgPfS_S_iii # -- Begin function _Z22__device_stub__add_imgPfS_S_iii
.p2align 4, 0x90
.type _Z22__device_stub__add_imgPfS_S_iii,@function
_Z22__device_stub__add_imgPfS_S_iii: # @_Z22__device_stub__add_imgPfS_S_iii
.cfi_startproc
# %bb.0:
subq $152, %rsp
.cfi_de... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__device__ unsigned int getGid3d3d(){
int blockId = blockIdx.x + blockIdx.y * gridDim.x
+ gridDim.x * gridDim.y * blockIdx.z;
int threadId = blockId * (blockDim.x * blockDim.y * blockDim.z)
+ (threadIdx.y * blockDim.x)
+ (threadIdx.z * (blockDim.x * blockDim.y)) + threadIdx.x;
return threadId;
}
_... | code for sm_80
Function : _Z7l2_normPdS_S_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.Y ; /* 0x0000000000007919 */
/* 0x000e220000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__device__ unsigned int getGid3d3d(){
int blockId = blockIdx.x + blockIdx.y * gridDim.x
+ gridDim.x * gridDim.y * blockIdx.z;
int threadId = blockId * (blockDim.x * blockDim.y * blockDim.z)
+ (threadIdx.y * blockDim.x)
+ (threadIdx.z * (blockDim.x * blockDim.y)) + threadIdx.x;
return threadId;
}
_... | .file "tmpxft_000c21f9_00000000-6_l2_norm.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2030:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__device__ unsigned int getGid3d3d(){
int blockId = blockIdx.x + blockIdx.y * gridDim.x
+ gridDim.x * gridDim.y * blockIdx.z;
int threadId = blockId * (blockDim.x * blockDim.y * blockDim.z)
+ (threadIdx.y * blockDim.x)
+ (threadIdx.z * (blockDim.x * blockDim.y)) + threadIdx.x;
return threadId;
}
_... | #include <hip/hip_runtime.h>
#include "includes.h"
__device__ unsigned int getGid3d3d(){
int blockId = blockIdx.x + blockIdx.y * gridDim.x
+ gridDim.x * gridDim.y * blockIdx.z;
int threadId = blockId * (blockDim.x * blockDim.y * blockDim.z)
+ (threadIdx.y * blockDim.x)
+ (threadIdx.z * (blockDim.x * blockDim.y)) + thre... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__device__ unsigned int getGid3d3d(){
int blockId = blockIdx.x + blockIdx.y * gridDim.x
+ gridDim.x * gridDim.y * blockIdx.z;
int threadId = blockId * (blockDim.x * blockDim.y * blockDim.z)
+ (threadIdx.y * blockDim.x)
+ (threadIdx.z * (blockDim.x * blockDim.y)) + thre... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z7l2_normPdS_S_
.globl _Z7l2_normPdS_S_
.p2align 8
.type _Z7l2_normPdS_S_,@function
_Z7l2_normPdS_S_:
s_load_b256 s[4:11], s[0:1], 0x0
s_add_u32 s2, s0, 24
s_addc_u32 s3, s1, 0
s_load_b64 s[0:1], s[0:1], 0x24
s_waitcnt lgkmcnt(... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__device__ unsigned int getGid3d3d(){
int blockId = blockIdx.x + blockIdx.y * gridDim.x
+ gridDim.x * gridDim.y * blockIdx.z;
int threadId = blockId * (blockDim.x * blockDim.y * blockDim.z)
+ (threadIdx.y * blockDim.x)
+ (threadIdx.z * (blockDim.x * blockDim.y)) + thre... | .text
.file "l2_norm.hip"
.globl _Z22__device_stub__l2_normPdS_S_ # -- Begin function _Z22__device_stub__l2_normPdS_S_
.p2align 4, 0x90
.type _Z22__device_stub__l2_normPdS_S_,@function
_Z22__device_stub__l2_normPdS_S_: # @_Z22__device_stub__l2_normPdS_S_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z7l2_normPdS_S_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.Y ; /* 0x0000000000007919 */
/* 0x000e220000... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z7l2_normPdS_S_
.globl _Z7l2_normPdS_S_
.p2align 8
.type _Z7l2_normPdS_S_,@function
_Z7l2_normPdS_S_:
s_load_b256 s[4:11], s[0:1], 0x0
s_add_u32 s2, s0, 24
s_addc_u32 s3, s1, 0
s_load_b64 s[0:1], s[0:1], 0x24
s_waitcnt lgkmcnt(... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000c21f9_00000000-6_l2_norm.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2030:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
... | .text
.file "l2_norm.hip"
.globl _Z22__device_stub__l2_normPdS_S_ # -- Begin function _Z22__device_stub__l2_normPdS_S_
.p2align 4, 0x90
.type _Z22__device_stub__l2_normPdS_S_,@function
_Z22__device_stub__l2_normPdS_S_: # @_Z22__device_stub__l2_normPdS_S_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_offset... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include<stdio.h>
#include<stdlib.h>
__global__ void print_gpu(void) {
printf("Houston, we have a problem in section [%d,%d] \
From Apollo 13\n", threadIdx.x,blockIdx.x);
}
int main(void) {
printf("This is Houston. Say again, please. \
From Base\n");
print_gpu<<<2,2>>>();
cudaDeviceSynchronize();
return 0;
} | code for sm_80
Function : _Z9print_gpuv
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fc800078e00ff */
/*0010*/ S2R R9, SR_CTAID.X ; /* 0x0000000000097919 */
/* 0x000e220000002... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include<stdio.h>
#include<stdlib.h>
__global__ void print_gpu(void) {
printf("Houston, we have a problem in section [%d,%d] \
From Apollo 13\n", threadIdx.x,blockIdx.x);
}
int main(void) {
printf("This is Houston. Say again, please. \
From Base\n");
print_gpu<<<2,2>>>();
cudaDeviceSynchronize();
return 0;
} | .file "tmpxft_0011f001_00000000-6_hello_houston.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>
#include<stdlib.h>
__global__ void print_gpu(void) {
printf("Houston, we have a problem in section [%d,%d] \
From Apollo 13\n", threadIdx.x,blockIdx.x);
}
int main(void) {
printf("This is Houston. Say again, please. \
From Base\n");
print_gpu<<<2,2>>>();
cudaDeviceSynchronize();
return 0;
} | #include <hip/hip_runtime.h>
#include<stdio.h>
#include<stdlib.h>
__global__ void print_gpu(void) {
printf("Houston, we have a problem in section [%d,%d] \
From Apollo 13\n", threadIdx.x,blockIdx.x);
}
int main(void) {
printf("This is Houston. Say again, please. \
From Base\n");
print_gpu<<<2,2>>>();
hipDeviceSynchroni... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.