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 device assembly. | #include <hip/hip_runtime.h>
#include <iostream>
#include <math.h>
// Kernel function to add the elements of two arrays
__global__
void add(int n, float *x, float *y)
{
int index = threadIdx.x;
int stride = blockDim.x; // how big is one thread
for (int i = index; i < n; i += stride)
y[i] = x[i] + y[i];
}
int main(void)... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3addiPfS_
.globl _Z3addiPfS_
.p2align 8
.type _Z3addiPfS_,@function
_Z3addiPfS_:
s_load_b32 s2, s[0:1], 0x0
s_mov_b32 s3, exec_lo
s_waitcnt lgkmcnt(0)
v_cmpx_gt_i32_e64 s2, v0
s_cbranch_execz .LBB0_3
s_clause 0x1
s_l... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <iostream>
#include <math.h>
// Kernel function to add the elements of two arrays
__global__
void add(int n, float *x, float *y)
{
int index = threadIdx.x;
int stride = blockDim.x; // how big is one thread
for (int i = index; i < n; i += stride)
y[i] = x[i] + y[i];
}
int main(void)... | .text
.file "parallel_add.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, 0x... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z3addiPfS_
.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 */
/* 0x000e240000002100 */
/*0020*/ ISETP... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3addiPfS_
.globl _Z3addiPfS_
.p2align 8
.type _Z3addiPfS_,@function
_Z3addiPfS_:
s_load_b32 s2, s[0:1], 0x0
s_mov_b32 s3, exec_lo
s_waitcnt lgkmcnt(0)
v_cmpx_gt_i32_e64 s2, v0
s_cbranch_execz .LBB0_3
s_clause 0x1
s_l... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0009f81c_00000000-6_parallel_add.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3672:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __c... | .text
.file "parallel_add.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, 0x... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <cuda.h>
#include <cuda_runtime.h>
#include <random>
#include <iostream>
#include <stdio.h>
#include <vector_types.h>
#define L 2048
#define M 2048
#define N 2048
using copy4_t = int4;
constexpr int l = L;
constexpr int m = M;
constexpr int n = N;
//constexpr int SHMEM_SIZE = 2 >> 14; // 32kB
constexpr int tbp... | #include <hip/hip_runtime.h>
#include <random>
#include <iostream>
#include <stdio.h>
#include <hip/hip_vector_types.h>
#define L 2048
#define M 2048
#define N 2048
using copy4_t = int4;
constexpr int l = L;
constexpr int m = M;
constexpr int n = N;
//constexpr int SHMEM_SIZE = 2 >> 14; // 32kB
constexpr int tbp = 512;... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <random>
#include <iostream>
#include <stdio.h>
#include <hip/hip_vector_types.h>
#define L 2048
#define M 2048
#define N 2048
using copy4_t = int4;
constexpr int l = L;
constexpr int m = M;
constexpr int n = N;
//constexpr int SHMEM_SIZE = 2 >> 14; // 32kB
constexpr int tbp = 512;... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z19matrixMultiplyNaivePfS_S_iii
.globl _Z19matrixMultiplyNaivePfS_S_iii
.p2align 8
.type _Z19matrixMultiplyNaivePfS_S_iii,@function
_Z19matrixMultiplyNaivePfS_S_iii:
s_load_b64 s[2:3], s[0:1], 0x1c
v_lshl_add_u32 v0, s15, 9, v0
s_waitcnt lgkmcnt(0)
v... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void SumSymbolsKernel( float *symbolOne, float *symbolTwo, float *result, int symbolSize )
{
int threadId = blockDim.x*blockIdx.y*gridDim.x //rows preceeding current row in grid
+ blockDim.x*blockIdx.x //blocks preceeding current block
+ threadIdx.x;
if(threadId < symbolSize)
{
result[t... | code for sm_80
Function : _Z16SumSymbolsKernelPfS_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 R0, SR_CTAID.Y ; /* 0x0000000000007919 */
/* 0x000e280000002600... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void SumSymbolsKernel( float *symbolOne, float *symbolTwo, float *result, int symbolSize )
{
int threadId = blockDim.x*blockIdx.y*gridDim.x //rows preceeding current row in grid
+ blockDim.x*blockIdx.x //blocks preceeding current block
+ threadIdx.x;
if(threadId < symbolSize)
{
result[t... | .file "tmpxft_00002ce2_00000000-6_SumSymbolsKernel.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 SumSymbolsKernel( float *symbolOne, float *symbolTwo, float *result, int symbolSize )
{
int threadId = blockDim.x*blockIdx.y*gridDim.x //rows preceeding current row in grid
+ blockDim.x*blockIdx.x //blocks preceeding current block
+ threadIdx.x;
if(threadId < symbolSize)
{
result[t... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void SumSymbolsKernel( float *symbolOne, float *symbolTwo, float *result, int symbolSize )
{
int threadId = blockDim.x*blockIdx.y*gridDim.x //rows preceeding current row in grid
+ blockDim.x*blockIdx.x //blocks preceeding current block
+ threadIdx.x;
if(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"
__global__ void SumSymbolsKernel( float *symbolOne, float *symbolTwo, float *result, int symbolSize )
{
int threadId = blockDim.x*blockIdx.y*gridDim.x //rows preceeding current row in grid
+ blockDim.x*blockIdx.x //blocks preceeding current block
+ threadIdx.x;
if(thre... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z16SumSymbolsKernelPfS_S_i
.globl _Z16SumSymbolsKernelPfS_S_i
.p2align 8
.type _Z16SumSymbolsKernelPfS_S_i,@function
_Z16SumSymbolsKernelPfS_S_i:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x20
s_load_b32 s3, s[0:1], 0x2c
s_load_b32 s4, s[0:1], 0x18
s_... |
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 SumSymbolsKernel( float *symbolOne, float *symbolTwo, float *result, int symbolSize )
{
int threadId = blockDim.x*blockIdx.y*gridDim.x //rows preceeding current row in grid
+ blockDim.x*blockIdx.x //blocks preceeding current block
+ threadIdx.x;
if(thre... | .text
.file "SumSymbolsKernel.hip"
.globl _Z31__device_stub__SumSymbolsKernelPfS_S_i # -- Begin function _Z31__device_stub__SumSymbolsKernelPfS_S_i
.p2align 4, 0x90
.type _Z31__device_stub__SumSymbolsKernelPfS_S_i,@function
_Z31__device_stub__SumSymbolsKernelPfS_S_i: # @_Z31__device_stub__SumSymbolsKernelPfS_S_i
.cfi_s... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z16SumSymbolsKernelPfS_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 R0, SR_CTAID.Y ; /* 0x0000000000007919 */
/* 0x000e280000002600... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z16SumSymbolsKernelPfS_S_i
.globl _Z16SumSymbolsKernelPfS_S_i
.p2align 8
.type _Z16SumSymbolsKernelPfS_S_i,@function
_Z16SumSymbolsKernelPfS_S_i:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x20
s_load_b32 s3, s[0:1], 0x2c
s_load_b32 s4, s[0:1], 0x18
s_... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00002ce2_00000000-6_SumSymbolsKernel.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 "SumSymbolsKernel.hip"
.globl _Z31__device_stub__SumSymbolsKernelPfS_S_i # -- Begin function _Z31__device_stub__SumSymbolsKernelPfS_S_i
.p2align 4, 0x90
.type _Z31__device_stub__SumSymbolsKernelPfS_S_i,@function
_Z31__device_stub__SumSymbolsKernelPfS_S_i: # @_Z31__device_stub__SumSymbolsKernelPfS_S_i
.cfi_s... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
// #pragma once
using namespace std;
#define NUM_THREADS_PER_BLOCK 512
int* create_shifts (char* pattern);
int linear_horspool_match (char* text, char* pattern, int* shift_table, unsigned int* num_matches, int chunk_size,
int num_chunks, int text_size, int pat_len, int myId);
/*
* Driver function
... | code for sm_80
Function : _Z14horspool_matchPcS_PiPjiiii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
// #pragma once
using namespace std;
#define NUM_THREADS_PER_BLOCK 512
int* create_shifts (char* pattern);
int linear_horspool_match (char* text, char* pattern, int* shift_table, unsigned int* num_matches, int chunk_size,
int num_chunks, int text_size, int pat_len, int myId);
/*
* Driver function
... | .file "tmpxft_000b667c_00000000-6_horspool_match.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
// #pragma once
using namespace std;
#define NUM_THREADS_PER_BLOCK 512
int* create_shifts (char* pattern);
int linear_horspool_match (char* text, char* pattern, int* shift_table, unsigned int* num_matches, int chunk_size,
int num_chunks, int text_size, int pat_len, int myId);
/*
* Driver function
... | #include <hip/hip_runtime.h>
#include "includes.h"
// #pragma once
using namespace std;
#define NUM_THREADS_PER_BLOCK 512
int* create_shifts (char* pattern);
int linear_horspool_match (char* text, char* pattern, int* shift_table, unsigned int* num_matches, int chunk_size,
int num_chunks, int text_size, int pat_len, 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"
// #pragma once
using namespace std;
#define NUM_THREADS_PER_BLOCK 512
int* create_shifts (char* pattern);
int linear_horspool_match (char* text, char* pattern, int* shift_table, unsigned int* num_matches, int chunk_size,
int num_chunks, int text_size, int pat_len, int... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z14horspool_matchPcS_PiPjiiii
.globl _Z14horspool_matchPcS_PiPjiiii
.p2align 8
.type _Z14horspool_matchPcS_PiPjiiii,@function
_Z14horspool_matchPcS_PiPjiiii:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x3c
s_load_b32 s3, s[0:1], 0x24
s_waitcnt lgkmcnt(0)
... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
// #pragma once
using namespace std;
#define NUM_THREADS_PER_BLOCK 512
int* create_shifts (char* pattern);
int linear_horspool_match (char* text, char* pattern, int* shift_table, unsigned int* num_matches, int chunk_size,
int num_chunks, int text_size, int pat_len, int... | .text
.file "horspool_match.hip"
.globl _Z29__device_stub__horspool_matchPcS_PiPjiiii # -- Begin function _Z29__device_stub__horspool_matchPcS_PiPjiiii
.p2align 4, 0x90
.type _Z29__device_stub__horspool_matchPcS_PiPjiiii,@function
_Z29__device_stub__horspool_matchPcS_PiPjiiii: # @_Z29__device_stub__horspool_matchPcS_Pi... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z14horspool_matchPcS_PiPjiiii
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z14horspool_matchPcS_PiPjiiii
.globl _Z14horspool_matchPcS_PiPjiiii
.p2align 8
.type _Z14horspool_matchPcS_PiPjiiii,@function
_Z14horspool_matchPcS_PiPjiiii:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x3c
s_load_b32 s3, s[0:1], 0x24
s_waitcnt lgkmcnt(0)
... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000b667c_00000000-6_horspool_match.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8... | .text
.file "horspool_match.hip"
.globl _Z29__device_stub__horspool_matchPcS_PiPjiiii # -- Begin function _Z29__device_stub__horspool_matchPcS_PiPjiiii
.p2align 4, 0x90
.type _Z29__device_stub__horspool_matchPcS_PiPjiiii,@function
_Z29__device_stub__horspool_matchPcS_PiPjiiii: # @_Z29__device_stub__horspool_matchPcS_Pi... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include<iostream>
using namespace std;
#define THREADS_PER_BLOCK 256
__global__ void mean_per_block(int *a_d,int *b_d,int n){
int block = blockDim.x*blockIdx.x;
int mean=0,sum=0;
for(int i=block;i<min(block+blockDim.x,n);i++){
sum+=a_d[i];
}
b_d[blockIdx.x]=sum/blockDim.x;
}
int main() {
int n;
cout<<"Enter the no o... | code for sm_80
Function : _Z14mean_per_blockPiS_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include<iostream>
using namespace std;
#define THREADS_PER_BLOCK 256
__global__ void mean_per_block(int *a_d,int *b_d,int n){
int block = blockDim.x*blockIdx.x;
int mean=0,sum=0;
for(int i=block;i<min(block+blockDim.x,n);i++){
sum+=a_d[i];
}
b_d[blockIdx.x]=sum/blockDim.x;
}
int main() {
int n;
cout<<"Enter the no o... | .file "tmpxft_00186aa5_00000000-6_3.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 __cudaUnregist... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include<iostream>
using namespace std;
#define THREADS_PER_BLOCK 256
__global__ void mean_per_block(int *a_d,int *b_d,int n){
int block = blockDim.x*blockIdx.x;
int mean=0,sum=0;
for(int i=block;i<min(block+blockDim.x,n);i++){
sum+=a_d[i];
}
b_d[blockIdx.x]=sum/blockDim.x;
}
int main() {
int n;
cout<<"Enter the no o... | #include <hip/hip_runtime.h>
#include<iostream>
using namespace std;
#define THREADS_PER_BLOCK 256
__global__ void mean_per_block(int *a_d,int *b_d,int n){
int block = blockDim.x*blockIdx.x;
int mean=0,sum=0;
for(int i=block;i<min(block+blockDim.x,n);i++){
sum+=a_d[i];
}
b_d[blockIdx.x]=sum/blockDim.x;
}
int main() {... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include<iostream>
using namespace std;
#define THREADS_PER_BLOCK 256
__global__ void mean_per_block(int *a_d,int *b_d,int n){
int block = blockDim.x*blockIdx.x;
int mean=0,sum=0;
for(int i=block;i<min(block+blockDim.x,n);i++){
sum+=a_d[i];
}
b_d[blockIdx.x]=sum/blockDim.x;
}
int main() {... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z14mean_per_blockPiS_i
.globl _Z14mean_per_blockPiS_i
.p2align 8
.type _Z14mean_per_blockPiS_i,@function
_Z14mean_per_blockPiS_i:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x24
s_load_b32 s4, s[0:1], 0x10
s_mov_b32 s2, s15
s_mov_b32 s7, 0
s_waitcn... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include<iostream>
using namespace std;
#define THREADS_PER_BLOCK 256
__global__ void mean_per_block(int *a_d,int *b_d,int n){
int block = blockDim.x*blockIdx.x;
int mean=0,sum=0;
for(int i=block;i<min(block+blockDim.x,n);i++){
sum+=a_d[i];
}
b_d[blockIdx.x]=sum/blockDim.x;
}
int main() {... | .text
.file "3.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z29__device_stub__mean_per_blockPiS_i # -- Begin function _Z29__device_stub__mean_per_blockPiS_i
.p2alig... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z14mean_per_blockPiS_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z14mean_per_blockPiS_i
.globl _Z14mean_per_blockPiS_i
.p2align 8
.type _Z14mean_per_blockPiS_i,@function
_Z14mean_per_blockPiS_i:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x24
s_load_b32 s4, s[0:1], 0x10
s_mov_b32 s2, s15
s_mov_b32 s7, 0
s_waitcn... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00186aa5_00000000-6_3.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 __cudaUnregist... | .text
.file "3.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z29__device_stub__mean_per_blockPiS_i # -- Begin function _Z29__device_stub__mean_per_blockPiS_i
.p2alig... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void __radixcounts(float *a, int n, int digit, unsigned int *bi) {
__shared__ unsigned int ic[RNDVALS];
int istart = (int)(((long long)blockIdx.x) * n / gridDim.x);
int iend = (int)(((long long)(blockIdx.x+1)) * n / gridDim.x);
int tid = threadIdx.x;
int bibase = RNDVALS * (blockIdx.x +... | code for sm_80
Function : _Z13__radixcountsPfiiPj
.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 */
/* 0x000fc600078e00ff */
/*0010*/ S2R R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void __radixcounts(float *a, int n, int digit, unsigned int *bi) {
__shared__ unsigned int ic[RNDVALS];
int istart = (int)(((long long)blockIdx.x) * n / gridDim.x);
int iend = (int)(((long long)(blockIdx.x+1)) * n / gridDim.x);
int tid = threadIdx.x;
int bibase = RNDVALS * (blockIdx.x +... | .file "tmpxft_00032007_00000000-6___radixcounts.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8,... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void __radixcounts(float *a, int n, int digit, unsigned int *bi) {
__shared__ unsigned int ic[RNDVALS];
int istart = (int)(((long long)blockIdx.x) * n / gridDim.x);
int iend = (int)(((long long)(blockIdx.x+1)) * n / gridDim.x);
int tid = threadIdx.x;
int bibase = RNDVALS * (blockIdx.x +... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void __radixcounts(float *a, int n, int digit, unsigned int *bi) {
__shared__ unsigned int ic[RNDVALS];
int istart = (int)(((long long)blockIdx.x) * n / gridDim.x);
int iend = (int)(((long long)(blockIdx.x+1)) * n / gridDim.x);
int tid = threadIdx.x;
int bib... |
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 __radixcounts(float *a, int n, int digit, unsigned int *bi) {
__shared__ unsigned int ic[RNDVALS];
int istart = (int)(((long long)blockIdx.x) * n / gridDim.x);
int iend = (int)(((long long)(blockIdx.x+1)) * n / gridDim.x);
int tid = threadIdx.x;
int bib... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z13__radixcountsPfiiPj
.globl _Z13__radixcountsPfiiPj
.p2align 8
.type _Z13__radixcountsPfiiPj,@function
_Z13__radixcountsPfiiPj:
s_clause 0x1
s_load_b32 s10, s[2:3], 0x8
s_load_b32 s8, s[2:3], 0x18
s_mov_b32 s9, 0
s_delay_alu instid0(SALU_C... |
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 __radixcounts(float *a, int n, int digit, unsigned int *bi) {
__shared__ unsigned int ic[RNDVALS];
int istart = (int)(((long long)blockIdx.x) * n / gridDim.x);
int iend = (int)(((long long)(blockIdx.x+1)) * n / gridDim.x);
int tid = threadIdx.x;
int bib... | .text
.file "__radixcounts.hip"
.globl _Z28__device_stub____radixcountsPfiiPj # -- Begin function _Z28__device_stub____radixcountsPfiiPj
.p2align 4, 0x90
.type _Z28__device_stub____radixcountsPfiiPj,@function
_Z28__device_stub____radixcountsPfiiPj: # @_Z28__device_stub____radixcountsPfiiPj
.cfi_startproc
# %bb.0:
subq ... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00032007_00000000-6___radixcounts.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8,... | .text
.file "__radixcounts.hip"
.globl _Z28__device_stub____radixcountsPfiiPj # -- Begin function _Z28__device_stub____radixcountsPfiiPj
.p2align 4, 0x90
.type _Z28__device_stub____radixcountsPfiiPj,@function
_Z28__device_stub____radixcountsPfiiPj: # @_Z28__device_stub____radixcountsPfiiPj
.cfi_startproc
# %bb.0:
subq ... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include<iostream>
#include<stdlib.h>
__global__ void add(int *a,int *b,int *c)
{
int index=blockIdx.x*blockDim.x+threadIdx.x;
c[index]=a[index]+b[index];
}
void random_ints(int *a,int N)
{
int i;
for(i=0;i<N;i++)
{
a[i]=i;
}
}
#define N 2048
#define THREADS_PER_BLOCK 64
int main(void)
{
int *a,*b,*c;
int *d_a,*d_b,*d_... | code for sm_80
Function : _Z3addPiS_S_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_CTAID.X ; /* 0x0000000000067919 */
/* 0x000e220000002500 */
/*0020*/ HF... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include<iostream>
#include<stdlib.h>
__global__ void add(int *a,int *b,int *c)
{
int index=blockIdx.x*blockDim.x+threadIdx.x;
c[index]=a[index]+b[index];
}
void random_ints(int *a,int N)
{
int i;
for(i=0;i<N;i++)
{
a[i]=i;
}
}
#define N 2048
#define THREADS_PER_BLOCK 64
int main(void)
{
int *a,*b,*c;
int *d_a,*d_b,*d_... | .file "tmpxft_00130a97_00000000-6_file.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 __cudaUnreg... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include<iostream>
#include<stdlib.h>
__global__ void add(int *a,int *b,int *c)
{
int index=blockIdx.x*blockDim.x+threadIdx.x;
c[index]=a[index]+b[index];
}
void random_ints(int *a,int N)
{
int i;
for(i=0;i<N;i++)
{
a[i]=i;
}
}
#define N 2048
#define THREADS_PER_BLOCK 64
int main(void)
{
int *a,*b,*c;
int *d_a,*d_b,*d_... | #include <hip/hip_runtime.h>
#include<iostream>
#include<stdlib.h>
__global__ void add(int *a,int *b,int *c)
{
int index=blockIdx.x*blockDim.x+threadIdx.x;
c[index]=a[index]+b[index];
}
void random_ints(int *a,int N)
{
int i;
for(i=0;i<N;i++)
{
a[i]=i;
}
}
#define N 2048
#define THREADS_PER_BLOCK 64
int main(void)
{
in... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include<iostream>
#include<stdlib.h>
__global__ void add(int *a,int *b,int *c)
{
int index=blockIdx.x*blockDim.x+threadIdx.x;
c[index]=a[index]+b[index];
}
void random_ints(int *a,int N)
{
int i;
for(i=0;i<N;i++)
{
a[i]=i;
}
}
#define N 2048
#define THREADS_PER_BLOCK 64
int main(void)
{
in... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3addPiS_S_
.globl _Z3addPiS_S_
.p2align 8
.type _Z3addPiS_S_,@function
_Z3addPiS_S_:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x24
s_load_b128 s[4:7], s[0:1], 0x0
s_load_b64 s[0:1], s[0:1], 0x10
s_waitcnt lgkmcnt(0)
s_and_b... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include<iostream>
#include<stdlib.h>
__global__ void add(int *a,int *b,int *c)
{
int index=blockIdx.x*blockDim.x+threadIdx.x;
c[index]=a[index]+b[index];
}
void random_ints(int *a,int N)
{
int i;
for(i=0;i<N;i++)
{
a[i]=i;
}
}
#define N 2048
#define THREADS_PER_BLOCK 64
int main(void)
{
in... | .text
.file "file.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z18__device_stub__addPiS_S_ # -- Begin function _Z18__device_stub__addPiS_S_
.p2align 4, 0x90
.typ... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z3addPiS_S_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_CTAID.X ; /* 0x0000000000067919 */
/* 0x000e220000002500 */
/*0020*/ HF... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z3addPiS_S_
.globl _Z3addPiS_S_
.p2align 8
.type _Z3addPiS_S_,@function
_Z3addPiS_S_:
s_clause 0x2
s_load_b32 s2, s[0:1], 0x24
s_load_b128 s[4:7], s[0:1], 0x0
s_load_b64 s[0:1], s[0:1], 0x10
s_waitcnt lgkmcnt(0)
s_and_b... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00130a97_00000000-6_file.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 __cudaUnreg... | .text
.file "file.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z18__device_stub__addPiS_S_ # -- Begin function _Z18__device_stub__addPiS_S_
.p2align 4, 0x90
.typ... |
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>
#include <string.h>
#define R 5
#define C 40
__device__ int gpu_strlen(char * s)
{
int i = 0;
while(s[i++] != '\0')
{
}
return i;
}
__device__ int gpu_isAlpha(char ch)
{
if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
return 1;
else
return 0;
}
__global... | code for sm_80
Function : _Z10wordCount2PPcPPiii
.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 R4, SR_CTAID.Y ; /* 0x0000000000047919 */
/* 0x000e... |
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>
#include <string.h>
#define R 5
#define C 40
__device__ int gpu_strlen(char * s)
{
int i = 0;
while(s[i++] != '\0')
{
}
return i;
}
__device__ int gpu_isAlpha(char ch)
{
if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
return 1;
else
return 0;
}
__global... | .file "tmpxft_0019ba9a_00000000-6_lab8.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 <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define R 5
#define C 40
__device__ int gpu_strlen(char * s)
{
int i = 0;
while(s[i++] != '\0')
{
}
return i;
}
__device__ int gpu_isAlpha(char ch)
{
if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
return 1;
else
return 0;
}
__global... | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define R 5
#define C 40
__device__ int gpu_strlen(char * s)
{
int i = 0;
while(s[i++] != '\0')
{
}
return i;
}
__device__ int gpu_isAlpha(char ch)
{
if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
return... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define R 5
#define C 40
__device__ int gpu_strlen(char * s)
{
int i = 0;
while(s[i++] != '\0')
{
}
return i;
}
__device__ int gpu_isAlpha(char ch)
{
if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
return... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10wordCount2PPcPPiii
.globl _Z10wordCount2PPcPPiii
.p2align 8
.type _Z10wordCount2PPcPPiii,@function
_Z10wordCount2PPcPPiii:
s_clause 0x1
s_load_b32 s6, s[0:1], 0x24
s_load_b64 s[2:3], s[0:1], 0x0
v_bfe_u32 v3, v0, 10, 10
s_mov_b32 s7, 0
... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define R 5
#define C 40
__device__ int gpu_strlen(char * s)
{
int i = 0;
while(s[i++] != '\0')
{
}
return i;
}
__device__ int gpu_isAlpha(char ch)
{
if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
return... | .text
.file "lab8.hip"
.globl _Z25__device_stub__wordCount2PPcPPiii # -- Begin function _Z25__device_stub__wordCount2PPcPPiii
.p2align 4, 0x90
.type _Z25__device_stub__wordCount2PPcPPiii,@function
_Z25__device_stub__wordCount2PPcPPiii: # @_Z25__device_stub__wordCount2PPcPPiii
.cfi_startproc
# %bb.0:
subq $120, %rsp
.c... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z10wordCount2PPcPPiii
.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 R4, SR_CTAID.Y ; /* 0x0000000000047919 */
/* 0x000e... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z10wordCount2PPcPPiii
.globl _Z10wordCount2PPcPPiii
.p2align 8
.type _Z10wordCount2PPcPPiii,@function
_Z10wordCount2PPcPPiii:
s_clause 0x1
s_load_b32 s6, s[0:1], 0x24
s_load_b64 s[2:3], s[0:1], 0x0
v_bfe_u32 v3, v0, 10, 10
s_mov_b32 s7, 0
... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0019ba9a_00000000-6_lab8.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 "lab8.hip"
.globl _Z25__device_stub__wordCount2PPcPPiii # -- Begin function _Z25__device_stub__wordCount2PPcPPiii
.p2align 4, 0x90
.type _Z25__device_stub__wordCount2PPcPPiii,@function
_Z25__device_stub__wordCount2PPcPPiii: # @_Z25__device_stub__wordCount2PPcPPiii
.cfi_startproc
# %bb.0:
subq $120, %rsp
.c... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
__device__ void mul(double a, double b, double *res)
{
*res = a * b;
// NaN
*res = (*res)-(*res) / (*res)-(*res);
}
__global__ void dot_prod(double *x, double *y, int size)
{
double d;
for (int i=0; i < size; ++i)
{
double tmp;
mul(x[i], y[i], &tmp);
d += tmp;
}
int tid = blockIdx.x * blockDim.x + t... | code for sm_80
Function : _Z8dot_prodPdS_i
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fc800078e00ff */
/*0010*/ IMAD.MOV.U32 R24, RZ, RZ, c[0x0][0x170] ; /* 0x00005c00ff1876... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
__device__ void mul(double a, double b, double *res)
{
*res = a * b;
// NaN
*res = (*res)-(*res) / (*res)-(*res);
}
__global__ void dot_prod(double *x, double *y, int size)
{
double d;
for (int i=0; i < size; ++i)
{
double tmp;
mul(x[i], y[i], &tmp);
d += tmp;
}
int tid = blockIdx.x * blockDim.x + t... | .file "tmpxft_00131be1_00000000-6_dot_product.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
__device__ void mul(double a, double b, double *res)
{
*res = a * b;
// NaN
*res = (*res)-(*res) / (*res)-(*res);
}
__global__ void dot_prod(double *x, double *y, int size)
{
double d;
for (int i=0; i < size; ++i)
{
double tmp;
mul(x[i], y[i], &tmp);
d += tmp;
}
int tid = blockIdx.x * blockDim.x + t... | #include <hip/hip_runtime.h>
#include <stdio.h>
__device__ void mul(double a, double b, double *res)
{
*res = a * b;
// NaN
*res = (*res)-(*res) / (*res)-(*res);
}
__global__ void dot_prod(double *x, double *y, int size)
{
double d;
for (int i=0; i < size; ++i)
{
double tmp;
mul(x[i], y[i], &tmp);
d += tmp;
}
int tid ... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
__device__ void mul(double a, double b, double *res)
{
*res = a * b;
// NaN
*res = (*res)-(*res) / (*res)-(*res);
}
__global__ void dot_prod(double *x, double *y, int size)
{
double d;
for (int i=0; i < size; ++i)
{
double tmp;
mul(x[i], y[i], &tmp);
d += tmp;
}
int tid ... | .text
.file "dot_product.hip"
.globl _Z23__device_stub__dot_prodPdS_i # -- Begin function _Z23__device_stub__dot_prodPdS_i
.p2align 4, 0x90
.type _Z23__device_stub__dot_prodPdS_i,@function
_Z23__device_stub__dot_prodPdS_i: # @_Z23__device_stub__dot_prodPdS_i
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_of... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00131be1_00000000-6_dot_product.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %... | .text
.file "dot_product.hip"
.globl _Z23__device_stub__dot_prodPdS_i # -- Begin function _Z23__device_stub__dot_prodPdS_i
.p2align 4, 0x90
.type _Z23__device_stub__dot_prodPdS_i,@function
_Z23__device_stub__dot_prodPdS_i: # @_Z23__device_stub__dot_prodPdS_i
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_of... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include<bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979323846264;
const double L = 550;
const double Diff = 1.;
const int MAX_BLOCK_WIDTH = 32;
// In this method, we use squre cells of threads, but we need to specify the size of the square.
/*
| coordinate system:
-|---------------y
| x = i * d_... | .file "tmpxft_0013f662_00000000-6_cuda_diff_modi.cudafe1.cpp"
.text
#APP
.globl _ZSt21ios_base_library_initv
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB10882:
.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<bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979323846264;
const double L = 550;
const double Diff = 1.;
const int MAX_BLOCK_WIDTH = 32;
// In this method, we use squre cells of threads, but we need to specify the size of the square.
/*
| coordinate system:
-|---------------y
| x = i * d_... | #include <hip/hip_runtime.h>
#include<bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979323846264;
const double L = 550;
const double Diff = 1.;
const int MAX_BLOCK_WIDTH = 32;
// In this method, we use squre cells of threads, but we need to specify the size of the square.
/*
| coordinate system:
-|... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
#include<bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979323846264;
const double L = 550;
const double Diff = 1.;
const int MAX_BLOCK_WIDTH = 32;
// In this method, we use squre cells of threads, but we need to specify the size of the square.
/*
| coordinate system:
-|... | .text
.file "cuda_diff_modi.hip"
# Start of file scope inline assembly
.globl _ZSt21ios_base_library_initv
# End of file scope inline assembly
.globl _Z27__device_stub__oneIterationiiPdS_dd # -- Begin function _Z27__device_stub__oneIterationi... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#include <cuda_runtime.h>
#include <math.h>
#include <time.h>
static double a = 1.0E-10;
void FillMatrix(double *matrixA, double *matrixB, int size);
void OpenFile(int *N);
void SaveFile(struct tm *start, struct tm *end, double error, double elapsed, int N);
__global__ void Multiply(double* A, double... | .file "tmpxft_0000e31e_00000000-6_matmult.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_runtime.h>
#include <math.h>
#include <time.h>
static double a = 1.0E-10;
void FillMatrix(double *matrixA, double *matrixB, int size);
void OpenFile(int *N);
void SaveFile(struct tm *start, struct tm *end, double error, double elapsed, int N);
__global__ void Multiply(double* A, double... | #include <stdio.h>
#include <hip/hip_runtime.h>
#include <math.h>
#include <time.h>
static double a = 1.0E-10;
void FillMatrix(double *matrixA, double *matrixB, int size);
void OpenFile(int *N);
void SaveFile(struct tm *start, struct tm *end, double error, double elapsed, int N);
__global__ void Multiply(double* A, dou... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdio.h>
#include <hip/hip_runtime.h>
#include <math.h>
#include <time.h>
static double a = 1.0E-10;
void FillMatrix(double *matrixA, double *matrixB, int size);
void OpenFile(int *N);
void SaveFile(struct tm *start, struct tm *end, double error, double elapsed, int N);
__global__ void Multiply(double* A, dou... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z8MultiplyPdS_S_i
.globl _Z8MultiplyPdS_S_i
.p2align 8
.type _Z8MultiplyPdS_S_i,@function
_Z8MultiplyPdS_S_i:
s_clause 0x1
s_load_b32 s3, s[0:1], 0x2c
s_load_b32 s2, s[0:1], 0x18
s_waitcnt lgkmcnt(0)
s_and_b32 s3, s3, 0xffff
s_dela... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdio.h>
#include <hip/hip_runtime.h>
#include <math.h>
#include <time.h>
static double a = 1.0E-10;
void FillMatrix(double *matrixA, double *matrixB, int size);
void OpenFile(int *N);
void SaveFile(struct tm *start, struct tm *end, double error, double elapsed, int N);
__global__ void Multiply(double* A, dou... | .text
.file "matmult.hip"
.globl _Z23__device_stub__MultiplyPdS_S_i # -- Begin function _Z23__device_stub__MultiplyPdS_S_i
.p2align 4, 0x90
.type _Z23__device_stub__MultiplyPdS_S_i,@function
_Z23__device_stub__MultiplyPdS_S_i: # @_Z23__device_stub__MultiplyPdS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cf... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_0000e31e_00000000-6_matmult.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 "matmult.hip"
.globl _Z23__device_stub__MultiplyPdS_S_i # -- Begin function _Z23__device_stub__MultiplyPdS_S_i
.p2align 4, 0x90
.type _Z23__device_stub__MultiplyPdS_S_i,@function
_Z23__device_stub__MultiplyPdS_S_i: # @_Z23__device_stub__MultiplyPdS_S_i
.cfi_startproc
# %bb.0:
subq $120, %rsp
.cfi_def_cf... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include <stdio.h>
#define size 5
__global__ void addvec(int *c, const int *a, const int *b)
{
int i = threadIdx.x;
c[i] = a[i] + b[i];
}
int main()
{
const int a[size] = {1, 2, 3, 4, 5};
const int b[size] = {10, 20, 30, 40, 50};
int c[size] = {0}; int *da, *db, *dc;
cudaMalloc((void**)& dc, size*sizeof(int));
cudaMall... | code for sm_80
Function : _Z6addvecPiPKiS1_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_TID.X ; /* 0x0000000000067919 */
/* 0x000e220000002100 */
/*0020*/... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include <stdio.h>
#define size 5
__global__ void addvec(int *c, const int *a, const int *b)
{
int i = threadIdx.x;
c[i] = a[i] + b[i];
}
int main()
{
const int a[size] = {1, 2, 3, 4, 5};
const int b[size] = {10, 20, 30, 40, 50};
int c[size] = {0}; int *da, *db, *dc;
cudaMalloc((void**)& dc, size*sizeof(int));
cudaMall... | .file "tmpxft_00162137_00000000-6_addVec.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2060:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
addq $8, %rsp
.... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include <stdio.h>
#define size 5
__global__ void addvec(int *c, const int *a, const int *b)
{
int i = threadIdx.x;
c[i] = a[i] + b[i];
}
int main()
{
const int a[size] = {1, 2, 3, 4, 5};
const int b[size] = {10, 20, 30, 40, 50};
int c[size] = {0}; int *da, *db, *dc;
cudaMalloc((void**)& dc, size*sizeof(int));
cudaMall... | #include <hip/hip_runtime.h>
#include <stdio.h>
#define size 5
__global__ void addvec(int *c, const int *a, const int *b)
{
int i = threadIdx.x;
c[i] = a[i] + b[i];
}
int main()
{
const int a[size] = {1, 2, 3, 4, 5};
const int b[size] = {10, 20, 30, 40, 50};
int c[size] = {0}; int *da, *db, *dc;
hipMalloc((void**)& dc,... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include <stdio.h>
#define size 5
__global__ void addvec(int *c, const int *a, const int *b)
{
int i = threadIdx.x;
c[i] = a[i] + b[i];
}
int main()
{
const int a[size] = {1, 2, 3, 4, 5};
const int b[size] = {10, 20, 30, 40, 50};
int c[size] = {0}; int *da, *db, *dc;
hipMalloc((void**)& dc,... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6addvecPiPKiS1_
.globl _Z6addvecPiPKiS1_
.p2align 8
.type _Z6addvecPiPKiS1_,@function
_Z6addvecPiPKiS1_:
s_clause 0x1
s_load_b128 s[4:7], s[0:1], 0x0
s_load_b64 s[0:1], s[0:1], 0x10
v_lshlrev_b32_e32 v0, 2, v0
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 <stdio.h>
#define size 5
__global__ void addvec(int *c, const int *a, const int *b)
{
int i = threadIdx.x;
c[i] = a[i] + b[i];
}
int main()
{
const int a[size] = {1, 2, 3, 4, 5};
const int b[size] = {10, 20, 30, 40, 50};
int c[size] = {0}; int *da, *db, *dc;
hipMalloc((void**)& dc,... | .text
.file "addVec.hip"
.globl _Z21__device_stub__addvecPiPKiS1_ # -- Begin function _Z21__device_stub__addvecPiPKiS1_
.p2align 4, 0x90
.type _Z21__device_stub__addvecPiPKiS1_,@function
_Z21__device_stub__addvecPiPKiS1_: # @_Z21__device_stub__addvecPiPKiS1_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_off... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z6addvecPiPKiS1_
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R6, SR_TID.X ; /* 0x0000000000067919 */
/* 0x000e220000002100 */
/*0020*/... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z6addvecPiPKiS1_
.globl _Z6addvecPiPKiS1_
.p2align 8
.type _Z6addvecPiPKiS1_,@function
_Z6addvecPiPKiS1_:
s_clause 0x1
s_load_b128 s[4:7], s[0:1], 0x0
s_load_b64 s[0:1], s[0:1], 0x10
v_lshlrev_b32_e32 v0, 2, v0
s_waitcnt lgkmcnt(... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00162137_00000000-6_addVec.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 "addVec.hip"
.globl _Z21__device_stub__addvecPiPKiS1_ # -- Begin function _Z21__device_stub__addvecPiPKiS1_
.p2align 4, 0x90
.type _Z21__device_stub__addvecPiPKiS1_,@function
_Z21__device_stub__addvecPiPKiS1_: # @_Z21__device_stub__addvecPiPKiS1_
.cfi_startproc
# %bb.0:
subq $104, %rsp
.cfi_def_cfa_off... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void kernel_forwardElimination( float * fullMatrix, float * B, unsigned int nComp ) {
unsigned int t = threadIdx.x;
unsigned int baseIndex = t*nComp*nComp;
unsigned int i,j,k;
for ( i = 0; i < nComp - 1; i++ )
for ( j = i + 1; j < nComp; j++ ) {
double div = fullMatrix[baseIndex+ j*nCom... | code for sm_80
Function : _Z25kernel_forwardEliminationPfS_j
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ IMAD.MOV.U32 R2, RZ, RZ, c[0x0][0x170] ; /*... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void kernel_forwardElimination( float * fullMatrix, float * B, unsigned int nComp ) {
unsigned int t = threadIdx.x;
unsigned int baseIndex = t*nComp*nComp;
unsigned int i,j,k;
for ( i = 0; i < nComp - 1; i++ )
for ( j = i + 1; j < nComp; j++ ) {
double div = fullMatrix[baseIndex+ j*nCom... | .file "tmpxft_000da495_00000000-6_kernel_forwardElimination.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@... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void kernel_forwardElimination( float * fullMatrix, float * B, unsigned int nComp ) {
unsigned int t = threadIdx.x;
unsigned int baseIndex = t*nComp*nComp;
unsigned int i,j,k;
for ( i = 0; i < nComp - 1; i++ )
for ( j = i + 1; j < nComp; j++ ) {
double div = fullMatrix[baseIndex+ j*nCom... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void kernel_forwardElimination( float * fullMatrix, float * B, unsigned int nComp ) {
unsigned int t = threadIdx.x;
unsigned int baseIndex = t*nComp*nComp;
unsigned int i,j,k;
for ( i = 0; i < nComp - 1; i++ )
for ( j = i + 1; j < nComp; j++ ) {
double div =... |
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 kernel_forwardElimination( float * fullMatrix, float * B, unsigned int nComp ) {
unsigned int t = threadIdx.x;
unsigned int baseIndex = t*nComp*nComp;
unsigned int i,j,k;
for ( i = 0; i < nComp - 1; i++ )
for ( j = i + 1; j < nComp; j++ ) {
double div =... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z25kernel_forwardEliminationPfS_j
.globl _Z25kernel_forwardEliminationPfS_j
.p2align 8
.type _Z25kernel_forwardEliminationPfS_j,@function
_Z25kernel_forwardEliminationPfS_j:
s_load_b32 s5, s[0:1], 0x10
s_mov_b32 s7, 0
s_waitcnt lgkmcnt(0)
s_add_i32 s6,... |
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 kernel_forwardElimination( float * fullMatrix, float * B, unsigned int nComp ) {
unsigned int t = threadIdx.x;
unsigned int baseIndex = t*nComp*nComp;
unsigned int i,j,k;
for ( i = 0; i < nComp - 1; i++ )
for ( j = i + 1; j < nComp; j++ ) {
double div =... | .text
.file "kernel_forwardElimination.hip"
.globl _Z40__device_stub__kernel_forwardEliminationPfS_j # -- Begin function _Z40__device_stub__kernel_forwardEliminationPfS_j
.p2align 4, 0x90
.type _Z40__device_stub__kernel_forwardEliminationPfS_j,@function
_Z40__device_stub__kernel_forwardEliminationPfS_j: # @_Z40__device... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z25kernel_forwardEliminationPfS_j
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ IMAD.MOV.U32 R1, RZ, RZ, c[0x0][0x28] ; /* 0x00000a00ff017624 */
/* 0x000fe400078e00ff */
/*0010*/ IMAD.MOV.U32 R2, RZ, RZ, c[0x0][0x170] ; /*... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z25kernel_forwardEliminationPfS_j
.globl _Z25kernel_forwardEliminationPfS_j
.p2align 8
.type _Z25kernel_forwardEliminationPfS_j,@function
_Z25kernel_forwardEliminationPfS_j:
s_load_b32 s5, s[0:1], 0x10
s_mov_b32 s7, 0
s_waitcnt lgkmcnt(0)
s_add_i32 s6,... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_000da495_00000000-6_kernel_forwardElimination.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@... | .text
.file "kernel_forwardElimination.hip"
.globl _Z40__device_stub__kernel_forwardEliminationPfS_j # -- Begin function _Z40__device_stub__kernel_forwardEliminationPfS_j
.p2align 4, 0x90
.type _Z40__device_stub__kernel_forwardEliminationPfS_j,@function
_Z40__device_stub__kernel_forwardEliminationPfS_j: # @_Z40__device... |
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>
#define THREADS_PER_BLOCK 256
#define MULTIPLICATIONS 4096
/**
* Multiply square matrix (n x n) by the vector of size n.
*
*
* @param mat Input matrix.
* @param vec Input vector.
* @param out Output vector.
* @param n Dimension.
*/
__global__ void matrix... | code for sm_80
Function : _Z28matrix_vector_multiplicationPfS_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 R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e... |
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>
#define THREADS_PER_BLOCK 256
#define MULTIPLICATIONS 4096
/**
* Multiply square matrix (n x n) by the vector of size n.
*
*
* @param mat Input matrix.
* @param vec Input vector.
* @param out Output vector.
* @param n Dimension.
*/
__global__ void matrix... | .file "tmpxft_00019fe3_00000000-6_cuda_mat_vec_multiplication.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 __cudaUnregisterFatBinar... |
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>
#define THREADS_PER_BLOCK 256
#define MULTIPLICATIONS 4096
/**
* Multiply square matrix (n x n) by the vector of size n.
*
*
* @param mat Input matrix.
* @param vec Input vector.
* @param out Output vector.
* @param n Dimension.
*/
__global__ void matrix... | #include <stdio.h>
#include <hip/hip_runtime.h>
#define THREADS_PER_BLOCK 256
#define MULTIPLICATIONS 4096
/**
* Multiply square matrix (n x n) by the vector of size n.
*
*
* @param mat Input matrix.
* @param vec Input vector.
* @param out Output vector.
* @param n Dimension.
*/
__global__ void matrix_vector_multipl... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <stdio.h>
#include <hip/hip_runtime.h>
#define THREADS_PER_BLOCK 256
#define MULTIPLICATIONS 4096
/**
* Multiply square matrix (n x n) by the vector of size n.
*
*
* @param mat Input matrix.
* @param vec Input vector.
* @param out Output vector.
* @param n Dimension.
*/
__global__ void matrix_vector_multipl... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z28matrix_vector_multiplicationPfS_S_i
.globl _Z28matrix_vector_multiplicationPfS_S_i
.p2align 8
.type _Z28matrix_vector_multiplicationPfS_S_i,@function
_Z28matrix_vector_multiplicationPfS_S_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s8, s[0:1]... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <stdio.h>
#include <hip/hip_runtime.h>
#define THREADS_PER_BLOCK 256
#define MULTIPLICATIONS 4096
/**
* Multiply square matrix (n x n) by the vector of size n.
*
*
* @param mat Input matrix.
* @param vec Input vector.
* @param out Output vector.
* @param n Dimension.
*/
__global__ void matrix_vector_multipl... | .text
.file "cuda_mat_vec_multiplication.hip"
.globl _Z43__device_stub__matrix_vector_multiplicationPfS_S_i # -- Begin function _Z43__device_stub__matrix_vector_multiplicationPfS_S_i
.p2align 4, 0x90
.type _Z43__device_stub__matrix_vector_multiplicationPfS_S_i,@function
_Z43__device_stub__matrix_vector_multiplicationPf... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z28matrix_vector_multiplicationPfS_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 R0, SR_CTAID.X ; /* 0x0000000000007919 */
/* 0x000e... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z28matrix_vector_multiplicationPfS_S_i
.globl _Z28matrix_vector_multiplicationPfS_S_i
.p2align 8
.type _Z28matrix_vector_multiplicationPfS_S_i,@function
_Z28matrix_vector_multiplicationPfS_S_i:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x2c
s_load_b32 s8, s[0:1]... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00019fe3_00000000-6_cuda_mat_vec_multiplication.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 __cudaUnregisterFatBinar... | .text
.file "cuda_mat_vec_multiplication.hip"
.globl _Z43__device_stub__matrix_vector_multiplicationPfS_S_i # -- Begin function _Z43__device_stub__matrix_vector_multiplicationPfS_S_i
.p2align 4, 0x90
.type _Z43__device_stub__matrix_vector_multiplicationPfS_S_i,@function
_Z43__device_stub__matrix_vector_multiplicationPf... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
extern "C"
{
}
__global__ void elSq(int N, int M, float *Mat)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
int j = blockIdx.y * blockDim.y + threadIdx.y;
int index = j*N + i;
if (i < N && j < M)
{
Mat[index] = __fmul_rn(Mat[index], Mat[index]);
}
} | code for sm_80
Function : _Z4elSqiiPf
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R3, SR_CTAID.Y ; /* 0x0000000000037919 */
/* 0x000e280000002600 */
/*0020*/ S2R... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
extern "C"
{
}
__global__ void elSq(int N, int M, float *Mat)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
int j = blockIdx.y * blockDim.y + threadIdx.y;
int index = j*N + i;
if (i < N && j < M)
{
Mat[index] = __fmul_rn(Mat[index], Mat[index]);
}
} | .file "tmpxft_00178d01_00000000-6_elSq.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 "includes.h"
extern "C"
{
}
__global__ void elSq(int N, int M, float *Mat)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
int j = blockIdx.y * blockDim.y + threadIdx.y;
int index = j*N + i;
if (i < N && j < M)
{
Mat[index] = __fmul_rn(Mat[index], Mat[index]);
}
} | #include <hip/hip_runtime.h>
#include "includes.h"
extern "C"
{
}
__global__ void elSq(int N, int M, float *Mat)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
int j = blockIdx.y * blockDim.y + threadIdx.y;
int index = j*N + i;
if (i < N && j < M)
{
Mat[index] = __fmul_rn(Mat[index], Mat[index]);
}
} |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
extern "C"
{
}
__global__ void elSq(int N, int M, float *Mat)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
int j = blockIdx.y * blockDim.y + threadIdx.y;
int index = j*N + i;
if (i < N && j < M)
{
Mat[index] = __fmul_rn(Mat[index], Mat[index]);
}
} | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z4elSqiiPf
.globl _Z4elSqiiPf
.p2align 8
.type _Z4elSqiiPf,@function
_Z4elSqiiPf:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x1c
s_load_b64 s[4:5], s[0:1], 0x0
v_and_b32_e32 v2, 0x3ff, v0
v_bfe_u32 v3, v0, 10, 10
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"
extern "C"
{
}
__global__ void elSq(int N, int M, float *Mat)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
int j = blockIdx.y * blockDim.y + threadIdx.y;
int index = j*N + i;
if (i < N && j < M)
{
Mat[index] = __fmul_rn(Mat[index], Mat[index]);
}
} | .text
.file "elSq.hip"
.globl _Z19__device_stub__elSqiiPf # -- Begin function _Z19__device_stub__elSqiiPf
.p2align 4, 0x90
.type _Z19__device_stub__elSqiiPf,@function
_Z19__device_stub__elSqiiPf: # @_Z19__device_stub__elSqiiPf
.cfi_startproc
# %bb.0:
subq $88, %rsp
.cfi_def_cfa_offset 96
movl %edi, 4(%rs... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z4elSqiiPf
.headerflags @"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM80 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM80)"
/*0000*/ MOV R1, c[0x0][0x28] ; /* 0x00000a0000017a02 */
/* 0x000fe40000000f00 */
/*0010*/ S2R R3, SR_CTAID.Y ; /* 0x0000000000037919 */
/* 0x000e280000002600 */
/*0020*/ S2R... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z4elSqiiPf
.globl _Z4elSqiiPf
.p2align 8
.type _Z4elSqiiPf,@function
_Z4elSqiiPf:
s_clause 0x1
s_load_b32 s2, s[0:1], 0x1c
s_load_b64 s[4:5], s[0:1], 0x0
v_and_b32_e32 v2, 0x3ff, v0
v_bfe_u32 v3, v0, 10, 10
s_waitcnt ... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00178d01_00000000-6_elSq.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 "elSq.hip"
.globl _Z19__device_stub__elSqiiPf # -- Begin function _Z19__device_stub__elSqiiPf
.p2align 4, 0x90
.type _Z19__device_stub__elSqiiPf,@function
_Z19__device_stub__elSqiiPf: # @_Z19__device_stub__elSqiiPf
.cfi_startproc
# %bb.0:
subq $88, %rsp
.cfi_def_cfa_offset 96
movl %edi, 4(%rs... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | #include "includes.h"
__global__ void kernelUpdateParticle(double *positions, double *velocities, double *pBests, double *gBest, int particlesCount, int dimensionsCount, double r1, double r2)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
if(i >= particlesCount * dimensionsCount)
return;
velocities[i] = d_OMEGA * vel... | code for sm_80
Function : _Z20kernelUpdateParticlePdS_S_S_iidd
.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 R4, SR_CTAID.X ; /* 0x000000000004791... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | #include "includes.h"
__global__ void kernelUpdateParticle(double *positions, double *velocities, double *pBests, double *gBest, int particlesCount, int dimensionsCount, double r1, double r2)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
if(i >= particlesCount * dimensionsCount)
return;
velocities[i] = d_OMEGA * vel... | .file "tmpxft_00143470_00000000-6_kernelUpdateParticle.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
a... |
You are a helpful coding assistant specialized in converting CUDA source code to HIP/AMD source code. | #include "includes.h"
__global__ void kernelUpdateParticle(double *positions, double *velocities, double *pBests, double *gBest, int particlesCount, int dimensionsCount, double r1, double r2)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
if(i >= particlesCount * dimensionsCount)
return;
velocities[i] = d_OMEGA * vel... | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void kernelUpdateParticle(double *positions, double *velocities, double *pBests, double *gBest, int particlesCount, int dimensionsCount, double r1, double r2)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
if(i >= particlesCount * dimensionsCount)
return;
... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
#include "includes.h"
__global__ void kernelUpdateParticle(double *positions, double *velocities, double *pBests, double *gBest, int particlesCount, int dimensionsCount, double r1, double r2)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
if(i >= particlesCount * dimensionsCount)
return;
... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z20kernelUpdateParticlePdS_S_S_iidd
.globl _Z20kernelUpdateParticlePdS_S_S_iidd
.p2align 8
.type _Z20kernelUpdateParticlePdS_S_S_iidd,@function
_Z20kernelUpdateParticlePdS_S_S_iidd:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x44
s_load_b64 s[2:3], s[0:1], 0x20... |
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 kernelUpdateParticle(double *positions, double *velocities, double *pBests, double *gBest, int particlesCount, int dimensionsCount, double r1, double r2)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
if(i >= particlesCount * dimensionsCount)
return;
... | .text
.file "kernelUpdateParticle.hip"
.globl _Z35__device_stub__kernelUpdateParticlePdS_S_S_iidd # -- Begin function _Z35__device_stub__kernelUpdateParticlePdS_S_S_iidd
.p2align 4, 0x90
.type _Z35__device_stub__kernelUpdateParticlePdS_S_S_iidd,@function
_Z35__device_stub__kernelUpdateParticlePdS_S_S_iidd: # @_Z35__dev... |
You are a helpful coding assistant specialized in converting from CUDA device assembly to AMD device assembly. | code for sm_80
Function : _Z20kernelUpdateParticlePdS_S_S_iidd
.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 R4, SR_CTAID.X ; /* 0x000000000004791... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected _Z20kernelUpdateParticlePdS_S_S_iidd
.globl _Z20kernelUpdateParticlePdS_S_S_iidd
.p2align 8
.type _Z20kernelUpdateParticlePdS_S_S_iidd,@function
_Z20kernelUpdateParticlePdS_S_S_iidd:
s_clause 0x1
s_load_b32 s4, s[0:1], 0x44
s_load_b64 s[2:3], s[0:1], 0x20... |
You are a helpful coding assistant specialized in converting from CUDA host assembly to AMD host assembly. | .file "tmpxft_00143470_00000000-6_kernelUpdateParticle.cudafe1.cpp"
.text
#APP
#NO_APP
.type _ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2029:
.cfi_startproc
endbr64
subq $8, %rsp
.cfi_def_cfa_offset 16
movq _ZL20__cudaFatCubinHandle(%rip), %rdi
call __cudaUnregisterFatBinary@PLT
a... | .text
.file "kernelUpdateParticle.hip"
.globl _Z35__device_stub__kernelUpdateParticlePdS_S_S_iidd # -- Begin function _Z35__device_stub__kernelUpdateParticlePdS_S_S_iidd
.p2align 4, 0x90
.type _Z35__device_stub__kernelUpdateParticlePdS_S_S_iidd,@function
_Z35__device_stub__kernelUpdateParticlePdS_S_S_iidd: # @_Z35__dev... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA device assembly. | /**
* Compute the padding activation.
* @param x_shape the shape of the input buffer.
* @param x the input buffer.
* @param y_shape the shape of the output buffer.
* @param y the output buffer.
* @param value the padding value.
* @return nothing.
*/
extern "C"
__global__ void activation(long *x_shape, float *x, long *y... | code for sm_80
Function : inputs_gradients
.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 R2, c[0x0][0x160] ; /* 0x0000580000027a02 */
/* 0x000fe20000000f00 */
/*00... |
You are a helpful coding assistant specialized in converting CUDA source code to CUDA host assembly. | /**
* Compute the padding activation.
* @param x_shape the shape of the input buffer.
* @param x the input buffer.
* @param y_shape the shape of the output buffer.
* @param y the output buffer.
* @param value the padding value.
* @return nothing.
*/
extern "C"
__global__ void activation(long *x_shape, float *x, long *y... | .file "tmpxft_0010e88e_00000000-6_pad_2d.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. | /**
* Compute the padding activation.
* @param x_shape the shape of the input buffer.
* @param x the input buffer.
* @param y_shape the shape of the output buffer.
* @param y the output buffer.
* @param value the padding value.
* @return nothing.
*/
extern "C"
__global__ void activation(long *x_shape, float *x, long *y... | #include <hip/hip_runtime.h>
/**
* Compute the padding activation.
* @param x_shape the shape of the input buffer.
* @param x the input buffer.
* @param y_shape the shape of the output buffer.
* @param y the output buffer.
* @param value the padding value.
* @return nothing.
*/
extern "C"
__global__ void activation(lon... |
You are a helpful coding assistant specialized in converting HIP source code to AMD device assembly. | #include <hip/hip_runtime.h>
/**
* Compute the padding activation.
* @param x_shape the shape of the input buffer.
* @param x the input buffer.
* @param y_shape the shape of the output buffer.
* @param y the output buffer.
* @param value the padding value.
* @return nothing.
*/
extern "C"
__global__ void activation(lon... | .text
.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
.protected activation
.globl activation
.p2align 8
.type activation,@function
activation:
s_mov_b32 s8, s13
s_clause 0x2
s_load_b64 s[12:13], s[0:1], 0x0
s_load_b64 s[10:11], s[0:1], 0x10
s_load_b32 s20, s[0:1], 0x20
v_mov_b32_... |
You are a helpful coding assistant specialized in converting HIP source code to AMD host assembly. | #include <hip/hip_runtime.h>
/**
* Compute the padding activation.
* @param x_shape the shape of the input buffer.
* @param x the input buffer.
* @param y_shape the shape of the output buffer.
* @param y the output buffer.
* @param value the padding value.
* @return nothing.
*/
extern "C"
__global__ void activation(lon... | .text
.file "pad_2d.hip"
.globl __device_stub__activation # -- Begin function __device_stub__activation
.p2align 4, 0x90
.type __device_stub__activation,@function
__device_stub__activation: # @__device_stub__activation
.cfi_startproc
# %bb.0:
subq $136, %rsp
.cfi_def_cfa_offset 144
movq %rdi, 88(%rsp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.