system stringclasses 7
values | input stringlengths 10 94.5k | output stringlengths 14 55.5k |
|---|---|---|
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
__global__
void
helloKernel(){
if(threadIdx.x & 1 > 0){ //odd thread
printf("Hello world, from odd thread %d\n", threadIdx.x);
}else{
printf("Hello world, from even thread %d\n", threadIdx.x);
}
}
int
main(int argc, char* argv[]){
dim3 grid(1,1);
dim3 block(20,1);
helloKe... | .text
.file "printf.hip"
.globl _Z26__device_stub__helloKernelv # -- Begin function _Z26__device_stub__helloKernelv
.p2align 4, 0x90
.type _Z26__device_stub__helloKernelv,@function
_Z26__device_stub__helloKernelv: # @_Z26__device_stub__helloKernelv
.cfi_startproc
# %bb.0:
subq $56, %rsp
.cfi_def_cfa_offset 64
le... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0001f639_00000000-6_printf.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 "printf.hip"
.globl _Z26__device_stub__helloKernelv # -- Begin function _Z26__device_stub__helloKernelv
.p2align 4, 0x90
.type _Z26__device_stub__helloKernelv,@function
_Z26__device_stub__helloKernelv: # @_Z26__device_stub__helloKernelv
.cfi_startproc
# %bb.0:
subq $56, %rsp
.cfi_def_cfa_offset 64
le... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdlib.h>
#include <stdio.h>
#include <cuda_runtime.h>
#include <cuda.h>
#include <time.h>
#include <math.h>
#define BLOCKSIZE 32
#define DEBUG 0
// Error code to check return values for CUDA calls
cudaError_t err = cudaSuccess;
// Print the matrix
void print(float *matrix, int n, int m)
{
for(int i = 0; i < ... | .file "tmpxft_000cf306_00000000-6_matrix.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2066:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdlib.h>
#include <stdio.h>
#include <cuda_runtime.h>
#include <cuda.h>
#include <time.h>
#include <math.h>
#define BLOCKSIZE 32
#define DEBUG 0
// Error code to check return values for CUDA calls
cudaError_t err = cudaSuccess;
// Print the matrix
void print(float *matrix, int n, int m)
{
for(int i = 0; i < ... | #include <stdlib.h>
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <time.h>
#include <math.h>
#define BLOCKSIZE 32
#define DEBUG 0
// Error code to check return values for CUDA calls
hipError_t err = hipSuccess;
// Print the matrix
void print(float *matrix, int n, int m)
{
for(int i = 0; i < n; ++i)
{
for(int... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdlib.h>
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <time.h>
#include <math.h>
#define BLOCKSIZE 32
#define DEBUG 0
// Error code to check return values for CUDA calls
hipError_t err = hipSuccess;
// Print the matrix
void print(float *matrix, int n, int m)
{
for(int i = 0; i < n; ++i)
{
for(int... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z21mulMatrixThreadKernelPKfS0_Pfiii
.globl _Z21mulMatrixThreadKernelPKfS0_Pfiii
.p2align 8
.type _Z21mulMatrixThreadKernelPKfS0_Pfiii,@function
_Z21mulMatrixThreadKernelPKfS0_Pfiii:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x34
s_load_b32 s4, s[0:1], 0x18
s_l... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdlib.h>
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <time.h>
#include <math.h>
#define BLOCKSIZE 32
#define DEBUG 0
// Error code to check return values for CUDA calls
hipError_t err = hipSuccess;
// Print the matrix
void print(float *matrix, int n, int m)
{
for(int i = 0; i < n; ++i)
{
for(int... | .text
.file "matrix.hip"
.globl _Z5printPfii # -- Begin function _Z5printPfii
.p2align 4, 0x90
.type _Z5printPfii,@function
_Z5printPfii: # @_Z5printPfii
.cfi_startproc
# %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
pushq %r15
.cfi_def_cfa_offset 24
pushq %r14
.cfi_def_cfa_offse... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <cmath>
#include "SamplingPoint.cuh"
#include "CUDAHelper.cuh"
SamplingPoint::SamplingPoint(const SamplingPoint &other) : _x(other._x), _y(other._y), _i (other._i),
_s(other._s), _t(other._t), _fo(other._fo), _kernelSize(other._kernelSize), _kernel(nullptr), d_kernel(nullptr) {
if (other._kernel != nullptr) {
... | code for sm_80
Function : _ZN3cub17CUB_200700_800_NS11EmptyKernelIvEEvv
.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 */
/* 0x000fea000380... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <cmath>
#include "SamplingPoint.cuh"
#include "CUDAHelper.cuh"
SamplingPoint::SamplingPoint(const SamplingPoint &other) : _x(other._x), _y(other._y), _i (other._i),
_s(other._s), _t(other._t), _fo(other._fo), _kernelSize(other._kernelSize), _kernel(nullptr), d_kernel(nullptr) {
if (other._kernel != nullptr) {
... | #ifndef SAMPLINGPOINT_H
#define SAMPLINGPOINT_H
#include <hip/hip_runtime.h>
#include <vector>
class SamplingPoint {
public:
SamplingPoint() :_x(0), _y(0), _i(0), _s(0), _t(0), _fo(0), _kernelSize(0), _kernel(nullptr), d_kernel(nullptr) {}
SamplingPoint(float x, float y, int i, int s, int t, int fo, int kernelSize)
: _... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #ifndef SAMPLINGPOINT_H
#define SAMPLINGPOINT_H
#include <hip/hip_runtime.h>
#include <vector>
class SamplingPoint {
public:
SamplingPoint() :_x(0), _y(0), _i(0), _s(0), _t(0), _fo(0), _kernelSize(0), _kernel(nullptr), d_kernel(nullptr) {}
SamplingPoint(float x, float y, int i, int s, int t, int fo, int kernelSize)
: _... | .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 SAMPLINGPOINT_H
#define SAMPLINGPOINT_H
#include <hip/hip_runtime.h>
#include <vector>
class SamplingPoint {
public:
SamplingPoint() :_x(0), _y(0), _i(0), _s(0), _t(0), _fo(0), _kernelSize(0), _kernel(nullptr), d_kernel(nullptr) {}
SamplingPoint(float x, float y, int i, int s, int t, int fo, int kernelSize)
: _... | .text
.file "SamplingPoint.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-pr... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _ZN3cub17CUB_200700_800_NS11EmptyKernelIvEEvv
.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 */
/* 0x000fea000380... | .text
.p2alignl 7, 3214868480
.fill 96, 4, 3214868480
.type __hip_cuid_,@object
.section .bss,"aw",@nobits
.globl __hip_cuid_
__hip_cuid_:
.byte 0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | // ***********************************************************************
//
// Demo program for education in subject
// Computer Architectures and Paralel Systems
// Petr Olivka, dep. of Computer Science, FEI, VSB-TU Ostrava
// email:petr.olivka@vsb.cz
//
// Example of CUDA Technology Usage
// Multiplication of eleme... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | // ***********************************************************************
//
// Demo program for education in subject
// Computer Architectures and Paralel Systems
// Petr Olivka, dep. of Computer Science, FEI, VSB-TU Ostrava
// email:petr.olivka@vsb.cz
//
// Example of CUDA Technology Usage
// Multiplication of eleme... | .file "tmpxft_0011a134_00000000-6_main.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | // ***********************************************************************
//
// Demo program for education in subject
// Computer Architectures and Paralel Systems
// Petr Olivka, dep. of Computer Science, FEI, VSB-TU Ostrava
// email:petr.olivka@vsb.cz
//
// Example of CUDA Technology Usage
// Multiplication of eleme... | // ***********************************************************************
//
// Demo program for education in subject
// Computer Architectures and Paralel Systems
// Petr Olivka, dep. of Computer Science, FEI, VSB-TU Ostrava
// email:petr.olivka@vsb.cz
//
// Example of CUDA Technology Usage
// Multiplication of eleme... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | // ***********************************************************************
//
// Demo program for education in subject
// Computer Architectures and Paralel Systems
// Petr Olivka, dep. of Computer Science, FEI, VSB-TU Ostrava
// email:petr.olivka@vsb.cz
//
// Example of CUDA Technology Usage
// Multiplication of eleme... | .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. | // ***********************************************************************
//
// Demo program for education in subject
// Computer Architectures and Paralel Systems
// Petr Olivka, dep. of Computer Science, FEI, VSB-TU Ostrava
// email:petr.olivka@vsb.cz
//
// Example of CUDA Technology Usage
// Multiplication of eleme... | .text
.file "main.hip"
.section .rodata.cst4,"aM",@progbits,4
.p2align 2, 0x0 # -- Begin function main
.LCPI0_0:
.long 0x4048f5c3 # float 3.1400001
.text
.globl main
.p2align 4, 0x90
.type main,@function
main: # @main
.cfi_startproc
# %bb.0... |
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_0011a134_00000000-6_main.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... | .text
.file "main.hip"
.section .rodata.cst4,"aM",@progbits,4
.p2align 2, 0x0 # -- Begin function main
.LCPI0_0:
.long 0x4048f5c3 # float 3.1400001
.text
.globl main
.p2align 4, 0x90
.type main,@function
main: # @main
.cfi_startproc
# %bb.0... |
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>
static __device__ __forceinline__ unsigned int bfind32_cuda(unsigned int x)
{
unsigned int ret;
asm volatile("bfind.u32 %0, %1;" : "=r"(ret) : "r"(x));
return 31 - ret;
}
__device__ __host__ unsigned int nlz32_IEEE(unsigned int x)
{
/* H... | code for sm_80
Function : _Z8prefscanPii
.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_TID.X ; /* 0x0000000000047919 */
/* 0x000e220000002100 */
/*0020*/ UL... |
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>
static __device__ __forceinline__ unsigned int bfind32_cuda(unsigned int x)
{
unsigned int ret;
asm volatile("bfind.u32 %0, %1;" : "=r"(ret) : "r"(x));
return 31 - ret;
}
__device__ __host__ unsigned int nlz32_IEEE(unsigned int x)
{
/* H... | .file "tmpxft_00105d1b_00000000-6_main.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2064:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... |
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>
static __device__ __forceinline__ unsigned int bfind32_cuda(unsigned int x)
{
unsigned int ret;
asm volatile("bfind.u32 %0, %1;" : "=r"(ret) : "r"(x));
return 31 - ret;
}
__device__ __host__ unsigned int nlz32_IEEE(unsigned int x)
{
/* H... | #include "hip/hip_runtime.h"
#include <stdio.h>
static __device__ __forceinline__ unsigned int bfind32_cuda(unsigned int x)
{
unsigned int ret;
asm volatile("bfind.u32 %0, %1;" : "=r"(ret) : "r"(x));
return 31 - ret;
}
__device__ __host__ unsigned int nlz32_IEEE(unsigned int x)
{
/* Hacker's Delight 2nd by H. S. Warren... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include "hip/hip_runtime.h"
#include <stdio.h>
static __device__ __forceinline__ unsigned int bfind32_cuda(unsigned int x)
{
unsigned int ret;
asm volatile("bfind.u32 %0, %1;" : "=r"(ret) : "r"(x));
return 31 - ret;
}
__device__ __host__ unsigned int nlz32_IEEE(unsigned int x)
{
/* Hacker's Delight 2nd by H. S. Warren... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z8prefscanPii
.globl _Z8prefscanPii
.p2align 8
.type _Z8prefscanPii,@function
_Z8prefscanPii:
s_load_b32 s2, s[0:1], 0x8
s_mov_b32 s3, exec_lo
s_waitcnt lgkmcnt(0)
s_ashr_i32 s2, s2, 1
s_delay_alu instid0(SALU_CYCLE_1)
v_cm... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include "hip/hip_runtime.h"
#include <stdio.h>
static __device__ __forceinline__ unsigned int bfind32_cuda(unsigned int x)
{
unsigned int ret;
asm volatile("bfind.u32 %0, %1;" : "=r"(ret) : "r"(x));
return 31 - ret;
}
__device__ __host__ unsigned int nlz32_IEEE(unsigned int x)
{
/* Hacker's Delight 2nd by H. S. Warren... | .text
.file "main.hip"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function _Z10nlz32_IEEEj
.LCPI0_0:
.quad 0x3fe0000000000000 # double 0.5
.text
.globl _Z10nlz32_IEEEj
.p2align 4, 0x90
.type _Z10nlz32_IEEEj,@function
_Z10nlz32_IEEEj: # ... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z8prefscanPii
.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_TID.X ; /* 0x0000000000047919 */
/* 0x000e220000002100 */
/*0020*/ UL... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z8prefscanPii
.globl _Z8prefscanPii
.p2align 8
.type _Z8prefscanPii,@function
_Z8prefscanPii:
s_load_b32 s2, s[0:1], 0x8
s_mov_b32 s3, exec_lo
s_waitcnt lgkmcnt(0)
s_ashr_i32 s2, s2, 1
s_delay_alu instid0(SALU_CYCLE_1)
v_cm... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00105d1b_00000000-6_main.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2064:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.cf... | .text
.file "main.hip"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function _Z10nlz32_IEEEj
.LCPI0_0:
.quad 0x3fe0000000000000 # double 0.5
.text
.globl _Z10nlz32_IEEEj
.p2align 4, 0x90
.type _Z10nlz32_IEEEj,@function
_Z10nlz32_IEEEj: # ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void matrixMult(int* m,int* n, int* p, int size)
{
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[col*size+i];
}
p[row*size+col]=p_sum;
} | code for sm_80
Function : _Z10matrixMultPiS_S_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R7, SR_CTAID.Y ; /* 0x0000000000077919 */
/* 0x000e220000002600 */
/*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void matrixMult(int* m,int* n, int* p, int size)
{
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[col*size+i];
}
p[row*size+col]=p_sum;
} | .file "tmpxft_00196565_00000000-6_matrixMult.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %r... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void matrixMult(int* m,int* n, int* p, int size)
{
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[col*size+i];
}
p[row*size+col]=p_sum;
} | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void matrixMult(int* m,int* n, int* p, int size)
{
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[col*size+i];
}
p[row*size+col]=p_sum;
} |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void matrixMult(int* m,int* n, int* p, int size)
{
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[col*size+i];
}
p[row*size+col]=p_sum;
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10matrixMultPiS_S_i
.globl _Z10matrixMultPiS_S_i
.p2align 8
.type _Z10matrixMultPiS_S_i,@function
_Z10matrixMultPiS_S_i:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x2c
s_load_b32 s2, s[0:1], 0x18
v_bfe_u32 v2, v0, 10, 10
v_and_b32_e32 v3, 0x3... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void matrixMult(int* m,int* n, int* p, int size)
{
int row=blockIdx.y*blockDim.y+threadIdx.y;
int col=blockIdx.x*blockDim.x+threadIdx.x;
int p_sum;
for(int i=0;i<size;i++){
p_sum += m[row*size+i] * n[col*size+i];
}
p[row*size+col]=p_sum;
} | .text
.file "matrixMult.hip"
.globl _Z25__device_stub__matrixMultPiS_S_i # -- Begin function _Z25__device_stub__matrixMultPiS_S_i
.p2align 4, 0x90
.type _Z25__device_stub__matrixMultPiS_S_i,@function
_Z25__device_stub__matrixMultPiS_S_i: # @_Z25__device_stub__matrixMultPiS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z10matrixMultPiS_S_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R7, SR_CTAID.Y ; /* 0x0000000000077919 */
/* 0x000e220000002600 */
/*... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10matrixMultPiS_S_i
.globl _Z10matrixMultPiS_S_i
.p2align 8
.type _Z10matrixMultPiS_S_i,@function
_Z10matrixMultPiS_S_i:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x2c
s_load_b32 s2, s[0:1], 0x18
v_bfe_u32 v2, v0, 10, 10
v_and_b32_e32 v3, 0x3... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00196565_00000000-6_matrixMult.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %r... | .text
.file "matrixMult.hip"
.globl _Z25__device_stub__matrixMultPiS_S_i # -- Begin function _Z25__device_stub__matrixMultPiS_S_i
.p2align 4, 0x90
.type _Z25__device_stub__matrixMultPiS_S_i,@function
_Z25__device_stub__matrixMultPiS_S_i: # @_Z25__device_stub__matrixMultPiS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <cuda.h>
#include <cuda_runtime.h>
void checkErrors(cudaError_t err, const char *msg) {
if (err != cudaSuccess) {
fprintf(stderr, msg);
fprintf(stderr,
" [Erro CUDA: %s]\n",
cudaGetErrorString(err));
exit(-1);
}
}
void compareResults(float *C1, float *C2, int numElements) {
float epsilon = 0... | code for sm_80
Function : _Z6vecAddPfS_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_CTAID.X ; /* 0x0000000000067919 */
/* 0x000e280000002500 */
/*0020*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <cuda.h>
#include <cuda_runtime.h>
void checkErrors(cudaError_t err, const char *msg) {
if (err != cudaSuccess) {
fprintf(stderr, msg);
fprintf(stderr,
" [Erro CUDA: %s]\n",
cudaGetErrorString(err));
exit(-1);
}
}
void compareResults(float *C1, float *C2, int numElements) {
float epsilon = 0... | .file "tmpxft_0002af40_00000000-6_vecAdd.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, %rsp
.... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <cuda.h>
#include <cuda_runtime.h>
void checkErrors(cudaError_t err, const char *msg) {
if (err != cudaSuccess) {
fprintf(stderr, msg);
fprintf(stderr,
" [Erro CUDA: %s]\n",
cudaGetErrorString(err));
exit(-1);
}
}
void compareResults(float *C1, float *C2, int numElements) {
float epsilon = 0... | #include <stdio.h>
#include <hip/hip_runtime.h>
void checkErrors(hipError_t err, const char *msg) {
if (err != hipSuccess) {
fprintf(stderr, msg);
fprintf(stderr,
" [Erro CUDA: %s]\n",
hipGetErrorString(err));
exit(-1);
}
}
void compareResults(float *C1, float *C2, int numElements) {
float epsilon = 0.00001;
for(int i ... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdio.h>
#include <hip/hip_runtime.h>
void checkErrors(hipError_t err, const char *msg) {
if (err != hipSuccess) {
fprintf(stderr, msg);
fprintf(stderr,
" [Erro CUDA: %s]\n",
hipGetErrorString(err));
exit(-1);
}
}
void compareResults(float *C1, float *C2, int numElements) {
float epsilon = 0.00001;
for(int i ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6vecAddPfS_S_i
.globl _Z6vecAddPfS_S_i
.p2align 8
.type _Z6vecAddPfS_S_i,@function
_Z6vecAddPfS_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_al... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdio.h>
#include <hip/hip_runtime.h>
void checkErrors(hipError_t err, const char *msg) {
if (err != hipSuccess) {
fprintf(stderr, msg);
fprintf(stderr,
" [Erro CUDA: %s]\n",
hipGetErrorString(err));
exit(-1);
}
}
void compareResults(float *C1, float *C2, int numElements) {
float epsilon = 0.00001;
for(int i ... | .text
.file "vecAdd.hip"
.globl _Z11checkErrors10hipError_tPKc # -- Begin function _Z11checkErrors10hipError_tPKc
.p2align 4, 0x90
.type _Z11checkErrors10hipError_tPKc,@function
_Z11checkErrors10hipError_tPKc: # @_Z11checkErrors10hipError_tPKc
.cfi_startproc
# %bb.0:
testl %edi, %edi
jne .LBB0_2
# %bb.1:
retq
... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z6vecAddPfS_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_CTAID.X ; /* 0x0000000000067919 */
/* 0x000e280000002500 */
/*0020*... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6vecAddPfS_S_i
.globl _Z6vecAddPfS_S_i
.p2align 8
.type _Z6vecAddPfS_S_i,@function
_Z6vecAddPfS_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_al... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0002af40_00000000-6_vecAdd.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, %rsp
.... | .text
.file "vecAdd.hip"
.globl _Z11checkErrors10hipError_tPKc # -- Begin function _Z11checkErrors10hipError_tPKc
.p2align 4, 0x90
.type _Z11checkErrors10hipError_tPKc,@function
_Z11checkErrors10hipError_tPKc: # @_Z11checkErrors10hipError_tPKc
.cfi_startproc
# %bb.0:
testl %edi, %edi
jne .LBB0_2
# %bb.1:
retq
... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <iostream>
#include "../ginkgo/GOrder.h"
#include "../include/lglist.h"
#include <thrust/device_vector.h>
#define def_dvec(t) thrust::device_vector<t>
using namespace std;
const int MAX_LENGTH = 20;
typedef gpu_ginkgo::Order gorder;
__device__ void printList(gpu_linearized_stl::list<gpu_ginkgo::Order, MAX_LENG... | #include <hip/hip_runtime.h>
#include <iostream>
#include "../ginkgo/GOrder.h"
#include "../include/lglist.h"
#include <thrust/device_vector.h>
#define def_dvec(t) thrust::device_vector<t>
using namespace std;
const int MAX_LENGTH = 20;
typedef gpu_ginkgo::Order gorder;
__device__ void printList(gpu_linearized_stl::lis... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | __device__ int createArgbColor(int iter, int maxIter)
{
int color = (255.0*iter)/maxIter;
return(255<<24) | (color<<16) | (color<<8) | color;
} | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | __device__ int createArgbColor(int iter, int maxIter)
{
int color = (255.0*iter)/maxIter;
return(255<<24) | (color<<16) | (color<<8) | color;
} | .file "tmpxft_0011872b_00000000-6_createArgbColor.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 $... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | __device__ int createArgbColor(int iter, int maxIter)
{
int color = (255.0*iter)/maxIter;
return(255<<24) | (color<<16) | (color<<8) | color;
} | #include <hip/hip_runtime.h>
__device__ int createArgbColor(int iter, int maxIter)
{
int color = (255.0*iter)/maxIter;
return(255<<24) | (color<<16) | (color<<8) | color;
} |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
__device__ int createArgbColor(int iter, int maxIter)
{
int color = (255.0*iter)/maxIter;
return(255<<24) | (color<<16) | (color<<8) | color;
} | .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>
__device__ int createArgbColor(int iter, int maxIter)
{
int color = (255.0*iter)/maxIter;
return(255<<24) | (color<<16) | (color<<8) | color;
} | .text
.file "createArgbColor.hip"
.type __hip_cuid_,@object # @__hip_cuid_
.bss
.globl __hip_cuid_
__hip_cuid_:
.byte 0 # 0x0
.size __hip_cuid_, 1
.section ".linker-options","e",@llvm_linker_options
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-... |
You are a helpful coding assistant specialized in converting from CUDA 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_0011872b_00000000-6_createArgbColor.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 $... | .text
.file "createArgbColor.hip"
.type __hip_cuid_,@object # @__hip_cuid_
.bss
.globl __hip_cuid_
__hip_cuid_:
.byte 0 # 0x0
.size __hip_cuid_, 1
.section ".linker-options","e",@llvm_linker_options
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void cu_fliplr(const float* src, float* dst, const int rows, const int cols, const int n){
int tid = threadIdx.x + blockIdx.x * blockDim.x;
int stride = blockDim.x * gridDim.x;
while(tid < n){
int c = tid % cols;
int r = tid / cols;
dst[tid] = src[(cols - c - 1) + r * cols];
tid += stri... | code for sm_80
Function : _Z9cu_fliplrPKfPfiii
.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_CTAID.X ; /* 0x0000000000037919 */
/* 0x000e28... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void cu_fliplr(const float* src, float* dst, const int rows, const int cols, const int n){
int tid = threadIdx.x + blockIdx.x * blockDim.x;
int stride = blockDim.x * gridDim.x;
while(tid < n){
int c = tid % cols;
int r = tid / cols;
dst[tid] = src[(cols - c - 1) + r * cols];
tid += stri... | .file "tmpxft_000a98ad_00000000-6_cu_fliplr.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 cu_fliplr(const float* src, float* dst, const int rows, const int cols, const int n){
int tid = threadIdx.x + blockIdx.x * blockDim.x;
int stride = blockDim.x * gridDim.x;
while(tid < n){
int c = tid % cols;
int r = tid / cols;
dst[tid] = src[(cols - c - 1) + r * cols];
tid += stri... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void cu_fliplr(const float* src, float* dst, const int rows, const int cols, const int n){
int tid = threadIdx.x + blockIdx.x * blockDim.x;
int stride = blockDim.x * gridDim.x;
while(tid < n){
int c = tid % cols;
int r = tid / cols;
dst[tid] = src[(cols - c ... |
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 cu_fliplr(const float* src, float* dst, const int rows, const int cols, const int n){
int tid = threadIdx.x + blockIdx.x * blockDim.x;
int stride = blockDim.x * gridDim.x;
while(tid < n){
int c = tid % cols;
int r = tid / cols;
dst[tid] = src[(cols - c ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z9cu_fliplrPKfPfiii
.globl _Z9cu_fliplrPKfPfiii
.p2align 8
.type _Z9cu_fliplrPKfPfiii,@function
_Z9cu_fliplrPKfPfiii:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x2c
s_load_b32 s8, s[0:1], 0x18
s_add_u32 s2, s0, 32
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"
__global__ void cu_fliplr(const float* src, float* dst, const int rows, const int cols, const int n){
int tid = threadIdx.x + blockIdx.x * blockDim.x;
int stride = blockDim.x * gridDim.x;
while(tid < n){
int c = tid % cols;
int r = tid / cols;
dst[tid] = src[(cols - c ... | .text
.file "cu_fliplr.hip"
.globl _Z24__device_stub__cu_fliplrPKfPfiii # -- Begin function _Z24__device_stub__cu_fliplrPKfPfiii
.p2align 4, 0x90
.type _Z24__device_stub__cu_fliplrPKfPfiii,@function
_Z24__device_stub__cu_fliplrPKfPfiii: # @_Z24__device_stub__cu_fliplrPKfPfiii
.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 : _Z9cu_fliplrPKfPfiii
.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_CTAID.X ; /* 0x0000000000037919 */
/* 0x000e28... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z9cu_fliplrPKfPfiii
.globl _Z9cu_fliplrPKfPfiii
.p2align 8
.type _Z9cu_fliplrPKfPfiii,@function
_Z9cu_fliplrPKfPfiii:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x2c
s_load_b32 s8, s[0:1], 0x18
s_add_u32 s2, s0, 32
s_addc_u32 s3, s1, 0
s_wait... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000a98ad_00000000-6_cu_fliplr.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 "cu_fliplr.hip"
.globl _Z24__device_stub__cu_fliplrPKfPfiii # -- Begin function _Z24__device_stub__cu_fliplrPKfPfiii
.p2align 4, 0x90
.type _Z24__device_stub__cu_fliplrPKfPfiii,@function
_Z24__device_stub__cu_fliplrPKfPfiii: # @_Z24__device_stub__cu_fliplrPKfPfiii
.cfi_startproc
# %bb.0:
subq $120, %rsp
.... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #define EPS 0.00001
__device__ float distance(const float2 f1, const float2 f2)
{
float2 v;
v.x = f2.x - f1.x;
v.y = f2.y - f1.y;
return sqrt(v.x * v.x + v.y * v.y);
}
__device__ float distance_f2_f(const float2 f1, const float f2_x, const float f2_y)
{
float2 v;
v.x = f2_x - f1.x;
v.y = f2_y - f1.y;
return sqrt(v.x * ... | .file "tmpxft_0009fcbf_00000000-6_optimize_rigid_2d_gpu.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2035:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #define EPS 0.00001
__device__ float distance(const float2 f1, const float2 f2)
{
float2 v;
v.x = f2.x - f1.x;
v.y = f2.y - f1.y;
return sqrt(v.x * v.x + v.y * v.y);
}
__device__ float distance_f2_f(const float2 f1, const float f2_x, const float f2_y)
{
float2 v;
v.x = f2_x - f1.x;
v.y = f2_y - f1.y;
return sqrt(v.x * ... | #include <hip/hip_runtime.h>
#define EPS 0.00001
__device__ float distance(const float2 f1, const float2 f2)
{
float2 v;
v.x = f2.x - f1.x;
v.y = f2.y - f1.y;
return sqrt(v.x * v.x + v.y * v.y);
}
__device__ float distance_f2_f(const float2 f1, const float f2_x, const float f2_y)
{
float2 v;
v.x = f2_x - f1.x;
v.y = f2... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#define EPS 0.00001
__device__ float distance(const float2 f1, const float2 f2)
{
float2 v;
v.x = f2.x - f1.x;
v.y = f2.y - f1.y;
return sqrt(v.x * v.x + v.y * v.y);
}
__device__ float distance_f2_f(const float2 f1, const float f2_x, const float f2_y)
{
float2 v;
v.x = f2_x - f1.x;
v.y = f2... | .text
.file "optimize_rigid_2d_gpu.hip"
.globl _Z33__device_stub__compute_cost_huberPK15HIP_vector_typeIfLj2EES2_iPKS_IfLj3EEPKiS7_fPf # -- Begin function _Z33__device_stub__compute_cost_huberPK15HIP_vector_typeIfLj2EES2_iPKS_IfLj3EEPKiS7_fPf
.p2align 4, 0x90
.type _Z33__device_stub__compute_cost_huberPK15HIP_vector_ty... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0009fcbf_00000000-6_optimize_rigid_2d_gpu.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2035:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
... | .text
.file "optimize_rigid_2d_gpu.hip"
.globl _Z33__device_stub__compute_cost_huberPK15HIP_vector_typeIfLj2EES2_iPKS_IfLj3EEPKiS7_fPf # -- Begin function _Z33__device_stub__compute_cost_huberPK15HIP_vector_typeIfLj2EES2_iPKS_IfLj3EEPKiS7_fPf
.p2align 4, 0x90
.type _Z33__device_stub__compute_cost_huberPK15HIP_vector_ty... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
using namespace std;
#define nsamples 250000
#define threadsPerBlock 500
#define num_blocks 500
// function to count samples in circle using cpu
__global__ void count_samples_GPU(float *d_X, float *d_Y, int *d_countInBlocks, int num_block, int samples)
{
__shared__ int shared_blocks[500]; // share... | .file "tmpxft_000d03ec_00000000-6_count_samples_GPU.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"
using namespace std;
#define nsamples 250000
#define threadsPerBlock 500
#define num_blocks 500
// function to count samples in circle using cpu
__global__ void count_samples_GPU(float *d_X, float *d_Y, int *d_countInBlocks, int num_block, int samples)
{
__shared__ int shared_blocks[500]; // share... | #include <hip/hip_runtime.h>
#include "includes.h"
using namespace std;
#define nsamples 250000
#define threadsPerBlock 500
#define num_blocks 500
// function to count samples in circle using cpu
__global__ void count_samples_GPU(float *d_X, float *d_Y, int *d_countInBlocks, int num_block, int samples)
{
__shared__ 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"
using namespace std;
#define nsamples 250000
#define threadsPerBlock 500
#define num_blocks 500
// function to count samples in circle using cpu
__global__ void count_samples_GPU(float *d_X, float *d_Y, int *d_countInBlocks, int num_block, int samples)
{
__shared__ int... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z17count_samples_GPUPfS_Piii
.globl _Z17count_samples_GPUPfS_Piii
.p2align 8
.type _Z17count_samples_GPUPfS_Piii,@function
_Z17count_samples_GPUPfS_Piii:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s9, s[0:1], 0x1c
s_mov_b32 s8, s15
v_mov_... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
using namespace std;
#define nsamples 250000
#define threadsPerBlock 500
#define num_blocks 500
// function to count samples in circle using cpu
__global__ void count_samples_GPU(float *d_X, float *d_Y, int *d_countInBlocks, int num_block, int samples)
{
__shared__ int... | .text
.file "count_samples_GPU.hip"
.globl _Z32__device_stub__count_samples_GPUPfS_Piii # -- Begin function _Z32__device_stub__count_samples_GPUPfS_Piii
.p2align 4, 0x90
.type _Z32__device_stub__count_samples_GPUPfS_Piii,@function
_Z32__device_stub__count_samples_GPUPfS_Piii: # @_Z32__device_stub__count_samples_GPUPfS_... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000d03ec_00000000-6_count_samples_GPU.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 "count_samples_GPU.hip"
.globl _Z32__device_stub__count_samples_GPUPfS_Piii # -- Begin function _Z32__device_stub__count_samples_GPUPfS_Piii
.p2align 4, 0x90
.type _Z32__device_stub__count_samples_GPUPfS_Piii,@function
_Z32__device_stub__count_samples_GPUPfS_Piii: # @_Z32__device_stub__count_samples_GPUPfS_... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <bitset>
#include <iomanip>
#include <ios>
#include <iostream>
#include <sstream>
#include <string>
std::string get_UUID_as_String(const cudaUUID_t& uuid){
std::stringstream result;
result << "GPU-";
size_t cnt = 0;
for(auto& c: uuid.bytes) {
std::bitset<8> bits(c);
if(cnt == 4 || cnt == 6 || cnt == 8 || cnt =... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <bitset>
#include <iomanip>
#include <ios>
#include <iostream>
#include <sstream>
#include <string>
std::string get_UUID_as_String(const cudaUUID_t& uuid){
std::stringstream result;
result << "GPU-";
size_t cnt = 0;
for(auto& c: uuid.bytes) {
std::bitset<8> bits(c);
if(cnt == 4 || cnt == 6 || cnt == 8 || cnt =... | .file "tmpxft_00106ae8_00000000-6_GPUInformation.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4115:
.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 <bitset>
#include <iomanip>
#include <ios>
#include <iostream>
#include <sstream>
#include <string>
std::string get_UUID_as_String(const cudaUUID_t& uuid){
std::stringstream result;
result << "GPU-";
size_t cnt = 0;
for(auto& c: uuid.bytes) {
std::bitset<8> bits(c);
if(cnt == 4 || cnt == 6 || cnt == 8 || cnt =... | #include <hip/hip_runtime.h>
#include <bitset>
#include <iomanip>
#include <ios>
#include <iostream>
#include <sstream>
#include <string>
std::string get_UUID_as_String(const hipUUID& uuid){
std::stringstream result;
result << "GPU-";
size_t cnt = 0;
for(auto& c: uuid.bytes) {
std::bitset<8> bits(c);
if(cnt == 4 || cnt... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <bitset>
#include <iomanip>
#include <ios>
#include <iostream>
#include <sstream>
#include <string>
std::string get_UUID_as_String(const hipUUID& uuid){
std::stringstream result;
result << "GPU-";
size_t cnt = 0;
for(auto& c: uuid.bytes) {
std::bitset<8> bits(c);
if(cnt == 4 || cnt... | .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 <bitset>
#include <iomanip>
#include <ios>
#include <iostream>
#include <sstream>
#include <string>
std::string get_UUID_as_String(const hipUUID& uuid){
std::stringstream result;
result << "GPU-";
size_t cnt = 0;
for(auto& c: uuid.bytes) {
std::bitset<8> bits(c);
if(cnt == 4 || cnt... | .text
.file "GPUInformation.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z18get_UUID_as_StringB5cxx11RK9hipUUID_t # -- Begin function _Z18get_UUID_as_StringB5cxx11R... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80 | .text
.p2alignl 7, 3214868480
.fill 96, 4, 3214868480
.type __hip_cuid_,@object
.section .bss,"aw",@nobits
.globl __hip_cuid_
__hip_cuid_:
.byte 0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "cuda.h"
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
//__global__ void dynamic_parallelism_check(int size, int depth)
//{
// printf(" Depth : %d - tid : %d \n", depth, threadIdx.x);
//
// if (size == 1)
// return;
//
// if (threadIdx.... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "cuda.h"
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
//__global__ void dynamic_parallelism_check(int size, int depth)
//{
// printf(" Depth : %d - tid : %d \n", depth, threadIdx.x);
//
// if (size == 1)
// return;
//
// if (threadIdx.... | .file "tmpxft_001822a4_00000000-6_14_dynamic_parallelism.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2059:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "cuda.h"
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
//__global__ void dynamic_parallelism_check(int size, int depth)
//{
// printf(" Depth : %d - tid : %d \n", depth, threadIdx.x);
//
// if (size == 1)
// return;
//
// if (threadIdx.... | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "hip/hip_runtime.h"
//__global__ void dynamic_parallelism_check(int size, int depth)
//{
// printf(" Depth : %d - tid : %d \n", depth, threadIdx.x);
//
// if (size == 1)
// return;
//
// if (threadIdx.x == 0)
// {
// dynamic_parallelism_check << <1, size... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "hip/hip_runtime.h"
//__global__ void dynamic_parallelism_check(int size, int depth)
//{
// printf(" Depth : %d - tid : %d \n", depth, threadIdx.x);
//
// if (size == 1)
// return;
//
// if (threadIdx.x == 0)
// {
// dynamic_parallelism_check << <1, size... | .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 <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "hip/hip_runtime.h"
//__global__ void dynamic_parallelism_check(int size, int depth)
//{
// printf(" Depth : %d - tid : %d \n", depth, threadIdx.x);
//
// if (size == 1)
// return;
//
// if (threadIdx.x == 0)
// {
// dynamic_parallelism_check << <1, size... | .text
.file "14_dynamic_parallelism.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/RadeonOpenComput... |
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_001822a4_00000000-6_14_dynamic_parallelism.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2059:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT... | .text
.file "14_dynamic_parallelism.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/RadeonOpenComput... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | //Calculate prime numbers within a certain range provided by the user, or use default
//values of 0-1000
#include <iostream>
#include <cstdint> //required for uint64_t
#include <sstream> //convert runtime params into uint64 using istringstream
#include <ctime>
#include <chrono>
#include <cstdlib>
#include <cuda_runtime... | code for sm_80 |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | //Calculate prime numbers within a certain range provided by the user, or use default
//values of 0-1000
#include <iostream>
#include <cstdint> //required for uint64_t
#include <sstream> //convert runtime params into uint64 using istringstream
#include <ctime>
#include <chrono>
#include <cstdlib>
#include <cuda_runtime... | .file "tmpxft_00001892_00000000-6_a2.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3841:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregis... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | //Calculate prime numbers within a certain range provided by the user, or use default
//values of 0-1000
#include <iostream>
#include <cstdint> //required for uint64_t
#include <sstream> //convert runtime params into uint64 using istringstream
#include <ctime>
#include <chrono>
#include <cstdlib>
#include <cuda_runtime... | //Calculate prime numbers within a certain range provided by the user, or use default
//values of 0-1000
#include <iostream>
#include <cstdint> //required for uint64_t
#include <sstream> //convert runtime params into uint64 using istringstream
#include <ctime>
#include <chrono>
#include <cstdlib>
#include <hip/hip_runt... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | //Calculate prime numbers within a certain range provided by the user, or use default
//values of 0-1000
#include <iostream>
#include <cstdint> //required for uint64_t
#include <sstream> //convert runtime params into uint64 using istringstream
#include <ctime>
#include <chrono>
#include <cstdlib>
#include <hip/hip_runt... | .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. | //Calculate prime numbers within a certain range provided by the user, or use default
//values of 0-1000
#include <iostream>
#include <cstdint> //required for uint64_t
#include <sstream> //convert runtime params into uint64 using istringstream
#include <ctime>
#include <chrono>
#include <cstdlib>
#include <hip/hip_runt... | .text
.file "a2.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z10reportTimePKcNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE # -- Begin function _Z10reportTimePK... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80 | .text
.p2alignl 7, 3214868480
.fill 96, 4, 3214868480
.type __hip_cuid_,@object
.section .bss,"aw",@nobits
.globl __hip_cuid_
__hip_cuid_:
.byte 0
.size __hip_cuid_, 1
.ident "AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "device_launch_parameters.h"
#include <iostream>
#include <stdio.h>
#include <cuda_runtime.h>
#include <time.h>
using namespace std;
#define eps 1e-4
// 2d grid 2d block
__global__ void matadd(const float *a, const float *b, float *c, int n, int m){
int i = blockDim.x * blockIdx.x + threadIdx.x;
int j = blockD... | .file "tmpxft_00001b7e_00000000-6_add.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 __cudaUnregi... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "device_launch_parameters.h"
#include <iostream>
#include <stdio.h>
#include <cuda_runtime.h>
#include <time.h>
using namespace std;
#define eps 1e-4
// 2d grid 2d block
__global__ void matadd(const float *a, const float *b, float *c, int n, int m){
int i = blockDim.x * blockIdx.x + threadIdx.x;
int j = blockD... | #include <iostream>
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <time.h>
using namespace std;
#define eps 1e-4
// 2d grid 2d block
__global__ void matadd(const float *a, const float *b, float *c, int n, int m){
int i = blockDim.x * blockIdx.x + threadIdx.x;
int j = blockDim.y * blockIdx.y + threadIdx.y;
in... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <iostream>
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <time.h>
using namespace std;
#define eps 1e-4
// 2d grid 2d block
__global__ void matadd(const float *a, const float *b, float *c, int n, int m){
int i = blockDim.x * blockIdx.x + threadIdx.x;
int j = blockDim.y * blockIdx.y + threadIdx.y;
in... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6mataddPKfS0_Pfii
.globl _Z6mataddPKfS0_Pfii
.p2align 8
.type _Z6mataddPKfS0_Pfii,@function
_Z6mataddPKfS0_Pfii:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b64 s[4:5], s[0:1], 0x18
v_and_b32_e32 v2, 0x3ff, v0
v_bfe_u32 v3, v0, ... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <iostream>
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <time.h>
using namespace std;
#define eps 1e-4
// 2d grid 2d block
__global__ void matadd(const float *a, const float *b, float *c, int n, int m){
int i = blockDim.x * blockIdx.x + threadIdx.x;
int j = blockDim.y * blockIdx.y + threadIdx.y;
in... | .text
.file "add.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z21__device_stub__mataddPKfS0_Pfii # -- Begin function _Z21__device_stub__mataddPKfS0_Pfii
.p2align 4,... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00001b7e_00000000-6_add.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 __cudaUnregi... | .text
.file "add.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z21__device_stub__mataddPKfS0_Pfii # -- Begin function _Z21__device_stub__mataddPKfS0_Pfii
.p2align 4,... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | /* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and ... | /* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <cmath>
__global__ void mylog2(double* value)
{
value[threadIdx.x] = std::log2(value[threadIdx.x]);
} | code for sm_80
Function : _Z6mylog2Pd
.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_TID.X ; /* 0x0000000000027919 */
/* 0x000e220000002100 ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <cmath>
__global__ void mylog2(double* value)
{
value[threadIdx.x] = std::log2(value[threadIdx.x]);
} | .file "tmpxft_001141e5_00000000-6_log2.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. | #include <cmath>
__global__ void mylog2(double* value)
{
value[threadIdx.x] = std::log2(value[threadIdx.x]);
} | #include <hip/hip_runtime.h>
#include <cmath>
__global__ void mylog2(double* value)
{
value[threadIdx.x] = std::log2(value[threadIdx.x]);
} |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <cmath>
__global__ void mylog2(double* value)
{
value[threadIdx.x] = std::log2(value[threadIdx.x]);
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6mylog2Pd
.globl _Z6mylog2Pd
.p2align 8
.type _Z6mylog2Pd,@function
_Z6mylog2Pd:
s_load_b64 s[0:1], s[0:1], 0x0
v_lshlrev_b32_e32 v16, 3, v0
s_mov_b32 s3, 0x3fe55555
s_mov_b32 s2, 0x55555555
s_mov_b32 s5, 0x3fc38538
... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <cmath>
__global__ void mylog2(double* value)
{
value[threadIdx.x] = std::log2(value[threadIdx.x]);
} | .text
.file "log2.hip"
.globl _Z21__device_stub__mylog2Pd # -- Begin function _Z21__device_stub__mylog2Pd
.p2align 4, 0x90
.type _Z21__device_stub__mylog2Pd,@function
_Z21__device_stub__mylog2Pd: # @_Z21__device_stub__mylog2Pd
.cfi_startproc
# %bb.0:
subq $72, %rsp
.cfi_def_cfa_offset 80
movq %rdi, 64(%r... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z6mylog2Pd
.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_TID.X ; /* 0x0000000000027919 */
/* 0x000e220000002100 ... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6mylog2Pd
.globl _Z6mylog2Pd
.p2align 8
.type _Z6mylog2Pd,@function
_Z6mylog2Pd:
s_load_b64 s[0:1], s[0:1], 0x0
v_lshlrev_b32_e32 v16, 3, v0
s_mov_b32 s3, 0x3fe55555
s_mov_b32 s2, 0x55555555
s_mov_b32 s5, 0x3fc38538
... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_001141e5_00000000-6_log2.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 "log2.hip"
.globl _Z21__device_stub__mylog2Pd # -- Begin function _Z21__device_stub__mylog2Pd
.p2align 4, 0x90
.type _Z21__device_stub__mylog2Pd,@function
_Z21__device_stub__mylog2Pd: # @_Z21__device_stub__mylog2Pd
.cfi_startproc
# %bb.0:
subq $72, %rsp
.cfi_def_cfa_offset 80
movq %rdi, 64(%r... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | /* Copyright (c) 1993-2015, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions... | code for sm_80
Function : _Z6KernelP11DataElement
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ IMAD.MOV.U32 R16, RZ, RZ, c[0x0][0x160] ; /* 0x0000580... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /* Copyright (c) 1993-2015, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions... | .file "tmpxft_00091969_00000000-6_dataElem_um.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | /* Copyright (c) 1993-2015, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions... | /* Copyright (c) 1993-2015, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | /* Copyright (c) 1993-2015, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions... | .text
.file "dataElem_um.hip"
.globl _Z21__device_stub__KernelP11DataElement # -- Begin function _Z21__device_stub__KernelP11DataElement
.p2align 4, 0x90
.type _Z21__device_stub__KernelP11DataElement,@function
_Z21__device_stub__KernelP11DataElement: # @_Z21__device_stub__KernelP11DataElement
.cfi_startproc
# %bb.0:
su... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00091969_00000000-6_dataElem_um.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2061:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %... | .text
.file "dataElem_um.hip"
.globl _Z21__device_stub__KernelP11DataElement # -- Begin function _Z21__device_stub__KernelP11DataElement
.p2align 4, 0x90
.type _Z21__device_stub__KernelP11DataElement,@function
_Z21__device_stub__KernelP11DataElement: # @_Z21__device_stub__KernelP11DataElement
.cfi_startproc
# %bb.0:
su... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.