//Juliana Brown 
//Student Number: 20010601

#include "cuda_runtime.h"
#include <iostream>
#include <memory>
#include <string>
#include <cuda.h>
#include <stdio.h>

//Machine Problem 1: Code identifies number and type of CUDA devices on GPU servers,
//clock rate, streaming multiprocessors, cores, warp sizes ect.


int main(int argc, char **argv) {
	
	// number of GPU devices the support CUDA
	int deviceCount = 0;
	cudaError_t error_id = cudaGetDeviceCount(&deviceCount);

	if (deviceCount == 0) {
		printf("There are no devices that support CUDA\n");
	}
	else {
		printf("Detected %d CUDA Capable devices\n", deviceCount);
	}

	int dev; 

	for (dev = 0; dev < deviceCount; ++dev) {
		cudaSetDevice(dev);
		cudaDeviceProp dp;
		cudaGetDeviceProperties(&dp, dev);

		//device type
		printf("\ nDevice Name %d: \"%s\"\n", dev, dp.name);

		//clock rate
		printf(
			"  GPU Max Clock rate: %.0f MHz (%0.2f GHz)\n",
			dp.clockRate * 1e-3f, dp.clockRate * 1e-6f);
		
		//number of streaming multiprocessors & Cores

		printf("  Multiprocessors: %2d \n", dp.multiProcessorCount);

		//number of cores
		//printf(" CUDA Cores %d \n"
			//_ConvertSMVer2Cores(dp.major, dp.minor) *dp.multiProcessorCount);
		int cores = 0; 
		int mp = dp.multiProcessorCount;

		switch (dp.major) {
		case 2:
			if (dp.minor == 1) cores = mp * 48;
			else cores = mp * 32; 
			break;
		case 3: 
			cores = mp * 192;
			break;
		case 5: // Maxwell
			cores = mp * 128;
			break;
		case 6: // Pascal
			if ((dp.minor == 1) || (dp.minor == 2)) cores = mp * 128;
			else if (dp.minor == 0) cores = mp * 64;
			break;
		case 7: // Volta and Turing
			if ((dp.minor == 0) || (dp.minor == 5)) cores = mp * 64;
			break;
		
		}
	printf("  Number of cores is: %d\n", cores);

		//warp size
		printf("  Warp size: %d\n", 
			dp.warpSize);

		//amount of global memory
		printf("  Total amount of global memory:                 %.0f MBytes "
			"(%llu bytes)\n",
			static_cast<float>(dp.totalGlobalMem / 1048576.0f),
			(unsigned long long)dp.totalGlobalMem);

		//amount of constant memory
		printf("  Total amount of constant memory: %zu bytes\n",
			dp.totalConstMem);

		//amount of shared memory per block
		printf("  Total amount of shared memory per block: %zu bytes\n",
			dp.sharedMemPerBlock);

		//amount of registers available per block
		printf("  Total number of registers available per block: %d\n",
			dp.regsPerBlock);

		//maximum number of threads per block
		printf("  Total number of threads available per block : %d\n",
			dp.maxThreadsPerBlock);
		
		//maximum dimension of each block
		printf("  Max dimension of a block (x,y,z): (%d, %d, %d)\n",
			dp.maxThreadsDim[0], dp.maxThreadsDim[1],
			dp.maxThreadsDim[2]);

		//max size of dimension of a grid
		printf("  Max dimension of a grid size (x,y,z): (%d, %d, %d)\n",
			dp.maxGridSize[0], dp.maxGridSize[1],
			dp.maxGridSize[2]);

	}

}


	.file	"tmpxft_00381535_00000000-6_MachineProblem1.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4282:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4282:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"There are no devices that support CUDA\n"
.LC1:
	.string	"Detected %d CUDA Capable devices\n"
.LC2:
	.string	" nDevice Name %d: \"%s\"\n"
.LC5:
	.string	"  GPU Max Clock rate: %.0f MHz (%0.2f GHz)\n"
.LC6:
	.string	"  Multiprocessors: %2d \n"
.LC7:
	.string	"  Number of cores is: %d\n"
.LC8:
	.string	"  Warp size: %d\n"
.LC10:
	.string	"  Total amount of global memory:                 %.0f MBytes (%llu bytes)\n"
.LC11:
	.string	"  Total amount of constant memory: %zu bytes\n"
.LC12:
	.string	"  Total amount of shared memory per block: %zu bytes\n"
.LC13:
	.string	"  Total number of registers available per block: %d\n"
.LC14:
	.string	"  Total number of threads available per block : %d\n"
.LC15:
	.string	"  Max dimension of a block (x,y,z): (%d, %d, %d)\n"
.LC16:
	.string	"  Max dimension of a grid size (x,y,z): (%d, %d, %d)\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB4279:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$1056, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1048(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdi
	xorl	%eax, %eax
	movl	%eax, 12(%rsp)
	call	cudaGetDeviceCount@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jne	.L3
	leaq	.LC0(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %rbp
	jmp	.L4
.L3:
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L12:
	pslld	$5, %xmm0
	cmpl	$1, 380(%rsp)
	movd	%xmm0, %edx
	jne	.L6
	imull	$48, %ecx, %edx
.L6:
	leaq	.LC7(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	324(%rsp), %edx
	leaq	.LC8(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	304(%rsp), %rdx
	testq	%rdx, %rdx
	js	.L16
	cvtsi2ssq	%rdx, %xmm0
.L17:
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	incl	%ebx
	mulss	.LC9(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	movl	$2, %edi
	xorl	%eax, %eax
	movq	368(%rsp), %rdx
	leaq	.LC11(%rip), %rsi
	call	__printf_chk@PLT
	movq	312(%rsp), %rdx
	leaq	.LC12(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	320(%rsp), %edx
	leaq	.LC13(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	336(%rsp), %edx
	leaq	.LC14(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	348(%rsp), %r8d
	xorl	%eax, %eax
	movl	344(%rsp), %ecx
	movl	340(%rsp), %edx
	leaq	.LC15(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	360(%rsp), %r8d
	xorl	%eax, %eax
	movl	356(%rsp), %ecx
	movl	352(%rsp), %edx
	leaq	.LC16(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
.L4:
	cmpl	%ebx, 12(%rsp)
	jle	.L32
	movl	%ebx, %edi
	leaq	16(%rsp), %r12
	call	cudaSetDevice@PLT
	movl	%ebx, %esi
	movq	%r12, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	movq	%r12, %rcx
	movl	%ebx, %edx
	movq	%rbp, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movss	.LC3(%rip), %xmm1
	leaq	.LC5(%rip), %rsi
	movb	$2, %al
	cvtsi2ssl	364(%rsp), %xmm0
	movl	$2, %edi
	mulss	%xmm0, %xmm1
	mulss	.LC4(%rip), %xmm0
	cvtss2sd	%xmm1, %xmm1
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	movl	$2, %edi
	xorl	%eax, %eax
	movl	404(%rsp), %edx
	leaq	.LC6(%rip), %rsi
	call	__printf_chk@PLT
	movl	376(%rsp), %eax
	movd	404(%rsp), %xmm0
	movd	%xmm0, %ecx
	subl	$2, %eax
	cmpl	$5, %eax
	ja	.L20
	leaq	.L8(%rip), %rdx
	movslq	(%rdx,%rax,4), %rax
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L8:
	.long	.L12-.L8
	.long	.L11-.L8
	.long	.L20-.L8
	.long	.L28-.L8
	.long	.L9-.L8
	.long	.L7-.L8
	.section	.text.startup
.L11:
	imull	$192, %ecx, %edx
	jmp	.L6
.L9:
	movl	380(%rsp), %eax
	leal	-1(%rax), %edx
	cmpl	$1, %edx
	ja	.L14
.L28:
	pslld	$7, %xmm0
	jmp	.L26
.L14:
	xorl	%edx, %edx
	testl	%eax, %eax
.L30:
	jne	.L6
.L27:
	pslld	$6, %xmm0
.L26:
	movd	%xmm0, %edx
	jmp	.L6
.L7:
	movl	380(%rsp), %eax
	testl	%eax, %eax
	je	.L27
	xorl	%edx, %edx
	cmpl	$5, %eax
	jmp	.L30
.L20:
	xorl	%edx, %edx
	jmp	.L6
.L16:
	movq	%rdx, %rax
	movq	%rdx, %rcx
	shrq	%rax
	andl	$1, %ecx
	orq	%rcx, %rax
	cvtsi2ssq	%rax, %xmm0
	addss	%xmm0, %xmm0
	jmp	.L17
.L32:
	movq	1048(%rsp), %rax
	subq	%fs:40, %rax
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	addq	$1056, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4279:
	.size	main, .-main
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4305:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4305:
	.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
.LC3:
	.long	897988541
	.align 4
.LC4:
	.long	981668463
	.align 4
.LC9:
	.long	897581056
	.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:

//Juliana Brown 
//Student Number: 20010601

#include "hip/hip_runtime.h"
#include <iostream>
#include <memory>
#include <string>

#include <stdio.h>

//Machine Problem 1: Code identifies number and type of CUDA devices on GPU servers,
//clock rate, streaming multiprocessors, cores, warp sizes ect.


int main(int argc, char **argv) {
	
	// number of GPU devices the support CUDA
	int deviceCount = 0;
	hipError_t error_id = hipGetDeviceCount(&deviceCount);

	if (deviceCount == 0) {
		printf("There are no devices that support CUDA\n");
	}
	else {
		printf("Detected %d CUDA Capable devices\n", deviceCount);
	}

	int dev; 

	for (dev = 0; dev < deviceCount; ++dev) {
		hipSetDevice(dev);
		hipDeviceProp_t dp;
		hipGetDeviceProperties(&dp, dev);

		//device type
		printf("\ nDevice Name %d: \"%s\"\n", dev, dp.name);

		//clock rate
		printf(
			"  GPU Max Clock rate: %.0f MHz (%0.2f GHz)\n",
			dp.clockRate * 1e-3f, dp.clockRate * 1e-6f);
		
		//number of streaming multiprocessors & Cores

		printf("  Multiprocessors: %2d \n", dp.multiProcessorCount);

		//number of cores
		//printf(" CUDA Cores %d \n"
			//_ConvertSMVer2Cores(dp.major, dp.minor) *dp.multiProcessorCount);
		int cores = 0; 
		int mp = dp.multiProcessorCount;

		switch (dp.major) {
		case 2:
			if (dp.minor == 1) cores = mp * 48;
			else cores = mp * 32; 
			break;
		case 3: 
			cores = mp * 192;
			break;
		case 5: // Maxwell
			cores = mp * 128;
			break;
		case 6: // Pascal
			if ((dp.minor == 1) || (dp.minor == 2)) cores = mp * 128;
			else if (dp.minor == 0) cores = mp * 64;
			break;
		case 7: // Volta and Turing
			if ((dp.minor == 0) || (dp.minor == 5)) cores = mp * 64;
			break;
		
		}
	printf("  Number of cores is: %d\n", cores);

		//warp size
		printf("  Warp size: %d\n", 
			dp.warpSize);

		//amount of global memory
		printf("  Total amount of global memory:                 %.0f MBytes "
			"(%llu bytes)\n",
			static_cast<float>(dp.totalGlobalMem / 1048576.0f),
			(unsigned long long)dp.totalGlobalMem);

		//amount of constant memory
		printf("  Total amount of constant memory: %zu bytes\n",
			dp.totalConstMem);

		//amount of shared memory per block
		printf("  Total amount of shared memory per block: %zu bytes\n",
			dp.sharedMemPerBlock);

		//amount of registers available per block
		printf("  Total number of registers available per block: %d\n",
			dp.regsPerBlock);

		//maximum number of threads per block
		printf("  Total number of threads available per block : %d\n",
			dp.maxThreadsPerBlock);
		
		//maximum dimension of each block
		printf("  Max dimension of a block (x,y,z): (%d, %d, %d)\n",
			dp.maxThreadsDim[0], dp.maxThreadsDim[1],
			dp.maxThreadsDim[2]);

		//max size of dimension of a grid
		printf("  Max dimension of a grid size (x,y,z): (%d, %d, %d)\n",
			dp.maxGridSize[0], dp.maxGridSize[1],
			dp.maxGridSize[2]);

	}

}


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

                                        # End of file scope inline assembly
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI0_0:
	.long	0x3a83126f                      # float 0.00100000005
.LCPI0_1:
	.long	0x358637bd                      # float 9.99999997E-7
.LCPI0_2:
	.long	0x35800000                      # float 9.53674316E-7
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$1488, %rsp                     # imm = 0x5D0
	.cfi_def_cfa_offset 1520
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %rbp, -16
	leaq	12(%rsp), %rbx
	movl	$0, (%rbx)
	movq	%rbx, %rdi
	callq	hipGetDeviceCount
	movl	(%rbx), %esi
	testl	%esi, %esi
	je	.LBB0_2
# %bb.1:
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printf
	jmp	.LBB0_3
.LBB0_2:
	movl	$.Lstr, %edi
	callq	puts@PLT
.LBB0_3:
	cmpl	$0, 12(%rsp)
	jle	.LBB0_23
# %bb.4:                                # %.lr.ph
	xorl	%r14d, %r14d
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
.LBB0_5:                                # =>This Inner Loop Header: Depth=1
	movl	%ebp, %edi
	callq	hipSetDevice
	movq	%rbx, %rdi
	movl	%ebp, %esi
	callq	hipGetDevicePropertiesR0600
	movl	$.L.str.2, %edi
	movl	%ebp, %esi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	printf
	cvtsi2ssl	364(%rsp), %xmm1
	movaps	%xmm1, %xmm0
	mulss	.LCPI0_0(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	mulss	.LCPI0_1(%rip), %xmm1
	cvtss2sd	%xmm1, %xmm1
	movl	$.L.str.3, %edi
	movb	$2, %al
	callq	printf
	movl	404(%rsp), %esi
	movl	$.L.str.4, %edi
	xorl	%eax, %eax
	callq	printf
	movl	376(%rsp), %ecx
	addl	$-2, %ecx
	movl	$0, %esi
	cmpl	$5, %ecx
	ja	.LBB0_19
# %bb.6:                                #   in Loop: Header=BB0_5 Depth=1
	movl	404(%rsp), %eax
	xorl	%esi, %esi
	jmpq	*.LJTI0_0(,%rcx,8)
.LBB0_7:                                #   in Loop: Header=BB0_5 Depth=1
	cmpl	$1, 380(%rsp)
	jne	.LBB0_16
# %bb.8:                                #   in Loop: Header=BB0_5 Depth=1
	shll	$4, %eax
	jmp	.LBB0_9
.LBB0_10:                               #   in Loop: Header=BB0_5 Depth=1
	shll	$6, %eax
.LBB0_9:                                #   in Loop: Header=BB0_5 Depth=1
	leal	(%rax,%rax,2), %esi
	jmp	.LBB0_19
.LBB0_11:                               #   in Loop: Header=BB0_5 Depth=1
	movl	380(%rsp), %ecx
	leal	-1(%rcx), %edx
	cmpl	$1, %edx
	ja	.LBB0_17
.LBB0_12:                               #   in Loop: Header=BB0_5 Depth=1
	shll	$7, %eax
	jmp	.LBB0_18
.LBB0_13:                               #   in Loop: Header=BB0_5 Depth=1
	movl	380(%rsp), %ecx
	cmpl	$5, %ecx
	je	.LBB0_15
# %bb.14:                               #   in Loop: Header=BB0_5 Depth=1
	movl	$0, %esi
	testl	%ecx, %ecx
	jne	.LBB0_19
.LBB0_15:                               #   in Loop: Header=BB0_5 Depth=1
	shll	$6, %eax
	jmp	.LBB0_18
.LBB0_16:                               #   in Loop: Header=BB0_5 Depth=1
	shll	$5, %eax
	jmp	.LBB0_18
.LBB0_17:                               #   in Loop: Header=BB0_5 Depth=1
	shll	$6, %eax
	testl	%ecx, %ecx
	cmovnel	%r14d, %eax
.LBB0_18:                               #   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %esi
.LBB0_19:                               #   in Loop: Header=BB0_5 Depth=1
	movl	$.L.str.5, %edi
	xorl	%eax, %eax
	callq	printf
	movl	324(%rsp), %esi
	movl	$.L.str.6, %edi
	xorl	%eax, %eax
	callq	printf
	movq	304(%rsp), %rsi
	testq	%rsi, %rsi
	js	.LBB0_21
# %bb.20:                               #   in Loop: Header=BB0_5 Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rsi, %xmm0
	jmp	.LBB0_22
.LBB0_21:                               #   in Loop: Header=BB0_5 Depth=1
	movq	%rsi, %rax
	shrq	%rax
	movl	%esi, %ecx
	andl	$1, %ecx
	orq	%rax, %rcx
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rcx, %xmm0
	addss	%xmm0, %xmm0
.LBB0_22:                               #   in Loop: Header=BB0_5 Depth=1
	mulss	.LCPI0_2(%rip), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.7, %edi
	movb	$1, %al
	callq	printf
	movq	368(%rsp), %rsi
	movl	$.L.str.8, %edi
	xorl	%eax, %eax
	callq	printf
	movq	312(%rsp), %rsi
	movl	$.L.str.9, %edi
	xorl	%eax, %eax
	callq	printf
	movl	320(%rsp), %esi
	movl	$.L.str.10, %edi
	xorl	%eax, %eax
	callq	printf
	movl	336(%rsp), %esi
	movl	$.L.str.11, %edi
	xorl	%eax, %eax
	callq	printf
	movl	340(%rsp), %esi
	movl	344(%rsp), %edx
	movl	348(%rsp), %ecx
	movl	$.L.str.12, %edi
	xorl	%eax, %eax
	callq	printf
	movl	352(%rsp), %esi
	movl	356(%rsp), %edx
	movl	360(%rsp), %ecx
	movl	$.L.str.13, %edi
	xorl	%eax, %eax
	callq	printf
	incl	%ebp
	cmpl	12(%rsp), %ebp
	jl	.LBB0_5
.LBB0_23:                               # %._crit_edge
	xorl	%eax, %eax
	addq	$1488, %rsp                     # imm = 0x5D0
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	main, .Lfunc_end0-main
	.cfi_endproc
	.section	.rodata,"a",@progbits
	.p2align	3, 0x0
.LJTI0_0:
	.quad	.LBB0_7
	.quad	.LBB0_10
	.quad	.LBB0_19
	.quad	.LBB0_12
	.quad	.LBB0_11
	.quad	.LBB0_13
                                        # -- End function
	.type	.L.str.1,@object                # @.str.1
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.1:
	.asciz	"Detected %d CUDA Capable devices\n"
	.size	.L.str.1, 34

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	" nDevice Name %d: \"%s\"\n"
	.size	.L.str.2, 24

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"  GPU Max Clock rate: %.0f MHz (%0.2f GHz)\n"
	.size	.L.str.3, 44

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"  Multiprocessors: %2d \n"
	.size	.L.str.4, 25

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"  Number of cores is: %d\n"
	.size	.L.str.5, 26

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"  Warp size: %d\n"
	.size	.L.str.6, 17

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"  Total amount of global memory:                 %.0f MBytes (%llu bytes)\n"
	.size	.L.str.7, 75

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"  Total amount of constant memory: %zu bytes\n"
	.size	.L.str.8, 46

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"  Total amount of shared memory per block: %zu bytes\n"
	.size	.L.str.9, 54

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"  Total number of registers available per block: %d\n"
	.size	.L.str.10, 53

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"  Total number of threads available per block : %d\n"
	.size	.L.str.11, 52

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"  Max dimension of a block (x,y,z): (%d, %d, %d)\n"
	.size	.L.str.12, 50

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"  Max dimension of a grid size (x,y,z): (%d, %d, %d)\n"
	.size	.L.str.13, 54

	.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	"There are no devices that support CUDA"
	.size	.Lstr, 39

	.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_

	.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_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
