#include <cstdio>
#include <cstdlib>
#include <cuda_runtime.h>
#include <cuda.h>
#include "rbm_cuda.cuh"



__global__
void trainKernel(int* train_vec_in_batch, int* movies_in_batch, int* ratings_in_batch,
		float* Vzeros, float* Vts, float* Hzeros, float* Hts,
		float* W, float* BV, float* BH, float* W_inc, float* BV_inc, float* BH_inc,
		int batch_size, int num_movies_in_this_batch, const int i_batch_start,
		const bool update_weights) {

	unsigned int user = blockIdx.x * blockDim.x + threadIdx.x;
	while (user < batch_size) {
		int start = train_vec_in_batch[2 * user];
		int end = train_vec_in_batch[2 * user + 1];
		int size = end - start;

		start -= i_batch_start;


		if (size != 0) {
			float* V0 = Vzeros + K * start;
			float* Vt = Vts + K * start;
			float* H0 = Hzeros + user * F;
			float* Ht = Hts + user * F;

			int* u_movies = movies_in_batch + start;
			int* u_ratings = ratings_in_batch + start;

			// initialize V0
			for (int i = 0; i < size; i++) {
				V0[i * K + u_ratings[i] - 1] = 1;
			}

			//////////////// positive phase ////////////////
			for (int i = 0; i < size; i++) {
				float* W_user = W + u_movies[i] * (K * F);

				for (int j = 0; j < F; j++) {
					for (int k = 0; k < K; k++) {
						H0[j] += W_user[j * K + k] * V0[i * K + k];
					}
				}
			}

			// add bias and logistic function on H0
			for (int j = 0; j < F; j++) {
				H0[j] += BH[j];
				H0[j] = 1.0 / (1 + exp(-H0[j]));
			}



			if (update_weights) {
				//////////////// negative phase ////////////////
				for (int i = 0; i < size; i++) {
					float* W_user = W + u_movies[i] * (K * F);

					for (int j = 0; j < F; j++) {
						for (int k = 0; k < K; k++) {
							Vt[i * K + k] += H0[j] * W_user[j * K + k];
						}
					}

					// normalize Vt
					float sum_k = 0.0;
					for (int k = 0; k < K; k++) {

						Vt[i * K + k] += BV[u_movies[i] * K + k]; // add bias
						Vt[i * K + k] = exp(Vt[i * K + k]); // exponential
						sum_k += Vt[i * K + k];
					}
					for (int k = 0; k < K; k++) {
						Vt[i * K + k] /= sum_k;
					}
				}


				// compute Ht
				for (int i = 0; i < size; i++) {
					float* W_user = W + u_movies[i] * (K * F);

					for (int j = 0; j < F; j++) {
						for (int k = 0; k < K; k++) {
							Ht[j] += W_user[j * K + k] * Vt[i * K + k];
						}
					}
				}

				// add bias and logistic function on Ht
				for (int j = 0; j < F; j++) {
					Ht[j] += BV[j];
					Ht[j] = 1.0 / (1 + exp(-Ht[j]));
				}

				//////////////// update weight increments ////////////////
				// update BV_inc
				for (int i = 0; i < size; i++) {
					for (int k = 0; k < K; k++) {
						BV_inc[u_movies[i] * K + k] += (V0[i * K + k] - Vt[i * K + k]);
					}
				}

				// update W_inc
				for (int i = 0; i < size; i++) {
					for (int j = 0; j < F; j++) {
						for (int k = 0; k < K; k++) {
							W_inc[u_movies[i] * K * F + j * K + k] += (H0[j] * V0[i * K + k] - Ht[j] * Vt[i * K + k]);
						}
					}
				}

				// update BH_inc
				for (int j = 0; j < F; j++) {
					BH_inc[user * F + j] = (H0[j] - Ht[j]);
				}

			} // end update weights


		}

		user += blockDim.x * gridDim.x;
	}
}

__global__
void updateW_kernel(float* W, float* W_inc, const unsigned int M, const float lrate) {
	unsigned int i = blockIdx.x * blockDim.x + threadIdx.x;
	while (i < K * F * M) {
		W[i] += lrate * W_inc[i];
		i += blockDim.x * gridDim.x;
	}
}

__global__
void updateBV_kernel(float* BV, float* BV_inc, const unsigned int M, const float lrate) {
	unsigned int i = blockIdx.x * blockDim.x + threadIdx.x;
	while (i < K * M) {
		BV[i] += lrate * BV_inc[i];
		i += blockDim.x * gridDim.x;
	}
}

__global__
void updateBH_kernel(float* BH, float* BH_inc, const float lrate_BH, const int batch_size) {
	extern __shared__ float sBH_inc[];

	unsigned int tid = threadIdx.x;
	sBH_inc[tid] = 0;

	unsigned int i = blockIdx.x * blockDim.x + threadIdx.x;
	while (i < batch_size) {
		sBH_inc[tid] += BH_inc[i * F];

		i += blockDim.x * gridDim.x;
	}
	__syncthreads();

	for (unsigned int s = blockDim.x / 2; s > 32; s >>= 1) {
		if (tid < s) {
			sBH_inc[tid] += sBH_inc[tid + s];
		}
		__syncthreads();
	}

	if (tid < 32) {
		atomicAdd(&sBH_inc[tid], sBH_inc[tid + 32]);
		atomicAdd(&sBH_inc[tid], sBH_inc[tid + 16]);
		atomicAdd(&sBH_inc[tid], sBH_inc[tid + 8]);
		atomicAdd(&sBH_inc[tid], sBH_inc[tid + 4]);
		atomicAdd(&sBH_inc[tid], sBH_inc[tid + 2]);
		atomicAdd(&sBH_inc[tid], sBH_inc[tid + 1]);
	}

	if (tid == 0)
		atomicAdd(BH, lrate_BH * sBH_inc[0]);

}



__global__
void predictKernel(int* test_vec_in_batch, int* test_movies_in_batch, int* test_ratings_in_batch,
			float* Hzeros, float* Vts,
			float* W, float* BV,
			int batch_size, const int num_test_movies_in_this_batch, const int i_test_batch_start,
			float* results_in_batch) {

	unsigned int user = blockIdx.x * blockDim.x + threadIdx.x;

	while (user < batch_size) {
		int start = test_vec_in_batch[2 * user];
		int end = test_vec_in_batch[2 * user + 1];
		int size = end - start;

		start -= i_test_batch_start;


		if (size != 0) {
			float* H0 = Hzeros + user * F;
			float* Vt = Vts + K * start;

			int* u_movies = test_movies_in_batch + start;

			//////////////// negative phase ////////////////
			for (int i = 0; i < size; i++) {
				float* W_user = W + u_movies[i] * (K * F);

				for (int j = 0; j < F; j++) {
					for (int k = 0; k < K; k++) {
						Vt[i * K + k] += H0[j] * W_user[j * K + k];
					}
				}

				// normalize Vt
				float sum_k = 0.0;
				for (int k = 0; k < K; k++) {

					Vt[i * K + k] += BV[u_movies[i] * K + k]; // add bias
					Vt[i * K + k] = exp(Vt[i * K + k]); // exponential
					sum_k += Vt[i * K + k];
				}
				for (int k = 0; k < K; k++) {
					Vt[i * K + k] /= sum_k;
				}


				// update results
				float score = 0;
				for (int k = 0; k < K; k++) {
					score += (k + 1) * Vt[i * K + k];
				}
				results_in_batch[start + i] = score;
			}
		}

		user += blockDim.x * gridDim.x;
	}
}

void train(int* train_vec_in_batch, int* movies_in_batch, int* ratings_in_batch,
		int* test_vec_in_batch, int* test_movies_in_batch, int* test_ratings_in_batch,
		float* Vzeros, float* Vts, float* Hzeros, float* Hts,
		float* W, float* BV, float* BH, float* W_inc, float* BV_inc, float* BH_inc,
		int batch_size, int num_movies_in_this_batch, const int i_batch_start,
		const int num_test_movies_in_this_batch, const int i_test_batch_start,
		const unsigned int M, const float lrate, const float lrate_BH,
		float* results_in_batch, const bool update_weights,
		int blocks, int threadsPerBlock) {


	if (update_weights) {

		trainKernel<<<blocks, threadsPerBlock>>>
			(train_vec_in_batch, movies_in_batch, ratings_in_batch,
			Vzeros, Vts, Hzeros, Hts,
			W, BV, BH,
			W_inc, BV_inc, BH_inc,
			batch_size, num_movies_in_this_batch, i_batch_start,
			true);


		unsigned int Wblocks = min(blocks, (int)ceil(K * F * M / (float)threadsPerBlock));
		updateW_kernel<<<Wblocks, threadsPerBlock>>>(W, W_inc, M, lrate);

		unsigned int BVblocks = min(blocks, (int)ceil(K * M / (float)threadsPerBlock));
		updateBV_kernel<<<BVblocks, threadsPerBlock>>>(BV, BV_inc, M, lrate);

		unsigned int BHblocks = min(blocks, (int)ceil(batch_size / (float)threadsPerBlock));
		for (int j = 0; j < F; j++) {
			updateBH_kernel<<<BHblocks, threadsPerBlock, threadsPerBlock * sizeof(float)>>>
				(BH + j, BH_inc + j, lrate_BH, batch_size);
		}
	}

	// in prediction stage
	else {
		trainKernel<<<blocks, threadsPerBlock>>>
			(train_vec_in_batch, movies_in_batch, ratings_in_batch,
			Vzeros, Vts, Hzeros, Hts,
			W, BV, BH,
			W_inc, BV_inc, BH_inc,
			batch_size, num_movies_in_this_batch, i_batch_start,
			false);

		// TODO: update Vt, and compute results
		predictKernel<<<blocks, threadsPerBlock>>>
			(test_vec_in_batch, test_movies_in_batch, test_ratings_in_batch,
			Hzeros, Vts,
			W, BV,
			batch_size, num_test_movies_in_this_batch, i_test_batch_start,
			results_in_batch);
	}
}

	.file	"tmpxft_0033f71e_00000000-6_rbm_cuda.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2030:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2030:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z68__device_stub__Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiibPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib
	.type	_Z68__device_stub__Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiibPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib, @function
_Z68__device_stub__Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiibPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib:
.LFB2052:
	.cfi_startproc
	endbr64
	subq	$328, %rsp
	.cfi_def_cfa_offset 336
	movq	336(%rsp), %rax
	movq	%rdi, 104(%rsp)
	leaq	128(%rsp), %rdi
	movq	%rsi, 96(%rsp)
	leaq	140(%rsp), %rsi
	movq	%rax, 56(%rsp)
	movq	344(%rsp), %rax
	movq	%rdx, 88(%rsp)
	leaq	112(%rsp), %rdx
	movq	%rax, 48(%rsp)
	movq	352(%rsp), %rax
	movq	%rcx, 80(%rsp)
	leaq	120(%rsp), %rcx
	movq	%rax, 40(%rsp)
	movq	360(%rsp), %rax
	movq	%r8, 72(%rsp)
	movq	%rax, 32(%rsp)
	movq	368(%rsp), %rax
	movq	%r9, 64(%rsp)
	movq	%rax, 24(%rsp)
	movq	376(%rsp), %rax
	movq	%rax, 16(%rsp)
	movq	384(%rsp), %rax
	movq	%rax, 8(%rsp)
	movl	416(%rsp), %eax
	movb	%al, 4(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 312(%rsp)
	xorl	%eax, %eax
	leaq	104(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	96(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	88(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 200(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 208(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 216(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 224(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 232(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 240(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 248(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 256(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 264(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 272(%rsp)
	leaq	392(%rsp), %rax
	movq	%rax, 280(%rsp)
	leaq	400(%rsp), %rax
	movq	%rax, 288(%rsp)
	leaq	408(%rsp), %rax
	movq	%rax, 296(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 304(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 128(%rsp)
	movl	$1, 136(%rsp)
	movq	%rax, 140(%rsp)
	movl	$1, 148(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	120(%rsp)
	.cfi_def_cfa_offset 344
	leaq	_Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib(%rip), %rdi
	pushq	120(%rsp)
	.cfi_def_cfa_offset 352
	movq	156(%rsp), %rcx
	movl	164(%rsp), %r8d
	movq	144(%rsp), %rsi
	movl	152(%rsp), %edx
	leaq	192(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 344
	popq	%rdx
	.cfi_def_cfa_offset 336
.L2:
	movq	312(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$328, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2052:
	.size	_Z68__device_stub__Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiibPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib, .-_Z68__device_stub__Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiibPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib
	.globl	_Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib
	.type	_Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib, @function
_Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib:
.LFB2053:
	.cfi_startproc
	endbr64
	movzbl	88(%rsp), %eax
	movl	%eax, 88(%rsp)
	jmp	_Z68__device_stub__Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiibPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib
	.cfi_endproc
.LFE2053:
	.size	_Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib, .-_Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib
	.globl	_Z38__device_stub__Z14updateW_kernelPfS_jfPfS_jf
	.type	_Z38__device_stub__Z14updateW_kernelPfS_jfPfS_jf, @function
_Z38__device_stub__Z14updateW_kernelPfS_jfPfS_jf:
.LFB2054:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	48(%rsp), %rcx
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	40(%rsp), %rdx
	movss	%xmm0, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L8
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z14updateW_kernelPfS_jf(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L8:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2054:
	.size	_Z38__device_stub__Z14updateW_kernelPfS_jfPfS_jf, .-_Z38__device_stub__Z14updateW_kernelPfS_jfPfS_jf
	.globl	_Z14updateW_kernelPfS_jf
	.type	_Z14updateW_kernelPfS_jf, @function
_Z14updateW_kernelPfS_jf:
.LFB2055:
	.cfi_startproc
	endbr64
	jmp	_Z38__device_stub__Z14updateW_kernelPfS_jfPfS_jf
	.cfi_endproc
.LFE2055:
	.size	_Z14updateW_kernelPfS_jf, .-_Z14updateW_kernelPfS_jf
	.globl	_Z39__device_stub__Z15updateBV_kernelPfS_jfPfS_jf
	.type	_Z39__device_stub__Z15updateBV_kernelPfS_jfPfS_jf, @function
_Z39__device_stub__Z15updateBV_kernelPfS_jfPfS_jf:
.LFB2056:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	48(%rsp), %rcx
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	40(%rsp), %rdx
	movss	%xmm0, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L13
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z15updateBV_kernelPfS_jf(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L13:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2056:
	.size	_Z39__device_stub__Z15updateBV_kernelPfS_jfPfS_jf, .-_Z39__device_stub__Z15updateBV_kernelPfS_jfPfS_jf
	.globl	_Z15updateBV_kernelPfS_jf
	.type	_Z15updateBV_kernelPfS_jf, @function
_Z15updateBV_kernelPfS_jf:
.LFB2057:
	.cfi_startproc
	endbr64
	jmp	_Z39__device_stub__Z15updateBV_kernelPfS_jfPfS_jf
	.cfi_endproc
.LFE2057:
	.size	_Z15updateBV_kernelPfS_jf, .-_Z15updateBV_kernelPfS_jf
	.globl	_Z39__device_stub__Z15updateBH_kernelPfS_fiPfS_fi
	.type	_Z39__device_stub__Z15updateBH_kernelPfS_fiPfS_fi, @function
_Z39__device_stub__Z15updateBH_kernelPfS_fiPfS_fi:
.LFB2058:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	48(%rsp), %rcx
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 8(%rsp)
	leaq	40(%rsp), %rdx
	movss	%xmm0, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L18
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z15updateBH_kernelPfS_fi(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L18:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2058:
	.size	_Z39__device_stub__Z15updateBH_kernelPfS_fiPfS_fi, .-_Z39__device_stub__Z15updateBH_kernelPfS_fiPfS_fi
	.globl	_Z15updateBH_kernelPfS_fi
	.type	_Z15updateBH_kernelPfS_fi, @function
_Z15updateBH_kernelPfS_fi:
.LFB2059:
	.cfi_startproc
	endbr64
	jmp	_Z39__device_stub__Z15updateBH_kernelPfS_fiPfS_fi
	.cfi_endproc
.LFE2059:
	.size	_Z15updateBH_kernelPfS_fi, .-_Z15updateBH_kernelPfS_fi
	.globl	_Z54__device_stub__Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_PiS_S_PfS0_S0_S0_iiiS0_
	.type	_Z54__device_stub__Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_PiS_S_PfS0_S0_S0_iiiS0_, @function
_Z54__device_stub__Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_PiS_S_PfS0_S0_S0_iiiS0_:
.LFB2060:
	.cfi_startproc
	endbr64
	subq	$232, %rsp
	.cfi_def_cfa_offset 240
	movq	240(%rsp), %rax
	movq	%rdi, 56(%rsp)
	leaq	80(%rsp), %rdi
	movq	%rsi, 48(%rsp)
	leaq	92(%rsp), %rsi
	movq	%rax, 8(%rsp)
	movq	272(%rsp), %rax
	movq	%rdx, 40(%rsp)
	leaq	64(%rsp), %rdx
	movq	%rcx, 32(%rsp)
	leaq	72(%rsp), %rcx
	movq	%r8, 24(%rsp)
	movq	%r9, 16(%rsp)
	movq	%rax, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	leaq	56(%rsp), %rax
	movl	$1, 88(%rsp)
	movq	%rax, 128(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	248(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	256(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	264(%rsp), %rax
	movq	%rax, 200(%rsp)
	movq	%rsp, %rax
	movq	%rax, 208(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 80(%rsp)
	movq	%rax, 92(%rsp)
	movl	$1, 100(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L23
	pushq	72(%rsp)
	.cfi_def_cfa_offset 248
	leaq	_Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_(%rip), %rdi
	pushq	72(%rsp)
	.cfi_def_cfa_offset 256
	movq	108(%rsp), %rcx
	movl	116(%rsp), %r8d
	movq	96(%rsp), %rsi
	movl	104(%rsp), %edx
	leaq	144(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 248
	popq	%rdx
	.cfi_def_cfa_offset 240
.L23:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	addq	$232, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2060:
	.size	_Z54__device_stub__Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_PiS_S_PfS0_S0_S0_iiiS0_, .-_Z54__device_stub__Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_PiS_S_PfS0_S0_S0_iiiS0_
	.globl	_Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_
	.type	_Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_, @function
_Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_:
.LFB2061:
	.cfi_startproc
	endbr64
	jmp	_Z54__device_stub__Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_PiS_S_PfS0_S0_S0_iiiS0_
	.cfi_endproc
.LFE2061:
	.size	_Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_, .-_Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_
	.globl	_Z5trainPiS_S_S_S_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiiiijffS0_bii
	.type	_Z5trainPiS_S_S_S_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiiiijffS0_bii, @function
_Z5trainPiS_S_S_S_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiiiijffS0_bii:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movq	256(%rsp), %rax
	movq	%rdi, 72(%rsp)
	movq	%rsi, 80(%rsp)
	movq	296(%rsp), %r13
	movq	%rax, 96(%rsp)
	movq	264(%rsp), %rax
	movq	%rdx, 88(%rsp)
	movq	%rax, 24(%rsp)
	movq	272(%rsp), %rax
	movq	%rcx, 112(%rsp)
	movq	%rax, 32(%rsp)
	movq	280(%rsp), %rax
	movq	%r8, 120(%rsp)
	movl	$0, %r8d
	movq	%rax, 104(%rsp)
	movq	288(%rsp), %rax
	movq	%r9, 128(%rsp)
	movl	$0, %r9d
	movq	%rax, 8(%rsp)
	movq	304(%rsp), %rax
	movq	%rax, 40(%rsp)
	movq	312(%rsp), %rax
	movl	400(%rsp), %ebx
	movl	408(%rsp), %ebp
	movss	%xmm0, 136(%rsp)
	movq	%rax, 48(%rsp)
	movq	320(%rsp), %rax
	cmpb	$0, 392(%rsp)
	movl	%ebp, 180(%rsp)
	movq	%rax, 56(%rsp)
	movq	328(%rsp), %rax
	movl	%ebx, 168(%rsp)
	movl	336(%rsp), %r12d
	movq	%rax, 64(%rsp)
	movl	360(%rsp), %eax
	movl	344(%rsp), %r14d
	movl	352(%rsp), %r15d
	movss	%xmm1, 148(%rsp)
	movl	%eax, 140(%rsp)
	movl	368(%rsp), %eax
	movl	%eax, 144(%rsp)
	movl	376(%rsp), %eax
	movl	%eax, 20(%rsp)
	movq	384(%rsp), %rax
	movq	%rax, 152(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 184(%rsp)
	movl	188(%rsp), %ecx
	movq	%rax, 172(%rsp)
	movq	180(%rsp), %rdx
	movq	168(%rsp), %rdi
	movl	176(%rsp), %esi
	je	.L29
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L30
	pushq	%rdx
	.cfi_def_cfa_offset 264
	pushq	$1
	.cfi_def_cfa_offset 272
	pushq	%r15
	.cfi_def_cfa_offset 280
	pushq	%r14
	.cfi_def_cfa_offset 288
	pushq	%r12
	.cfi_def_cfa_offset 296
	pushq	104(%rsp)
	.cfi_def_cfa_offset 304
	pushq	104(%rsp)
	.cfi_def_cfa_offset 312
	pushq	104(%rsp)
	.cfi_def_cfa_offset 320
	pushq	104(%rsp)
	.cfi_def_cfa_offset 328
	pushq	%r13
	.cfi_def_cfa_offset 336
	pushq	88(%rsp)
	.cfi_def_cfa_offset 344
	pushq	192(%rsp)
	.cfi_def_cfa_offset 352
	movq	128(%rsp), %r9
	movq	120(%rsp), %r8
	movq	192(%rsp), %rcx
	movq	184(%rsp), %rdx
	movq	176(%rsp), %rsi
	movq	168(%rsp), %rdi
	call	_Z68__device_stub__Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiibPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib
	addq	$96, %rsp
	.cfi_def_cfa_offset 256
.L30:
	imull	$750, 20(%rsp), %eax
	cvtsi2ssl	%ebp, %xmm2
	cvtsi2ssq	%rax, %xmm0
	movss	%xmm2, 24(%rsp)
	divss	%xmm2, %xmm0
	call	ceilf@PLT
	movl	%ebp, 180(%rsp)
	movabsq	$4294967297, %rdx
	cvttss2sil	%xmm0, %eax
	movq	%rdx, 172(%rsp)
	movl	176(%rsp), %esi
	movq	%rdx, 184(%rsp)
	movl	188(%rsp), %ecx
	movq	180(%rsp), %rdx
	cmpl	%ebx, %eax
	cmovg	%ebx, %eax
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	%eax, 168(%rsp)
	movq	168(%rsp), %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L33
	movss	136(%rsp), %xmm0
	movl	20(%rsp), %edx
	movq	48(%rsp), %rsi
	movq	8(%rsp), %rdi
	call	_Z38__device_stub__Z14updateW_kernelPfS_jfPfS_jf
.L33:
	imull	$5, 20(%rsp), %eax
	cvtsi2ssq	%rax, %xmm0
	divss	24(%rsp), %xmm0
	call	ceilf@PLT
	movl	%ebp, 180(%rsp)
	movabsq	$4294967297, %rdx
	cvttss2sil	%xmm0, %eax
	movq	%rdx, 172(%rsp)
	movl	176(%rsp), %esi
	movq	%rdx, 184(%rsp)
	movl	188(%rsp), %ecx
	movq	180(%rsp), %rdx
	cmpl	%ebx, %eax
	cmovg	%ebx, %eax
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	%eax, 168(%rsp)
	movq	168(%rsp), %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L36
	movss	136(%rsp), %xmm0
	movl	20(%rsp), %edx
	movq	%r13, %rdi
	movq	56(%rsp), %rsi
	call	_Z39__device_stub__Z15updateBV_kernelPfS_jfPfS_jf
.L36:
	cvtsi2ssl	%r12d, %xmm0
	divss	24(%rsp), %xmm0
	movslq	%ebp, %r13
	movabsq	$4294967297, %r14
	call	ceilf@PLT
	cvttss2sil	%xmm0, %eax
	cmpl	%ebx, %eax
	cmovle	%eax, %ebx
	salq	$2, %r13
	xorl	%r15d, %r15d
.L38:
	movq	%r14, 184(%rsp)
	xorl	%r9d, %r9d
	movq	%r13, %r8
	movl	188(%rsp), %ecx
	movq	%r14, 172(%rsp)
	movl	176(%rsp), %esi
	movl	%ebp, 180(%rsp)
	movq	180(%rsp), %rdx
	movl	%ebx, 168(%rsp)
	movq	168(%rsp), %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L37
	movq	64(%rsp), %rax
	movl	%r12d, %edx
	movss	148(%rsp), %xmm0
	leaq	(%rax,%r15), %rsi
	movq	40(%rsp), %rax
	leaq	(%rax,%r15), %rdi
	call	_Z39__device_stub__Z15updateBH_kernelPfS_fiPfS_fi
.L37:
	addq	$4, %r15
	cmpq	$600, %r15
	jne	.L38
	jmp	.L28
.L29:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L40
	pushq	%rax
	.cfi_def_cfa_offset 264
	pushq	$0
	.cfi_def_cfa_offset 272
	pushq	%r15
	.cfi_def_cfa_offset 280
	pushq	%r14
	.cfi_def_cfa_offset 288
	pushq	%r12
	.cfi_def_cfa_offset 296
	pushq	104(%rsp)
	.cfi_def_cfa_offset 304
	pushq	104(%rsp)
	.cfi_def_cfa_offset 312
	pushq	104(%rsp)
	.cfi_def_cfa_offset 320
	pushq	104(%rsp)
	.cfi_def_cfa_offset 328
	pushq	%r13
	.cfi_def_cfa_offset 336
	pushq	88(%rsp)
	.cfi_def_cfa_offset 344
	pushq	192(%rsp)
	.cfi_def_cfa_offset 352
	movq	128(%rsp), %r9
	movq	120(%rsp), %r8
	movq	192(%rsp), %rcx
	movq	184(%rsp), %rdx
	movq	176(%rsp), %rsi
	movq	168(%rsp), %rdi
	call	_Z68__device_stub__Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiibPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib
	addq	$96, %rsp
	.cfi_def_cfa_offset 256
.L40:
	movabsq	$4294967297, %rax
	movl	%ebp, 180(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%rax, 184(%rsp)
	movl	188(%rsp), %ecx
	movq	%rax, 172(%rsp)
	movq	180(%rsp), %rdx
	movl	%ebx, 168(%rsp)
	movl	176(%rsp), %esi
	movq	168(%rsp), %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L28
	movq	152(%rsp), %rax
	movl	%r12d, 264(%rsp)
	movq	%r13, 256(%rsp)
	movq	8(%rsp), %r9
	movq	%rax, 288(%rsp)
	movl	144(%rsp), %eax
	movq	24(%rsp), %r8
	movq	32(%rsp), %rcx
	movl	%eax, 280(%rsp)
	movl	140(%rsp), %eax
	movq	128(%rsp), %rdx
	movq	120(%rsp), %rsi
	movl	%eax, 272(%rsp)
	movq	112(%rsp), %rdi
	addq	$200, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	jmp	_Z54__device_stub__Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_PiS_S_PfS0_S0_S0_iiiS0_
.L28:
	.cfi_restore_state
	addq	$200, %rsp
	.cfi_def_cfa_offset 56
	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
.LFE2027:
	.size	_Z5trainPiS_S_S_S_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiiiijffS0_bii, .-_Z5trainPiS_S_S_S_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiiiijffS0_bii
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_"
.LC1:
	.string	"_Z15updateBH_kernelPfS_fi"
.LC2:
	.string	"_Z15updateBV_kernelPfS_jf"
.LC3:
	.string	"_Z14updateW_kernelPfS_jf"
.LC4:
	.string	"_Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2063:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -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	.LC0(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z13predictKernelPiS_S_PfS0_S0_S0_iiiS0_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC1(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z15updateBH_kernelPfS_fi(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC2(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z15updateBV_kernelPfS_jf(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC3(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z14updateW_kernelPfS_jf(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC4(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z11trainKernelPiS_S_PfS0_S0_S0_S0_S0_S0_S0_S0_S0_iiib(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	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	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2063:
	.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
	.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:

#ifndef CUDA_RBM_CUH
#define CUDA_RBM_CUH

#define K 5
#define F 150


void train(int* train_vec_in_batch, int* movies_in_batch, int* ratings_in_batch,
	int* test_vec_in_batch, int* test_movies_in_batch, int* test_ratings_in_batch,
	float* Vzeros, float* Vts, float* Hzeros, float* Hts,
	float* W, float* BV, float* BH, float* W_inc, float* BV_inc, float* BH_inc,
	int batch_size, int num_movies_in_this_batch, const int i_batch_start,
	const int num_test_movies_in_this_batch, const int i_test_batch_start,
	const unsigned int M, const float lrate, const float lrate_BH,
	float* results_in_batch, const bool update_weights,
	int blocks, int threadsPerBlock);

// void cudaTest();

#endif

	.text
	.file	"rbm_cuda.hip"
	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.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_

	.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
