#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <cuda.h>
#include <math.h>
#include <cuda_profiler_api.h>

#define TRIALS 20

__global__ void kernel(int integer) 
{
	//Doesn't do anything
}

//Makes random array of floats
void initializeArray(float* arr, int nElements)
{
    srand(time(NULL));
    for( int i=0; i<nElements; i++)
        arr[i] = (float)(rand());
}

int main() 
{
	printf("Allocating memory and initializing arrays \n");

	//Allocate host memory
	float *hbytes = (float *)malloc(1073741824); //2^30
	initializeArray(hbytes, 268435456); //2^28

	//Allocate pinned host memory
	float *pbytes;	cudaMallocHost(&pbytes, 1073741824);
	initializeArray(pbytes, 268435456);

	//Allocate device memory
	float *dbytes;	cudaMalloc(&dbytes, 1073741824); 

	//Declare timing
	cudaEvent_t startIn, stopIn;
	cudaEventCreate(&startIn);
	cudaEventCreate(&stopIn);
	float inTime, inTimeTotal;

	// These for loops do the required copy operations 
	// Results averaged over number of trials

	printf("\nCopy to device using host memory \n");
	printf("For 2^0 to 2^30, in order: \n");

	for (int i=0; i<31; i++)
	{
		inTimeTotal = 0.0;

		for (int j=0; j<TRIALS; j++)
		{
			cudaEventRecord(startIn, 0);

			cudaMemcpy(dbytes,hbytes,(1<<i),cudaMemcpyHostToDevice);

			cudaEventRecord(stopIn, 0);
			cudaEventSynchronize(stopIn);
			cudaEventElapsedTime(&inTime, startIn, stopIn);

			inTimeTotal = inTimeTotal + inTime;
		}

		inTimeTotal = inTimeTotal/TRIALS;
		printf("%f \n", inTimeTotal);
	}

	printf("\nCopy to device using pinned memory \n");
	printf("For 2^0 to 2^30, in order: \n");

	for (int i=0; i<31; i++)
	{
		inTimeTotal = 0.0;

		for (int j=0; j<TRIALS; j++)
		{
			cudaEventRecord(startIn, 0);

			cudaMemcpy(dbytes,pbytes,(1<<i),cudaMemcpyHostToDevice);

			cudaEventRecord(stopIn, 0);
			cudaEventSynchronize(stopIn);
			cudaEventElapsedTime(&inTime, startIn, stopIn);

			inTimeTotal = inTimeTotal + inTime;
		}

		inTimeTotal = inTimeTotal/TRIALS;
		printf("%f \n", inTimeTotal);
	}

	printf("\nCopy from device using host memory \n");
	printf("For 2^0 to 2^30, in order: \n");

	for (int i=0; i<31; i++)
	{
		inTimeTotal = 0.0;

		for (int j=0; j<TRIALS; j++)
		{
			cudaEventRecord(startIn, 0);

			cudaMemcpy(hbytes,dbytes,(1<<i),cudaMemcpyDeviceToHost);

			cudaEventRecord(stopIn, 0);
			cudaEventSynchronize(stopIn);
			cudaEventElapsedTime(&inTime, startIn, stopIn);

			inTimeTotal = inTimeTotal + inTime;
		}

		inTimeTotal = inTimeTotal/TRIALS;
		printf("%f \n", inTimeTotal);
	}

	printf("\nCopy from device using pinned memory \n");
	printf("For 2^0 to 2^30, in order: \n");

	for (int i=0; i<31; i++)
	{
		inTimeTotal = 0.0;

		for (int j=0; j<TRIALS; j++)
		{
			cudaEventRecord(startIn, 0);

			cudaMemcpy(pbytes,dbytes,(1<<i),cudaMemcpyDeviceToHost);

			cudaEventRecord(stopIn, 0);
			cudaEventSynchronize(stopIn);
			cudaEventElapsedTime(&inTime, startIn, stopIn);

			inTimeTotal = inTimeTotal + inTime;
		}

		inTimeTotal = inTimeTotal/TRIALS;
		printf("%f \n", inTimeTotal);
	}

	cudaEventDestroy(startIn);
	cudaEventDestroy(stopIn);

	free(hbytes);
	cudaFree(dbytes);
	cudaFree(pbytes);

	return 0;

}

	.file	"tmpxft_002b3f4c_00000000-6_analysis.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3639:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3639:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z15initializeArrayPfi
	.type	_Z15initializeArrayPfi, @function
_Z15initializeArrayPfi:
.LFB3635:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	xorl	%edi, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
	call	time@PLT
	movl	%eax, %edi
	call	srand@PLT
.L3:
	cmpl	%ebx, %ebp
	jle	.L7
	call	rand@PLT
	cvtsi2ssl	%eax, %xmm0
	movss	%xmm0, (%r12,%rbx,4)
	incq	%rbx
	jmp	.L3
.L7:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3635:
	.size	_Z15initializeArrayPfi, .-_Z15initializeArrayPfi
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Allocating memory and initializing arrays \n"
.LC2:
	.string	"\nCopy to device using host memory \n"
.LC3:
	.string	"For 2^0 to 2^30, in order: \n"
.LC5:
	.string	"%f \n"
.LC6:
	.string	"\nCopy to device using pinned memory \n"
.LC7:
	.string	"\nCopy from device using host memory \n"
.LC8:
	.string	"\nCopy from device using pinned memory \n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB3636:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$1, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1073741824, %edi
	call	malloc@PLT
	movl	$268435456, %esi
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	_Z15initializeArrayPfi
	xorl	%edx, %edx
	leaq	40(%rsp), %rdi
	movl	$1073741824, %esi
	call	cudaHostAlloc@PLT
	movq	40(%rsp), %rdi
	movl	$268435456, %esi
	call	_Z15initializeArrayPfi
	movl	$1073741824, %esi
	leaq	48(%rsp), %rdi
	call	cudaMalloc@PLT
	leaq	56(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	64(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r12, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	leaq	36(%rsp), %rax
	movl	%r14d, %ebp
	xorps	%xmm0, %xmm0
	movl	%r13d, %ecx
	movq	%rax, 16(%rsp)
	sall	%cl, %ebp
	movl	$20, %r15d
	movslq	%ebp, %rbp
.L10:
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	movss	%xmm0, 28(%rsp)
	call	cudaEventRecord@PLT
	movq	8(%rsp), %rsi
	movq	48(%rsp), %rdi
	movq	%rbp, %rdx
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movq	64(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	64(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	64(%rsp), %rdx
	movq	56(%rsp), %rsi
	movq	16(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movss	28(%rsp), %xmm0
	addss	36(%rsp), %xmm0
	decl	%r15d
	jne	.L10
	leaq	.LC5(%rip), %rbp
	movl	$2, %edi
	movb	$1, %al
	incl	%r13d
	movq	%rbp, %rsi
	divss	.LC4(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	cmpl	$31, %r13d
	jne	.L9
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	movl	$1, %r15d
	leaq	.LC6(%rip), %rsi
	call	__printf_chk@PLT
	movq	%r12, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L12:
	movl	%r15d, %r14d
	movl	%r13d, %ecx
	xorps	%xmm0, %xmm0
	movl	$20, %ebx
	sall	%cl, %r14d
	movslq	%r14d, %r14
.L13:
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	movss	%xmm0, 28(%rsp)
	call	cudaEventRecord@PLT
	movq	40(%rsp), %rsi
	movq	48(%rsp), %rdi
	movq	%r14, %rdx
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movq	64(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	64(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	64(%rsp), %rdx
	movq	56(%rsp), %rsi
	movq	16(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movss	28(%rsp), %xmm0
	addss	36(%rsp), %xmm0
	decl	%ebx
	jne	.L13
	movq	%rbp, %rsi
	movl	$2, %edi
	movb	$1, %al
	incl	%r13d
	divss	.LC4(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	cmpl	$31, %r13d
	jne	.L12
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	movl	$1, %r15d
	leaq	.LC7(%rip), %rsi
	call	__printf_chk@PLT
	movq	%r12, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L15:
	movl	%r15d, %r14d
	movl	%r13d, %ecx
	xorps	%xmm0, %xmm0
	movl	$20, %ebx
	sall	%cl, %r14d
	movslq	%r14d, %r14
.L16:
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	movss	%xmm0, 28(%rsp)
	call	cudaEventRecord@PLT
	movq	48(%rsp), %rsi
	movq	8(%rsp), %rdi
	movq	%r14, %rdx
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	64(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	64(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	64(%rsp), %rdx
	movq	56(%rsp), %rsi
	movq	16(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movss	28(%rsp), %xmm0
	addss	36(%rsp), %xmm0
	decl	%ebx
	jne	.L16
	movq	%rbp, %rsi
	movl	$2, %edi
	movb	$1, %al
	incl	%r13d
	divss	.LC4(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	cmpl	$31, %r13d
	jne	.L15
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	movl	$1, %r14d
	call	__printf_chk@PLT
	movq	%r12, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%r12d, %r12d
.L18:
	movl	%r14d, %r13d
	movl	%r12d, %ecx
	xorps	%xmm0, %xmm0
	movl	$20, %r15d
	sall	%cl, %r13d
	movslq	%r13d, %r13
.L19:
	movq	56(%rsp), %rdi
	xorl	%esi, %esi
	movss	%xmm0, 28(%rsp)
	call	cudaEventRecord@PLT
	movq	48(%rsp), %rsi
	movq	40(%rsp), %rdi
	movq	%r13, %rdx
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	64(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	64(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	64(%rsp), %rdx
	movq	56(%rsp), %rsi
	movq	16(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	movss	28(%rsp), %xmm0
	addss	36(%rsp), %xmm0
	decl	%r15d
	jne	.L19
	movq	%rbp, %rsi
	movl	$2, %edi
	movb	$1, %al
	incl	%r12d
	divss	.LC4(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	cmpl	$31, %r12d
	jne	.L18
	movq	56(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	64(%rsp), %rdi
	call	cudaEventDestroy@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	addq	$88, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3636:
	.size	main, .-main
	.text
	.globl	_Z24__device_stub__Z6kernelii
	.type	_Z24__device_stub__Z6kernelii, @function
_Z24__device_stub__Z6kernelii:
.LFB3661:
	.cfi_startproc
	endbr64
	subq	$104, %rsp
	.cfi_def_cfa_offset 112
	movl	%edi, 12(%rsp)
	leaq	24(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	44(%rsp), %rsi
	leaq	32(%rsp), %rdi
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rax
	movl	$1, 40(%rsp)
	movq	%rax, 80(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 32(%rsp)
	movq	%rax, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L27
	pushq	24(%rsp)
	.cfi_def_cfa_offset 120
	leaq	_Z6kerneli(%rip), %rdi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 128
	movq	60(%rsp), %rcx
	movl	68(%rsp), %r8d
	movq	48(%rsp), %rsi
	movl	56(%rsp), %edx
	leaq	96(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 120
	popq	%rdx
	.cfi_def_cfa_offset 112
.L27:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	addq	$104, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3661:
	.size	_Z24__device_stub__Z6kernelii, .-_Z24__device_stub__Z6kernelii
	.globl	_Z6kerneli
	.type	_Z6kerneli, @function
_Z6kerneli:
.LFB3662:
	.cfi_startproc
	endbr64
	jmp	_Z24__device_stub__Z6kernelii
	.cfi_endproc
.LFE3662:
	.size	_Z6kerneli, .-_Z6kerneli
	.section	.rodata.str1.1
.LC9:
	.string	"_Z6kerneli"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3664:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC9(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z6kerneli(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE3664:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC4:
	.long	1101004800
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <math.h>
#include <hip/hip_runtime_api.h>

#define TRIALS 20

__global__ void kernel(int integer) 
{
	//Doesn't do anything
}

//Makes random array of floats
void initializeArray(float* arr, int nElements)
{
    srand(time(NULL));
    for( int i=0; i<nElements; i++)
        arr[i] = (float)(rand());
}

int main() 
{
	printf("Allocating memory and initializing arrays \n");

	//Allocate host memory
	float *hbytes = (float *)malloc(1073741824); //2^30
	initializeArray(hbytes, 268435456); //2^28

	//Allocate pinned host memory
	float *pbytes;	hipHostMalloc(&pbytes, 1073741824, hipHostMallocDefault);
	initializeArray(pbytes, 268435456);

	//Allocate device memory
	float *dbytes;	hipMalloc(&dbytes, 1073741824); 

	//Declare timing
	hipEvent_t startIn, stopIn;
	hipEventCreate(&startIn);
	hipEventCreate(&stopIn);
	float inTime, inTimeTotal;

	// These for loops do the required copy operations 
	// Results averaged over number of trials

	printf("\nCopy to device using host memory \n");
	printf("For 2^0 to 2^30, in order: \n");

	for (int i=0; i<31; i++)
	{
		inTimeTotal = 0.0;

		for (int j=0; j<TRIALS; j++)
		{
			hipEventRecord(startIn, 0);

			hipMemcpy(dbytes,hbytes,(1<<i),hipMemcpyHostToDevice);

			hipEventRecord(stopIn, 0);
			hipEventSynchronize(stopIn);
			hipEventElapsedTime(&inTime, startIn, stopIn);

			inTimeTotal = inTimeTotal + inTime;
		}

		inTimeTotal = inTimeTotal/TRIALS;
		printf("%f \n", inTimeTotal);
	}

	printf("\nCopy to device using pinned memory \n");
	printf("For 2^0 to 2^30, in order: \n");

	for (int i=0; i<31; i++)
	{
		inTimeTotal = 0.0;

		for (int j=0; j<TRIALS; j++)
		{
			hipEventRecord(startIn, 0);

			hipMemcpy(dbytes,pbytes,(1<<i),hipMemcpyHostToDevice);

			hipEventRecord(stopIn, 0);
			hipEventSynchronize(stopIn);
			hipEventElapsedTime(&inTime, startIn, stopIn);

			inTimeTotal = inTimeTotal + inTime;
		}

		inTimeTotal = inTimeTotal/TRIALS;
		printf("%f \n", inTimeTotal);
	}

	printf("\nCopy from device using host memory \n");
	printf("For 2^0 to 2^30, in order: \n");

	for (int i=0; i<31; i++)
	{
		inTimeTotal = 0.0;

		for (int j=0; j<TRIALS; j++)
		{
			hipEventRecord(startIn, 0);

			hipMemcpy(hbytes,dbytes,(1<<i),hipMemcpyDeviceToHost);

			hipEventRecord(stopIn, 0);
			hipEventSynchronize(stopIn);
			hipEventElapsedTime(&inTime, startIn, stopIn);

			inTimeTotal = inTimeTotal + inTime;
		}

		inTimeTotal = inTimeTotal/TRIALS;
		printf("%f \n", inTimeTotal);
	}

	printf("\nCopy from device using pinned memory \n");
	printf("For 2^0 to 2^30, in order: \n");

	for (int i=0; i<31; i++)
	{
		inTimeTotal = 0.0;

		for (int j=0; j<TRIALS; j++)
		{
			hipEventRecord(startIn, 0);

			hipMemcpy(pbytes,dbytes,(1<<i),hipMemcpyDeviceToHost);

			hipEventRecord(stopIn, 0);
			hipEventSynchronize(stopIn);
			hipEventElapsedTime(&inTime, startIn, stopIn);

			inTimeTotal = inTimeTotal + inTime;
		}

		inTimeTotal = inTimeTotal/TRIALS;
		printf("%f \n", inTimeTotal);
	}

	hipEventDestroy(startIn);
	hipEventDestroy(stopIn);

	free(hbytes);
	hipFree(dbytes);
	hipFree(pbytes);

	return 0;

}

	.text
	.file	"analysis.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_Z21__device_stub__kerneli      # -- Begin function _Z21__device_stub__kerneli
	.type	_Z21__device_stub__kerneli,@function
_Z21__device_stub__kerneli:             # @_Z21__device_stub__kerneli
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	12(%rsp), %rax
	movl	%edi, (%rax)
	leaq	16(%rsp), %rbx
	movq	%rax, (%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	40(%rsp), %r12
	leaq	32(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z6kerneli, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z21__device_stub__kerneli, .Lfunc_end0-_Z21__device_stub__kerneli
	.cfi_endproc
                                        # -- End function
	.globl	_Z15initializeArrayPfi          # -- Begin function _Z15initializeArrayPfi
	.type	_Z15initializeArrayPfi,@function
_Z15initializeArrayPfi:                 # @_Z15initializeArrayPfi
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%esi, %ebp
	movq	%rdi, %rbx
	xorl	%edi, %edi
	callq	time
	movl	%eax, %edi
	callq	srand
	testl	%ebp, %ebp
	jle	.LBB1_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%ebp, %r14d
	xorl	%r15d, %r15d
.LBB1_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, (%rbx,%r15,4)
	incq	%r15
	cmpq	%r15, %r14
	jne	.LBB1_2
.LBB1_3:                                # %._crit_edge
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z15initializeArrayPfi, .Lfunc_end1-_Z15initializeArrayPfi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI2_0:
	.long	0x41a00000                      # float 20
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$1073741824, %edi               # imm = 0x40000000
	callq	malloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	$268435456, %esi                # imm = 0x10000000
	callq	_Z15initializeArrayPfi
	leaq	40(%rsp), %r15
	xorl	%r14d, %r14d
	movl	$1073741824, %esi               # imm = 0x40000000
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	hipHostMalloc
	movq	(%r15), %rdi
	movl	$268435456, %esi                # imm = 0x10000000
	callq	_Z15initializeArrayPfi
	leaq	32(%rsp), %rdi
	movl	$1073741824, %esi               # imm = 0x40000000
	callq	hipMalloc
	leaq	24(%rsp), %rdi
	callq	hipEventCreate
	leaq	16(%rsp), %rdi
	callq	hipEventCreate
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	movl	$.Lstr.8, %edi
	callq	puts@PLT
	leaq	12(%rsp), %r15
.LBB2_1:                                # %.preheader54
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_2 Depth 2
	movl	$1, %r12d
	movl	%r14d, %ecx
	shll	%cl, %r12d
	xorps	%xmm0, %xmm0
	movl	$20, %ebp
.LBB2_2:                                #   Parent Loop BB2_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	32(%rsp), %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdx
	movq	%r15, %rdi
	callq	hipEventElapsedTime
	movss	8(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	addss	12(%rsp), %xmm0
	decl	%ebp
	jne	.LBB2_2
# %bb.3:                                #   in Loop: Header=BB2_1 Depth=1
	divss	.LCPI2_0(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	incl	%r14d
	cmpl	$31, %r14d
	jne	.LBB2_1
# %bb.4:
	movl	$.Lstr.3, %edi
	callq	puts@PLT
	movl	$.Lstr.8, %edi
	callq	puts@PLT
	xorl	%r14d, %r14d
	leaq	12(%rsp), %r15
.LBB2_5:                                # %.preheader53
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_6 Depth 2
	movl	$1, %r12d
	movl	%r14d, %ecx
	shll	%cl, %r12d
	xorps	%xmm0, %xmm0
	movl	$20, %ebp
.LBB2_6:                                #   Parent Loop BB2_5 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	32(%rsp), %rdi
	movq	40(%rsp), %rsi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdx
	movq	%r15, %rdi
	callq	hipEventElapsedTime
	movss	8(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	addss	12(%rsp), %xmm0
	decl	%ebp
	jne	.LBB2_6
# %bb.7:                                #   in Loop: Header=BB2_5 Depth=1
	divss	.LCPI2_0(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	incl	%r14d
	cmpl	$31, %r14d
	jne	.LBB2_5
# %bb.8:
	movl	$.Lstr.5, %edi
	callq	puts@PLT
	movl	$.Lstr.8, %edi
	callq	puts@PLT
	xorl	%r14d, %r14d
	leaq	12(%rsp), %r15
.LBB2_9:                                # %.preheader52
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_10 Depth 2
	movl	$1, %r12d
	movl	%r14d, %ecx
	shll	%cl, %r12d
	xorps	%xmm0, %xmm0
	movl	$20, %ebp
.LBB2_10:                               #   Parent Loop BB2_9 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	32(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdx
	movq	%r15, %rdi
	callq	hipEventElapsedTime
	movss	8(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	addss	12(%rsp), %xmm0
	decl	%ebp
	jne	.LBB2_10
# %bb.11:                               #   in Loop: Header=BB2_9 Depth=1
	divss	.LCPI2_0(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	incl	%r14d
	cmpl	$31, %r14d
	jne	.LBB2_9
# %bb.12:
	movl	$.Lstr.7, %edi
	callq	puts@PLT
	movl	$.Lstr.8, %edi
	callq	puts@PLT
	xorl	%r14d, %r14d
	leaq	12(%rsp), %r15
.LBB2_13:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_14 Depth 2
	movl	$1, %r12d
	movl	%r14d, %ecx
	shll	%cl, %r12d
	xorps	%xmm0, %xmm0
	movl	$20, %ebp
.LBB2_14:                               #   Parent Loop BB2_13 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	40(%rsp), %rdi
	movq	32(%rsp), %rsi
	movq	%r12, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	24(%rsp), %rsi
	movq	16(%rsp), %rdx
	movq	%r15, %rdi
	callq	hipEventElapsedTime
	movss	8(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	addss	12(%rsp), %xmm0
	decl	%ebp
	jne	.LBB2_14
# %bb.15:                               #   in Loop: Header=BB2_13 Depth=1
	divss	.LCPI2_0(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	incl	%r14d
	cmpl	$31, %r14d
	jne	.LBB2_13
# %bb.16:
	movq	24(%rsp), %rdi
	callq	hipEventDestroy
	movq	16(%rsp), %rdi
	callq	hipEventDestroy
	movq	%rbx, %rdi
	callq	free
	movq	32(%rsp), %rdi
	callq	hipFree
	movq	40(%rsp), %rdi
	callq	hipFree
	xorl	%eax, %eax
	addq	$48, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	main, .Lfunc_end2-main
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB3_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB3_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z6kerneli, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end3:
	.size	__hip_module_ctor, .Lfunc_end3-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB4_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB4_2:
	retq
.Lfunc_end4:
	.size	__hip_module_dtor, .Lfunc_end4-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z6kerneli,@object              # @_Z6kerneli
	.section	.rodata,"a",@progbits
	.globl	_Z6kerneli
	.p2align	3, 0x0
_Z6kerneli:
	.quad	_Z21__device_stub__kerneli
	.size	_Z6kerneli, 8

	.type	.L.str.3,@object                # @.str.3
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.3:
	.asciz	"%f \n"
	.size	.L.str.3, 5

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z6kerneli"
	.size	.L__unnamed_1, 11

	.type	__hip_fatbin_wrapper,@object    # @__hip_fatbin_wrapper
	.section	.hipFatBinSegment,"a",@progbits
	.p2align	3, 0x0
__hip_fatbin_wrapper:
	.long	1212764230                      # 0x48495046
	.long	1                               # 0x1
	.quad	__hip_fatbin
	.quad	0
	.size	__hip_fatbin_wrapper, 24

	.type	__hip_gpubin_handle,@object     # @__hip_gpubin_handle
	.local	__hip_gpubin_handle
	.comm	__hip_gpubin_handle,8,8
	.section	.init_array,"aw",@init_array
	.p2align	3, 0x0
	.quad	__hip_module_ctor
	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"Allocating memory and initializing arrays "
	.size	.Lstr, 43

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"\nCopy to device using host memory "
	.size	.Lstr.1, 35

	.type	.Lstr.3,@object                 # @str.3
.Lstr.3:
	.asciz	"\nCopy to device using pinned memory "
	.size	.Lstr.3, 37

	.type	.Lstr.5,@object                 # @str.5
.Lstr.5:
	.asciz	"\nCopy from device using host memory "
	.size	.Lstr.5, 37

	.type	.Lstr.7,@object                 # @str.7
.Lstr.7:
	.asciz	"\nCopy from device using pinned memory "
	.size	.Lstr.7, 39

	.type	.Lstr.8,@object                 # @str.8
.Lstr.8:
	.asciz	"For 2^0 to 2^30, in order: "
	.size	.Lstr.8, 28

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _Z21__device_stub__kerneli
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z6kerneli
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z6kerneli              ; -- Begin function _Z6kerneli
	.globl	_Z6kerneli
	.p2align	8
	.type	_Z6kerneli,@function
_Z6kerneli:                             ; @_Z6kerneli
; %bb.0:
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z6kerneli
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 4
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 1
		.amdhsa_next_free_sgpr 1
		.amdhsa_reserve_vcc 0
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z6kerneli, .Lfunc_end0-_Z6kerneli
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 4
; NumSgprs: 0
; NumVgprs: 0
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 1
; NumVGPRsForWavesPerEU: 1
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 4
    .kernarg_segment_size: 4
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z6kerneli
    .private_segment_fixed_size: 0
    .sgpr_count:     0
    .sgpr_spill_count: 0
    .symbol:         _Z6kerneli.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     0
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
