hip_filename
stringlengths
5
84
hip_content
stringlengths
79
9.69M
cuda_filename
stringlengths
4
83
cuda_content
stringlengths
19
9.69M
9533a840c57eaac348fd1be74a026290f01bf761.hip
// !!! This is a file automatically generated by hipify!!! #if !MEGDNN_TEGRA_X1 // generated by gen_cuda_conv_bias_kern_impls.py // ignore warning of cutlass #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" #include "src/cuda/conv_bias/in...
9533a840c57eaac348fd1be74a026290f01bf761.cu
#if !MEGDNN_TEGRA_X1 // generated by gen_cuda_conv_bias_kern_impls.py // ignore warning of cutlass #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" #include "src/cuda/conv_bias/int8/conv_bias_int8_implicit_gemm_cutlass_wrapper.cuinl" usi...
c550ff0162454993c5e88bad3215b615ba522d1c.hip
// !!! This is a file automatically generated by hipify!!! /** * Copyright 2021 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
c550ff0162454993c5e88bad3215b615ba522d1c.cu
/** * Copyright 2021 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
e4dbbe80da497f598d706a39d148576278a01192.hip
// !!! This is a file automatically generated by hipify!!! /** * jrc_cuda_rho.cu * block loading rho calculation. should be much faster * system('nvcc -ptx -m 64 -arch sm_35 jrc_cuda_rho.cu') * i1 is multiple of chunk (16) * J. James Jun, Vidrio Technologies, LLC., 2017 Jun 11 * 7/13/17: fDc_spk option added, whi...
e4dbbe80da497f598d706a39d148576278a01192.cu
/** * jrc_cuda_rho.cu * block loading rho calculation. should be much faster * system('nvcc -ptx -m 64 -arch sm_35 jrc_cuda_rho.cu') * i1 is multiple of chunk (16) * J. James Jun, Vidrio Technologies, LLC., 2017 Jun 11 * 7/13/17: fDc_spk option added, which uses spike-specific distance cut-off (dc) */ #include <...
532ee461ff6a9600c68021e1d61080ef71e32308.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <assert.h> #include <stdio.h> #include "box2d2r-512-10-512_kernel.hu" #define BENCH_DIM 2 #define BENCH_FPP 49 #define BENCH_RAD 2 #include "common.h" double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool sc...
532ee461ff6a9600c68021e1d61080ef71e32308.cu
#include <assert.h> #include <stdio.h> #include "box2d2r-512-10-512_kernel.hu" #define BENCH_DIM 2 #define BENCH_FPP 49 #define BENCH_RAD 2 #include "common.h" double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool scop) { double start_time = sb_time(), end_time = 0.0; int dimsize = compsize + BENCH_...
d850c46e84e7f56a32d4bd095824daf1c8ca8f78.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime_api.h> #include <cuda_gl_interop.h> #include <assert.h> #include <sys/time.h> #define Tix 32 #define MAX(x, y) (((x) > (y)) ? (x) : (y)) __global__ void GaussJordan_gpu(float *Aaug, floa...
d850c46e84e7f56a32d4bd095824daf1c8ca8f78.cu
#include <stdio.h> #include <cuda.h> #include <cuda_runtime_api.h> #include <cuda_gl_interop.h> #include <assert.h> #include <sys/time.h> #define Tix 32 #define MAX(x, y) (((x) > (y)) ? (x) : (y)) __global__ void GaussJordan_gpu(float *Aaug, float *subpivot, int N, int iter) { int c = iter + blockIdx.x * Tix*Tix; ...
faaaa0152e6665ca7b2a4c7e161dd36492721730.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <iostream> using namespace std; #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <rocblas.h> #include <Eigen/Dense> #include <Eigen/Core> //const int N = 131072; //2^17 const int N = 7; __global__ void hello(...
faaaa0152e6665ca7b2a4c7e161dd36492721730.cu
#include <stdio.h> #include <iostream> using namespace std; #include <cuda.h> #include <cuda_runtime.h> #include <cublas_v2.h> #include <Eigen/Dense> #include <Eigen/Core> //const int N = 131072; //2^17 const int N = 7; __global__ void hello(float * b ) { int index = blockIdx.x*blockDim.x + threadIdx.x; ...
36c809725c4f294266274ecee55bdd16fc9ec173.hip
// !!! This is a file automatically generated by hipify!!! #include <assert.h> #include <time.h> #include <stdio.h> #include <hip/hip_runtime.h> #include <rocblas.h> #include <cublasXt.h> #include "gpu_blas_test.h" #include "util.h" #define HANDLE_CUDA_ERROR( err ) ( HandleCudaError( err, __FILE__, __LINE__ ) ) static...
36c809725c4f294266274ecee55bdd16fc9ec173.cu
#include <assert.h> #include <time.h> #include <stdio.h> #include <cuda_runtime.h> #include <cublas_v2.h> #include <cublasXt.h> #include "gpu_blas_test.h" #include "util.h" #define HANDLE_CUDA_ERROR( err ) ( HandleCudaError( err, __FILE__, __LINE__ ) ) static void HandleCudaError(cudaError_t err, const char *file, int...
62fb7d3a99762f8d3be8d80b7b7bd32b32bf8593.hip
// !!! This is a file automatically generated by hipify!!! /* * Copyright (c) 2018-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
62fb7d3a99762f8d3be8d80b7b7bd32b32bf8593.cu
/* * Copyright (c) 2018-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
869464e279589f75166e2ae9f597d6710b71facd.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <algorithm> #include <chrono> #include <hip/hip_runtime.h> #include "kernels.h" int PowTwoDivider(int n) { if (n == 0) return 0; int divider = 1; while ((n & divider) == 0) divider <<= 1; return divider; ...
869464e279589f75166e2ae9f597d6710b71facd.cu
#include <stdio.h> #include <stdlib.h> #include <algorithm> #include <chrono> #include <hip/hip_runtime.h> #include "kernels.h" int PowTwoDivider(int n) { if (n == 0) return 0; int divider = 1; while ((n & divider) == 0) divider <<= 1; return divider; } int main(int argc, char* argv[]) { if (argc != 4) { ...
8d91cdd53db014dc9259518c3f29016ecd7877c6.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" //Udacity HW 4 //Radix Sorting #include "reference_calc.cpp" #include "utils.h" #include <thrust/host_vector.h> #include <cstdio> /* Red Eye Removal =============== For this assignment we are implementing red eye removal...
8d91cdd53db014dc9259518c3f29016ecd7877c6.cu
//Udacity HW 4 //Radix Sorting #include "reference_calc.cpp" #include "utils.h" #include <thrust/host_vector.h> #include <cstdio> /* Red Eye Removal =============== For this assignment we are implementing red eye removal. This is accomplished by first creating a score for every pixel that tells us how ...
495f6728ce71e679aca6de0c15d2212a0026ef4b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /***************************************************************************//** * \file FadlunEtAlSolver.cu * \author Anush Krishnan (anush@bu.edu) * \brief Implementation of the methods of the class \c FadlunEtAlSolver. */ #...
495f6728ce71e679aca6de0c15d2212a0026ef4b.cu
/***************************************************************************//** * \file FadlunEtAlSolver.cu * \author Anush Krishnan (anush@bu.edu) * \brief Implementation of the methods of the class \c FadlunEtAlSolver. */ #include "FadlunEtAlSolver.h" #include <sys/stat.h> #include <solvers/NavierStokes/kernel...
42a907a5f83c7f19a3de787c3d9724b533530679.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // Created by DY on 17-8-5. // #ifndef NLP_CUDA_CU_SPARSE_MATRIX_H #define NLP_CUDA_CU_SPARSE_MATRIX_H #include "SparseMatrix.h" #include "CuSparseMatrixHeader.cu" template <typename T> CuSparseMatrix<T>& CuSparseMatrix<T>::op...
42a907a5f83c7f19a3de787c3d9724b533530679.cu
// // Created by DY on 17-8-5. // #ifndef NLP_CUDA_CU_SPARSE_MATRIX_H #define NLP_CUDA_CU_SPARSE_MATRIX_H #include "SparseMatrix.h" #include "CuSparseMatrixHeader.cu" template <typename T> CuSparseMatrix<T>& CuSparseMatrix<T>::operator=(const SparseMatrix<T>& o) { assert(rows==o.rows && nnz==o.nnz); this->ro...
fcf2af39200d0b06f12decfdea2542ae82a93f66.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" extern "C" { __global__ void vcopyshift(const int n, const int shift, const double *a, double *b) { int i = threadIdx.x + blockIdx.x * blockDim.x; if (i<n) { b[i+shift] = a[i]; } } }
fcf2af39200d0b06f12decfdea2542ae82a93f66.cu
extern "C" { __global__ void vcopyshift(const int n, const int shift, const double *a, double *b) { int i = threadIdx.x + blockIdx.x * blockDim.x; if (i<n) { b[i+shift] = a[i]; } } }
aa041328a2462f2805ee71a50344bcd2df8c251e.hip
// !!! This is a file automatically generated by hipify!!! #include <iostream> #include <stdio.h> #include <time.h> #include <hip/hip_runtime.h> #include <math.h> __global__ void matrixMultiplicationKernel(int* A,int* B,int* C,int N) { int ROW = blockIdx.y*blockDim.y+threadIdx.y; int COL = blockIdx.x*blockDim.x+thre...
aa041328a2462f2805ee71a50344bcd2df8c251e.cu
#include <iostream> #include <stdio.h> #include <time.h> #include <cuda_runtime.h> #include <math.h> __global__ void matrixMultiplicationKernel(int* A,int* B,int* C,int N) { int ROW = blockIdx.y*blockDim.y+threadIdx.y; int COL = blockIdx.x*blockDim.x+threadIdx.x; float tmp_sum = 0.0f; if(ROW < N && COL < N){ fo...
e57e20266d01cc65d9f0cfbce1261fd9db3ee69a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #define NSTREAM 4 #define BDIM 128 void printArray(float *a, int size){ for (int i = 0; i < size; i++){ if(i % 128 == 0) printf("\n"); printf("%.0f ", a[i]); } printf("\n\...
e57e20266d01cc65d9f0cfbce1261fd9db3ee69a.cu
#include <stdio.h> #define NSTREAM 4 #define BDIM 128 void printArray(float *a, int size){ for (int i = 0; i < size; i++){ if(i % 128 == 0) printf("\n"); printf("%.0f ", a[i]); } printf("\n\n"); } __global__ void sumArrays(float *A, float *B, float *C, const int N) { int ...
6005e050f71b8be5cd506bc3bc3859b1150b0c32.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void threshold_and_support(float *vec, int *support, const int n, const float T) { unsigned int xIndex = blockDim.x * blockIdx.x + threadIdx.x; if (xIndex < n) { if (abs(vec[xIndex])<T) { vec[xIndex...
6005e050f71b8be5cd506bc3bc3859b1150b0c32.cu
#include "includes.h" __global__ void threshold_and_support(float *vec, int *support, const int n, const float T) { unsigned int xIndex = blockDim.x * blockIdx.x + threadIdx.x; if (xIndex < n) { if (abs(vec[xIndex])<T) { vec[xIndex] = 0.0f; support[xIndex]=2; } } }
02e2626f315b52cf3897c87af1a8e596878e273d.hip
// !!! This is a file automatically generated by hipify!!! #include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <hiprand/hiprand_kernel.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <sys/time.h> #include "transform_fc.cu" #include<chrono> #include<iostream> using names...
02e2626f315b52cf3897c87af1a8e596878e273d.cu
#include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <curand_kernel.h> #include <stdlib.h> #include <cuda.h> #include <sys/time.h> #include "transform_fc.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{24,...
7bf351f3853715bb73c9a60991d64a654904d941.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> extern "C" { __global__ void GPU_add( int n, int* d_a, int* d_b ) { for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) { ...
7bf351f3853715bb73c9a60991d64a654904d941.cu
#include <stdio.h> extern "C" { __global__ void GPU_add( int n, int* d_a, int* d_b ) { for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) { d_a[i] += d_b[i]; } } }
8656f784b21f7809840a807367659dfc91a3256b.hip
// !!! This is a file automatically generated by hipify!!! #include <pthread.h> #include <cstdlib> #include <iostream> #include <vector> #define COMPRESSION_BATCH_SIZE 32 using namespace std; struct ThreadArg { float *original_data; long num_elements; int thread_num; float ***compressed_data; bool **compres...
8656f784b21f7809840a807367659dfc91a3256b.cu
#include <pthread.h> #include <cstdlib> #include <iostream> #include <vector> #define COMPRESSION_BATCH_SIZE 32 using namespace std; struct ThreadArg { float *original_data; long num_elements; int thread_num; float ***compressed_data; bool **compressed_data_taken; unsigned int *mask; }; struct Compressed...
f9530986eb7054202e74a598a68e82a4defc9de0.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include "add_hip.cuh" #include <hiprand/hiprand.h> #include <hiprand/hiprand_kernel.h> __global__ void add(unsigned int size, float time, float3* vertexBuf) { int index = blockIdx.x * bloc...
f9530986eb7054202e74a598a68e82a4defc9de0.cu
#include "device_launch_parameters.h" #include "add.cuh" #include <curand.h> #include <curand_kernel.h> __global__ void add(unsigned int size, float time, float3* vertexBuf) { int index = blockIdx.x * blockDim.x + threadIdx.x; if (index >= size) return; float3 pos = vertexBuf[index]; curandState_t state; ...
dcb27619e317c993e42e4ddfae95e3130ba2b847.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // auto-generated by ops.py // __constant__ int xdim0_advec_cell_kernel3_ydir; int xdim0_advec_cell_kernel3_ydir_h = -1; __constant__ int ydim0_advec_cell_kernel3_ydir; int ydim0_advec_cell_kernel3_ydir_h = -1; __constant__ int x...
dcb27619e317c993e42e4ddfae95e3130ba2b847.cu
// // auto-generated by ops.py // __constant__ int xdim0_advec_cell_kernel3_ydir; int xdim0_advec_cell_kernel3_ydir_h = -1; __constant__ int ydim0_advec_cell_kernel3_ydir; int ydim0_advec_cell_kernel3_ydir_h = -1; __constant__ int xdim1_advec_cell_kernel3_ydir; int xdim1_advec_cell_kernel3_ydir_h = -1; __constant__ int...
9b5385ec5eeb20fa6421cda5ac3eb34c3ad0e3f0.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "su/pixel.hpp" namespace sp{ // float *MG, int MG_steps, cols = 32 // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 // mx, my, ml, ma, mb...
9b5385ec5eeb20fa6421cda5ac3eb34c3ad0e3f0.cu
#include "su/pixel.hpp" namespace sp{ // float *MG, int MG_steps, cols = 32 // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 // mx, my, ml, ma, mb, isx, isy, isl, isa, isb, vxy00, vxy01, vxy10, vxy11, vab00, vab01, vab10, vab11, isd, ...
dd3322ddf5038311bd50a63bd553933b4f75d549.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "kernel_hip.cuh" __global__ void kernel(int *image, int *bicub, int N, int bicImgRows, int bicImCols, int imgRows, int imgCols) { int j = 1 + threadIdx.x + blockIdx.x * blockDim.x; int i = 1 + threadIdx.y + blockIdx.y * ...
dd3322ddf5038311bd50a63bd553933b4f75d549.cu
#include "kernel.cuh" __global__ void kernel(int *image, int *bicub, int N, int bicImgRows, int bicImCols, int imgRows, int imgCols) { int j = 1 + threadIdx.x + blockIdx.x * blockDim.x; int i = 1 + threadIdx.y + blockIdx.y * blockDim.y; /*int i = threadIdx.x; int j = blockIdx.y;*/ //printf("In kernel"); //for (i...
e354043600fed8906480f635f7f772ae0dd9bed4.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> #include <fstream> #include <string> #include <cfloat> #include <ctime> #include <limits> #include <algorithm> #include <stack> #include <queue> #include <hiprand/hiprand.h> #include <hiprand/hiprand_kernel.h> #...
e354043600fed8906480f635f7f772ae0dd9bed4.cu
#include <iostream> #include <fstream> #include <string> #include <cfloat> #include <ctime> #include <limits> #include <algorithm> #include <stack> #include <queue> #include <curand.h> #include <curand_kernel.h> #include <device_launch_parameters.h> #include "Camera.cuh" #include "Scene.cuh" #include "Node.cuh" #incl...
def935a57665c5a5e7a2b0078d2014071d35483c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "reduction/SumReduction.cuh" __global__ void backwardExpansionKernel( int batchSize, int* lengths, int numberIterations, int numberRows, int numberEntries, int numberOfWarpsPerBlocks, int filter...
def935a57665c5a5e7a2b0078d2014071d35483c.cu
#include "reduction/SumReduction.cuh" __global__ void backwardExpansionKernel( int batchSize, int* lengths, int numberIterations, int numberRows, int numberEntries, int numberOfWarpsPerBlocks, int filterHeight, int filterWidth, int filterLength, int maximumConvolutions, int ...
9c5db079783f3d2c8e0122a9002dc4264186f286.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include "utilCuda.h" #include "timer.h" #include "lock.h" #include "../Class/interface.h" #include "../Class/neuralNetwork.h" #include "../Class/statistic.h" #incl...
9c5db079783f3d2c8e0122a9002dc4264186f286.cu
#include <stdio.h> #include <stdlib.h> #include <cuda.h> #include <cuda_runtime.h> #include "utilCuda.h" #include "timer.h" #include "lock.h" #include "../Class/interface.h" #include "../Class/neuralNetwork.h" #include "../Class/statistic.h" #include "../Class/countNetwork.h" #define RATIO 22 #define ...
7d1e85f9b8aae30d022646c964febda5e045f2ed.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <hip/hip_runtime.h> #include <stdint.h> #include "cuStopwatch.cu" // Compute sum of integers from 0 to n-1 __global__ void trianglenumber(uint64_t* res, uint64_t n) { uint32_t tid = threadIdx.x + blockIdx.x * blockDim.x; if(tid...
7d1e85f9b8aae30d022646c964febda5e045f2ed.cu
#include <stdio.h> #include <cuda_runtime.h> #include <stdint.h> #include "cuStopwatch.cu" // Compute sum of integers from 0 to n-1 __global__ void trianglenumber(uint64_t* res, uint64_t n) { uint32_t tid = threadIdx.x + blockIdx.x * blockDim.x; if(tid < n){ // *res += tid; atomicAdd(res, tid); //...
b204712df43e905fae8145c548342b5abb28ab6b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void linearLayerUpdateBias(float* dZ, float* b, int dZ_x_dim, int dZ_y_dim, int b_x_dim, float learning_rate) { int index = blockIdx.x * blockDim.x + threadIdx.x; if (index < dZ_x_dim * dZ_y_dim) { ...
b204712df43e905fae8145c548342b5abb28ab6b.cu
#include "includes.h" __global__ void linearLayerUpdateBias(float* dZ, float* b, int dZ_x_dim, int dZ_y_dim, int b_x_dim, float learning_rate) { int index = blockIdx.x * blockDim.x + threadIdx.x; if (index < dZ_x_dim * dZ_y_dim) { int dZ_x = index % dZ_x_dim; int dZ_y = index / dZ_x_dim; atomicAdd(&b[dZ_y], - learning...
d0df619810868b8b471048a39b72b794428e35a4.hip
// !!! This is a file automatically generated by hipify!!! /* * Parallel Processing Teaching Toolkit * CUDA - Example 01 * Detect CUDA Devices * https://github.com/javierip/parallel-processing-teaching-toolkit */ #include <stdio.h> #include <hip/hip_runtime.h> // Print device properties void printDevProp(hipDevicePro...
d0df619810868b8b471048a39b72b794428e35a4.cu
/* * Parallel Processing Teaching Toolkit * CUDA - Example 01 * Detect CUDA Devices * https://github.com/javierip/parallel-processing-teaching-toolkit */ #include <stdio.h> #include <cuda_runtime.h> // Print device properties void printDevProp(cudaDeviceProp devProp) { printf("Major revision number: %d\n"...
bf0fa8afed3733cf350a91925f2f030a38dfb237.hip
// !!! This is a file automatically generated by hipify!!! #include "chainerx/cuda/cuda_device.h" #include <cmath> #include <cstdint> #include <hip/hip_runtime.h> #include "chainerx/array.h" #include "chainerx/cuda/cuda_runtime.h" #include "chainerx/cuda/cuda_set_device_scope.h" #include "chainerx/cuda/elementwise.c...
bf0fa8afed3733cf350a91925f2f030a38dfb237.cu
#include "chainerx/cuda/cuda_device.h" #include <cmath> #include <cstdint> #include <cuda_runtime.h> #include "chainerx/array.h" #include "chainerx/cuda/cuda_runtime.h" #include "chainerx/cuda/cuda_set_device_scope.h" #include "chainerx/cuda/elementwise.cuh" #include "chainerx/device.h" #include "chainerx/dtype.h" #...
302564a3e95ca5c953f8622e87b1c0210cdd9afd.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> __global__ void hello(){ printf("Hello from block: %u, thread: %u\n", blockIdx.x, threadIdx.x); } int main(){ hipLaunchKernelGGL(( hello), dim3(2),dim3(2), 0, 0, ); hipDeviceSynchronize(); }
302564a3e95ca5c953f8622e87b1c0210cdd9afd.cu
#include <stdio.h> __global__ void hello(){ printf("Hello from block: %u, thread: %u\n", blockIdx.x, threadIdx.x); } int main(){ hello<<<2,2>>>(); cudaDeviceSynchronize(); }
9402ccb86c22332e81233a0ebf893af01e3e5603.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" extern "C" __global__ void saxpy(float a, float *x, float *y, float *out, size_t n) { size_t tid = blockIdx.x * blockDim.x + threadIdx.x; if (tid < n) { out[tid] = a * x[tid] + y[tid]; } }
9402ccb86c22332e81233a0ebf893af01e3e5603.cu
extern "C" __global__ void saxpy(float a, float *x, float *y, float *out, size_t n) { size_t tid = blockIdx.x * blockDim.x + threadIdx.x; if (tid < n) { out[tid] = a * x[tid] + y[tid]; } }
6eb9c1a66832c0cf42bfde5fc461f4e866254c5e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "accessor.h" #include "model.h" #include "cuda_helper.h" template<typename DT, int dim> TensorAccessorR<DT, dim>::TensorAccessorR(PhysicalRegion region, RegionRequirement req, ...
6eb9c1a66832c0cf42bfde5fc461f4e866254c5e.cu
#include "accessor.h" #include "model.h" #include "cuda_helper.h" template<typename DT, int dim> TensorAccessorR<DT, dim>::TensorAccessorR(PhysicalRegion region, RegionRequirement req, FieldID fid, ...
757272f458733df23d55078d7802ca7e07ab5168.hip
// !!! This is a file automatically generated by hipify!!! /* Author: Jason He Version: 1.0 20210521 Serial version. Version: 2.0 20210523 MPI version using parallel fftw. Version: 3.0 20210602 CUDA version using cufft. Use N*N block with 1 thread each. Version: 3.1 20210603 Use more than 1 thread per block. Version: 3...
757272f458733df23d55078d7802ca7e07ab5168.cu
/* Author: Jason He Version: 1.0 20210521 Serial version. Version: 2.0 20210523 MPI version using parallel fftw. Version: 3.0 20210602 CUDA version using cufft. Use N*N block with 1 thread each. Version: 3.1 20210603 Use more than 1 thread per block. Version: 3.2 20210604 Included usage of shared memories. Didn't impro...
a30308ae4ceb2695ee5538423d30a2dc948980ea.hip
// !!! This is a file automatically generated by hipify!!! #include "mpi.h" #include <cassert> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <future> #include <stdio.h> #define cudaCall(val) __checkCudaErrors__((val), #val, __FILE__, __LINE__) /* A test program that tries to call mpi_isend from w...
a30308ae4ceb2695ee5538423d30a2dc948980ea.cu
#include "mpi.h" #include <cassert> #include <cuda.h> #include <cuda_runtime.h> #include <future> #include <stdio.h> #define cudaCall(val) __checkCudaErrors__((val), #val, __FILE__, __LINE__) /* A test program that tries to call mpi_isend from within a cuda event callback. Each rank starts S streams and sends them as...
b4b3ca6346862bfba683c3be3d5e9c92417caa45.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <hip/hip_runtime.h> #include <limits.h> #include <float.h> #include <math.h> #include <sys/time.h> #include <pthread.h> #include <string> #include "../../utils/timer.h" float feature_vect[] = {2.240018, 2.2570236, 0.11304555,...
b4b3ca6346862bfba683c3be3d5e9c92417caa45.cu
#include <stdio.h> #include <cuda_runtime.h> #include <limits.h> #include <float.h> #include <math.h> #include <sys/time.h> #include <pthread.h> #include <string> #include "../../utils/timer.h" float feature_vect[] = {2.240018, 2.2570236, 0.11304555, -0.21307051, 0.8988138, 0.0390655...
fa14cd571bb12f561f1da61c9dc93506809be54c.hip
// !!! This is a file automatically generated by hipify!!! #include <gtest/gtest.h> #include <cusp/nlog10.cuh> #include <cmath> using namespace cusp; template <typename T> void run_test(int N, float n, float k) { std::vector<T> host_input_data(N); std::vector<T> expected_output_data(N); for (int i = 0; ...
fa14cd571bb12f561f1da61c9dc93506809be54c.cu
#include <gtest/gtest.h> #include <cusp/nlog10.cuh> #include <cmath> using namespace cusp; template <typename T> void run_test(int N, float n, float k) { std::vector<T> host_input_data(N); std::vector<T> expected_output_data(N); for (int i = 0; i < N; i++) { host_input_data[i] = i + 1; expec...
5a22b4a44d4f4f67c787caa1ca9a0fa332bc5794.hip
// !!! This is a file automatically generated by hipify!!! // includes, cuda #include <hip/hip_runtime.h> #include <cudaDefs.h> #include <imageManager.h> #include "imageKernels.cuh" #define BLOCK_DIM 8 #define COLORS 256 texture<uchar4, 2, hipReadModeElementType> tex_ref; hipChannelFormatDesc tex_channel_desc; uc...
5a22b4a44d4f4f67c787caa1ca9a0fa332bc5794.cu
// includes, cuda #include <cuda_runtime.h> #include <cudaDefs.h> #include <imageManager.h> #include "imageKernels.cuh" #define BLOCK_DIM 8 #define COLORS 256 texture<uchar4, 2, cudaReadModeElementType> tex_ref; cudaChannelFormatDesc tex_channel_desc; uchar4 *d_image_data; unsigned int image_width; unsigned int i...
443ed7e84ded6b4e73d2367b1db3e306ce0e6b1a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "THHTensorMath.h" #include "THHGeneral.h" #include "THHHalf.h" #include "THHTensorCopy.h" #include "THHApply.cuh" #include "THHNumerics.cuh" template <typename T> struct TensorAddConstantOp { TensorAddConstantOp(T v) : v...
443ed7e84ded6b4e73d2367b1db3e306ce0e6b1a.cu
#include "THCTensorMath.h" #include "THCGeneral.h" #include "THCHalf.h" #include "THCTensorCopy.h" #include "THCApply.cuh" #include "THCNumerics.cuh" template <typename T> struct TensorAddConstantOp { TensorAddConstantOp(T v) : val(v) {} __device__ __forceinline__ void operator()(T* out, T* in) { *out = *in + ...
86755ab027409c646f002b88a4e80d0cd9dd2ece.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" # include <iostream> # include <stdio.h> # include <string> # include <vector> # include "../../headers/insert_batch/record.h" # define BLOCK_SIZE 512 extern __constant__ int records_size_device; extern __constant__ int word_num_...
86755ab027409c646f002b88a4e80d0cd9dd2ece.cu
# include <iostream> # include <stdio.h> # include <string> # include <vector> # include "../../headers/insert_batch/record.h" # define BLOCK_SIZE 512 extern __constant__ int records_size_device; extern __constant__ int word_num_device, file_split_num_device; extern __device__ struct record* records_device; extern ...
0d3ae4de7c9dfc404964eeadb0b224910a441e2d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #if __CUDACC_VER_MAJOR__ >= 8 #include <chrono> #include <condition_variable> #include <memory> #include <thread> #include "scope/scope.hpp" #include "args.hpp" #define NAME "Comm_UM_Demand_GPUToHostMt" typedef std::chrono::tim...
0d3ae4de7c9dfc404964eeadb0b224910a441e2d.cu
#if __CUDACC_VER_MAJOR__ >= 8 #include <chrono> #include <condition_variable> #include <memory> #include <thread> #include "scope/scope.hpp" #include "args.hpp" #define NAME "Comm_UM_Demand_GPUToHostMt" typedef std::chrono::time_point<std::chrono::system_clock> time_point_t; std::condition_variable cv; std::mutex...
d37f10233a0031226274a7be4113dc4e124320cf.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /**********************************************************************/ // A now optimized Multigrid Solver for the Heat Equation // // Course Material for HPCSE-II, Spring 2019, ETH Zurich // // Authors: S...
d37f10233a0031226274a7be4113dc4e124320cf.cu
/**********************************************************************/ // A now optimized Multigrid Solver for the Heat Equation // // Course Material for HPCSE-II, Spring 2019, ETH Zurich // // Authors: Sergio Martin, Georgios Arampatzis // // License: Use if you like,...
350787d8ccfcdd1f6df3ae0e0ccb21bdd4ff6d8c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <time.h> __global__ void VecAdd(float* A, float* B, float* C, int N){ int i = threadIdx.x + blockDim.x * blockIdx.x; if (i < N) C[i] = A[i] + B[i]; } int main(int arg...
350787d8ccfcdd1f6df3ae0e0ccb21bdd4ff6d8c.cu
#include <stdio.h> #include <stdlib.h> #include <time.h> __global__ void VecAdd(float* A, float* B, float* C, int N){ int i = threadIdx.x + blockDim.x * blockIdx.x; if (i < N) C[i] = A[i] + B[i]; } int main(int argc, char** argv){ srand(2634); int N = atoi(argv[1]); char* out = argv[2]; ...
f906cedf34e0420af5e9f2de5dc7d00c756bb898.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <mex.h> #define MEX_CHECK_RETURN(in) {hipError_t __errLocal = in; if(__errLocal != hipSuccess) { mexPrintf("ERROR: file %s, line %i\n CUDA call \n\t" #in " \n returned error (%i) - \"%s\"\n",...
f906cedf34e0420af5e9f2de5dc7d00c756bb898.cu
#include <cuda.h> #include <cuda_runtime.h> #include <mex.h> #define MEX_CHECK_RETURN(in) {cudaError_t __errLocal = in; if(__errLocal != CUDA_SUCCESS) { mexPrintf("ERROR: file %s, line %i\n CUDA call \n\t" #in " \n returned error (%i) - \"%s\"\n", __FILE__, __LINE__, __errLocal, cudaGetErrorString(__errLocal)); } } ...
630adac1cf7cfa42df5ad5d04207dcbcb03ba7e9.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <hiprand/hiprand.h> #include <sys/time.h> #include <math.h> __global__ void kernel(int* count_d, float* randomnums) { int i; double x,y,z; int tid = blockDim.x * blockIdx.x + threa...
630adac1cf7cfa42df5ad5d04207dcbcb03ba7e9.cu
#include <stdio.h> #include <stdlib.h> #include <cuda.h> #include <curand.h> #include <sys/time.h> #include <math.h> __global__ void kernel(int* count_d, float* randomnums) { int i; double x,y,z; int tid = blockDim.x * blockIdx.x + threadIdx.x; i = tid; int xidx = 0, yidx = 0; xidx = (i+i); yidx = (xidx+1); ...
d8106f4ab695b547eb3d79b42bd41a6ae4d02c89.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a c...
d8106f4ab695b547eb3d79b42bd41a6ae4d02c89.cu
/* * Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
972365483d44244436cece97007076cc0de835c8.hip
// !!! This is a file automatically generated by hipify!!! /** * Copyright (c) 2020 Neka-Nat * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitat...
972365483d44244436cece97007076cc0de835c8.cu
/** * Copyright (c) 2020 Neka-Nat * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, dis...
38fede7899c7aa04b9a23d2fd26d40ad37346fc5.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/device_functions.h> #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include "gputimer.h" #define NUM_THREADS 100 #define ARRAY_SIZE 10 #define BLOCK_WIDTH 5 void print_array(int *array, int size) { pri...
38fede7899c7aa04b9a23d2fd26d40ad37346fc5.cu
#include <device_functions.h> #include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include "gputimer.h" #define NUM_THREADS 100 #define ARRAY_SIZE 10 #define BLOCK_WIDTH 5 void print_array(int *array, int size) { printf("{ "); for (int i = 0; i < size; i++) { printf("%d ", array[i...
8d3d09d53b0fbdbcc968b0db22b825a5fd7f999b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "common/book.h" #define N (33 * 1024) __global__ void add( int *a, int *b, int *c ) { int tid = threadIdx.x + blockIdx.x * blockDim.x; while (tid < N) { c[tid] = a[tid] + b[tid]; tid += blockDim...
8d3d09d53b0fbdbcc968b0db22b825a5fd7f999b.cu
#include "common/book.h" #define N (33 * 1024) __global__ void add( int *a, int *b, int *c ) { int tid = threadIdx.x + blockIdx.x * blockDim.x; while (tid < N) { c[tid] = a[tid] + b[tid]; tid += blockDim.x * gridDim.x; } } int main( void ) { int *a, *b, *c; int *dev_a, *dev_b, ...
eda77454882683f4fb61381c360c76fe6c9e307c.hip
// !!! This is a file automatically generated by hipify!!! /* ----------------------------------------------------------------------------------------------- Name: Anand Jhunjhunwala Roll No: 17EC30041 CUDA Assignment 4: Parallel dotproduct implementation. --------------------------------------------------------------...
eda77454882683f4fb61381c360c76fe6c9e307c.cu
/* ----------------------------------------------------------------------------------------------- Name: Anand Jhunjhunwala Roll No: 17EC30041 CUDA Assignment 4: Parallel dotproduct implementation. ------------------------------------------------------------------------------------------------*/ #include <stdio.h> #i...
ff1c13f1e5867cdfd33d480fced65cf580dfad6c.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include "../include/core.cuh" #include "../include/utils.cuh" /****************************************************** * Functions for querying device properties *******************************************************/ int ...
ff1c13f1e5867cdfd33d480fced65cf580dfad6c.cu
#include <cuda.h> #include "../include/core.cuh" #include "../include/utils.cuh" /****************************************************** * Functions for querying device properties *******************************************************/ int VLMO_get_device_num(const bool verbose=false) { /* * Get the ...
acb3f1c6190de9b865f6c8e0aadfc48e4886fb5d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "hiprand/hiprand.h" #include "rocblas.h" #include "im2col.h" #include "hip/hip_runtime.h" // src: https://github.com/BVLC/caffe/blob/master/src/caffe/util/im2col.cu // You may also want to read: https://github.com/BVLC/ca...
acb3f1c6190de9b865f6c8e0aadfc48e4886fb5d.cu
#include "cuda_runtime.h" #include "curand.h" #include "cublas_v2.h" #include "im2col.h" #include "cuda.h" // src: https://github.com/BVLC/caffe/blob/master/src/caffe/util/im2col.cu // You may also want to read: https://github.com/BVLC/caffe/blob/master/LICENSE // > Mixed precision kernel (templated) template <type...
1cf6ded8cee5e25ea1f3e6e254a5d2ef93579cd0.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* sobel operation just uses a sobel operator to convolve a target matrix, so the key to improve performance is how to tune the convolution. well, either you can write your own convolution algorithm or use cufft lib. 1. ...
1cf6ded8cee5e25ea1f3e6e254a5d2ef93579cd0.cu
/* sobel operation just uses a sobel operator to convolve a target matrix, so the key to improve performance is how to tune the convolution. well, either you can write your own convolution algorithm or use cufft lib. 1. naive convolution algorithm. refer to this link: https://www.evl.uic.edu/sjames/cs525/fi...
cae1db298ccb53d38d7f26281cefc0b6b682c52b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #ifdef __NVCC__ template <class U> __global__ void extractMin(int* PQ_size, int* expandNodes,int* expandNodes_size,U* Cx,int* openList,int N,int K); template <class T,class U> __global__ void A_star_expand(int* off,int* edge,unsi...
cae1db298ccb53d38d7f26281cefc0b6b682c52b.cu
#ifdef __NVCC__ template <class U> __global__ void extractMin(int* PQ_size, int* expandNodes,int* expandNodes_size,U* Cx,int* openList,int N,int K); template <class T,class U> __global__ void A_star_expand(int* off,int* edge,unsigned T* W,U* Hx,int* parent,volatile U* Cx, int* expandNodes,int* expandNodes_size, ...
b7193bbd843e333b40c1f24ce096b653042f21d8.hip
// !!! This is a file automatically generated by hipify!!! #include <stdlib.h> #include <stdio.h> #include <time.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <hipsparse.h> #include <device_types.h> #include <unistd.h> #include <string.h> #include <sys/time.h> #include <math.h> #include <omp.h> ...
b7193bbd843e333b40c1f24ce096b653042f21d8.cu
#include <stdlib.h> #include <stdio.h> #include <time.h> #include <cuda.h> #include <cuda_runtime.h> #include <cusparse.h> #include <device_types.h> #include <unistd.h> #include <string.h> #include <sys/time.h> #include <math.h> #include <omp.h> #define SEED 1 #define THREADS 128 #define BLOCKS 1024 // MATRIX_DIM_M...
7dc0040cc974cf3267952a9cc556ac0f5e7e1463.hip
// !!! This is a file automatically generated by hipify!!! /* -- MAGMA (version 1.6.1) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date January 2015 @generated from zgesellcmmv.cu normal z -> s, Fri Jan 30 19:00:29 2015 */ #include "...
7dc0040cc974cf3267952a9cc556ac0f5e7e1463.cu
/* -- MAGMA (version 1.6.1) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date January 2015 @generated from zgesellcmmv.cu normal z -> s, Fri Jan 30 19:00:29 2015 */ #include "cuda_runtime.h" #include <stdio.h> #include "common_magma.h...
fc8a9f1cb7b9e9089ac7cb3f2594fe897c3adeb6.hip
// !!! This is a file automatically generated by hipify!!! /* * Copyright (c) 2011, Alex Krizhevsky (akrizhevsky@gmail.com) * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * - Redistribu...
fc8a9f1cb7b9e9089ac7cb3f2594fe897c3adeb6.cu
/* * Copyright (c) 2011, Alex Krizhevsky (akrizhevsky@gmail.com) * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice...
1539fbe775f8a7c185dc0c32b2e9ebcd7e33ea61.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include "arquivo3.h" #include "comm/comm.h" __global__ void compute3(int *d_buffer){ int ix = blockIdx.x*blockDim.x + threadIdx.x; d_buffer[ix] = d_buffer[ix]*10; __syncthreads(); } ...
1539fbe775f8a7c185dc0c32b2e9ebcd7e33ea61.cu
#include <stdio.h> #include <stdlib.h> #include "arquivo3.h" #include "comm/comm.h" __global__ void compute3(int *d_buffer){ int ix = blockIdx.x*blockDim.x + threadIdx.x; d_buffer[ix] = d_buffer[ix]*10; __syncthreads(); } extern "C" void funcao4(){ int N=500; int *buffer,*d_buffer; int i,j,sum; dim3...
f0be759cd1624171d1d91f6f9fc82bc5a337e388.hip
// !!! This is a file automatically generated by hipify!!! #include <torch/extension.h> #include <vector> #include <stdio.h> #include <algorithm> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <hiprand/hiprand_kernel.h> #include <hiprand/hiprand.h> using namespace std; #define EIGEN_USE_GPU #defi...
f0be759cd1624171d1d91f6f9fc82bc5a337e388.cu
#include <torch/extension.h> #include <vector> #include <stdio.h> #include <algorithm> #include <cuda.h> #include <cuda_runtime.h> #include <curand_kernel.h> #include <curand.h> using namespace std; #define EIGEN_USE_GPU #define maxThreadsPerBlock 1024 __global__ void _qsgdreduceSumV2(float *g_odata, float *g_idata...
fc88e720517a75bf1b151e8d0b490eb868a363b2.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> #include <iomanip> #include <vector> #include <string> #include <fstream> using namespace std; void Linspace(double*, double, double, int); void Uniform(double*, double, int); __global__ void RungeKuttaStepOri...
fc88e720517a75bf1b151e8d0b490eb868a363b2.cu
#include <iostream> #include <iomanip> #include <vector> #include <string> #include <fstream> using namespace std; void Linspace(double*, double, double, int); void Uniform(double*, double, int); __global__ void RungeKuttaStepOriginal(double*, double*, int); __device__ void RightHandSide(double&, double, double); t...
2fc07a953cad6b692c5e808444ab43e940d64bd4.hip
// !!! This is a file automatically generated by hipify!!! /* /* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
2fc07a953cad6b692c5e808444ab43e940d64bd4.cu
/* /* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * ...
90e1b23b11237a7d93a5bd48996b601a6bd6dd20.hip
// !!! This is a file automatically generated by hipify!!! /* This program is writen by qp09. * usually just for fun. * Mon December 14 2015 */ #include "../../third_party/cuda/helper_cuda.h" #include "../../gpu_utils/mem_op.h" #include "GArrayNeurons.h" int cudaAllocArray(void *pCpu, void *pGpu, int num) { GArr...
90e1b23b11237a7d93a5bd48996b601a6bd6dd20.cu
/* This program is writen by qp09. * usually just for fun. * Mon December 14 2015 */ #include "../../third_party/cuda/helper_cuda.h" #include "../../gpu_utils/mem_op.h" #include "GArrayNeurons.h" int cudaAllocArray(void *pCpu, void *pGpu, int num) { GArrayNeurons *pGpuNeurons = (GArrayNeurons*)pGpu; GArrayNeuro...
d61e031c5d1cfcf8a235c2b35c248dffab9f1663.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <vector_td_utilities.h> #include "cuSmallConvOperator.h" #include "cudaDeviceManager.h" using namespace Gadgetron; static inline void setup_grid( unsigned int number_of_elements, dim3 *blockDim, dim3* gridDim) { int cu...
d61e031c5d1cfcf8a235c2b35c248dffab9f1663.cu
#include <vector_td_utilities.h> #include "cuSmallConvOperator.h" #include "cudaDeviceManager.h" using namespace Gadgetron; static inline void setup_grid( unsigned int number_of_elements, dim3 *blockDim, dim3* gridDim) { int cur_device = cudaDeviceManager::Instance()->getCurrentDevice(); //int maxGridDim = cud...
5b572992753d712baa21d72b58d3eead6c03dc94.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void jacobi_init( const int x_inner, const int y_inner, const int halo_depth, const double* density, const double* energy, const double rx, const double ry, double* kx, double* ky, double* u0, double...
5b572992753d712baa21d72b58d3eead6c03dc94.cu
#include "includes.h" __global__ void jacobi_init( const int x_inner, const int y_inner, const int halo_depth, const double* density, const double* energy, const double rx, const double ry, double* kx, double* ky, double* u0, double* u, const int coefficient) { const int gid = threadIdx.x+blockIdx.x*blockDim.x; if(gid ...
638ae3da175e5f7e5a9ac65cc08f7c0adb7a3565.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <time.h> #include <unistd.h> #include <stdlib.h> #include <math.h> /* COMPILE --> nvcc 2DstencilGPUSharedMemoryBlankBorderTimeSpaceSharingOpencv.cu -o go `pkg-config --cflags --libs opencv` -w EXECUTE -...
638ae3da175e5f7e5a9ac65cc08f7c0adb7a3565.cu
#include <stdio.h> #include <time.h> #include <unistd.h> #include <stdlib.h> #include <math.h> /* COMPILE --> nvcc 2DstencilGPUSharedMemoryBlankBorderTimeSpaceSharingOpencv.cu -o go `pkg-config --cflags --libs opencv` -w EXECUTE --> ./main.exe */ //********** //**OPENCV** //********** #include <iostream> #include <...
3fe5758fc8e2f6f8ef9a99d301fa86b697662c09.hip
// !!! This is a file automatically generated by hipify!!! #include <cupy/complex.cuh> #include <hipcub/hipcub.hpp> #include <cub/device/device_segmented_reduce.cuh> #include <cub/device/device_spmv.cuh> #include <hipcub/hipcub.hpp> #include "cupy_cub.h" #include <stdexcept> #if __CUDACC_VER_MAJOR__ >= 9 && (__CUDA_AR...
3fe5758fc8e2f6f8ef9a99d301fa86b697662c09.cu
#include <cupy/complex.cuh> #include <cub/device/device_reduce.cuh> #include <cub/device/device_segmented_reduce.cuh> #include <cub/device/device_spmv.cuh> #include <cub/device/device_scan.cuh> #include "cupy_cub.h" #include <stdexcept> #if __CUDACC_VER_MAJOR__ >= 9 && (__CUDA_ARCH__ >= 530 || !defined(__CUDA_ARCH__))...
bdb4a03b7d16c354202c97fbad756dcc7c1afad4.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include "Static/TriangleCounting/triangle2.cuh" namespace hornets_nest { TriangleCounting2::TriangleCounting2(HornetGraph& hornet) : StaticAlgorithm(hornet) { ...
bdb4a03b7d16c354202c97fbad756dcc7c1afad4.cu
#include <cuda.h> #include <cuda_runtime.h> #include "Static/TriangleCounting/triangle2.cuh" namespace hornets_nest { TriangleCounting2::TriangleCounting2(HornetGraph& hornet) : StaticAlgorithm(hornet) { } TriangleCounting2::~TriangleCou...
f9c38a7e8048adb2138ab92383ed6312185468e3.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /*************************************************************************** *cr *cr (C) Copyright 2007 The Board of Trustees of the *cr University of Illinois *cr All Ri...
f9c38a7e8048adb2138ab92383ed6312185468e3.cu
/*************************************************************************** *cr *cr (C) Copyright 2007 The Board of Trustees of the *cr University of Illinois *cr All Rights Reserved *cr ********************************************************************...
3d44d3f941424962642db17e8c757e26bf6959f0.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #ifndef _IMAGEFILTER_KERNEL_H_ #define _IMAGEFILTER_KERNEL_H_ #define BOUND 4 #define THREAD_PER_WARP 32 #define SQUARE_WIDTH 120 __global__ void imageFilterKernelPartA(char3* inputPixels, char3* outputPixels, uint width, ui...
3d44d3f941424962642db17e8c757e26bf6959f0.cu
#ifndef _IMAGEFILTER_KERNEL_H_ #define _IMAGEFILTER_KERNEL_H_ #define BOUND 4 #define THREAD_PER_WARP 32 #define SQUARE_WIDTH 120 __global__ void imageFilterKernelPartA(char3* inputPixels, char3* outputPixels, uint width, uint height, int pxls_per_thrd) { int index = blockIdx.x * blockDim.x + threadIdx.x; fo...
acf2f717d4e410e35c1a3aeddc9848938fabb6ce.hip
// !!! This is a file automatically generated by hipify!!! #include <iostream> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> //#include <time.h> //#include <cutil.h> using namespace std; # define r 40 # define M 1000 // number of items # define N 90 // number of transactions # define alpha 1 // represe...
acf2f717d4e410e35c1a3aeddc9848938fabb6ce.cu
#include <iostream> #include <cuda.h> #include <cuda_runtime.h> //#include <time.h> //#include <cutil.h> using namespace std; # define r 40 # define M 1000 // number of items # define N 90 // number of transactions # define alpha 1 // represents the weight of the support in the first fitness function # define Beta...
461f3aab0b1acbc8f33e34d29d73432ee0769e42.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> // nvcc prof.cu // nvprof --query-events // nvprof --query-metrics // nvprof -e divergent_branch,global_store_transaction,l1_shared_bank_conflict,l1_local_load_hit -m sm_efficiency ./a.out // // divergent_branch ...
461f3aab0b1acbc8f33e34d29d73432ee0769e42.cu
#include <stdio.h> // nvcc prof.cu // nvprof --query-events // nvprof --query-metrics // nvprof -e divergent_branch,global_store_transaction,l1_shared_bank_conflict,l1_local_load_hit -m sm_efficiency ./a.out // // divergent_branch - дивергенция нитей // global_store_transaction - кол-во транзакций к глобальной памяти ...
87ebaf2bcdc51ab880d489a33df59493d83fe386.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void arrayTest(int n, long *factor, long *arr, long *result, int *const_arr1, long *const_arr2) { int i = blockIdx.x * blockDim.x + threadIdx.x; if(i == 0) { /* printf("In ArrayTest n=%d factor=%p ar...
87ebaf2bcdc51ab880d489a33df59493d83fe386.cu
#include "includes.h" __global__ void arrayTest(int n, long *factor, long *arr, long *result, int *const_arr1, long *const_arr2) { int i = blockIdx.x * blockDim.x + threadIdx.x; if(i == 0) { /* printf("In ArrayTest n=%d factor=%p arr=%p result=%p \n",n,factor,arr,result); printf("In const %d %d %d\n",const_arr1[0],cons...
ce77bb90bb9c51fe98bd5b9852d60fe769689e51.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <random> // #include "3rdparty/cub-1.8.0/hipcub/hipcub.hpp" #include "common.h" #include "gptKernels.h" #include "transformerKernels.h" /** @file Implemented the cuda kernel function and its launcher that required by GPT m...
ce77bb90bb9c51fe98bd5b9852d60fe769689e51.cu
#include <random> // #include "3rdparty/cub-1.8.0/cub/cub.cuh" #include "common.h" #include "gptKernels.h" #include "transformerKernels.h" /** @file Implemented the cuda kernel function and its launcher that required by GPT model. Currently, fp16 and fp32 versions are provided */ namespace lightseq { namespace cuda { ...
c8973d7730d60d1d6f038f79192914b5698e2e02.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void kernel(unsigned char *ptr, int ticks){ // map from threadIdx/BlockIdx to pixel positions int x = threadIdx.x + blockIdx.x * blockDim.x; int y = threadIdx.y + blockIdx.y * blockDim.y; int offset ...
c8973d7730d60d1d6f038f79192914b5698e2e02.cu
#include "includes.h" __global__ void kernel(unsigned char *ptr, int ticks){ // map from threadIdx/BlockIdx to pixel positions int x = threadIdx.x + blockIdx.x * blockDim.x; int y = threadIdx.y + blockIdx.y * blockDim.y; int offset = x + y * blockDim.x * gridDim.x; // now calculate the value at that position float fx ...
2d2a29881a68e4dd6abaec6115ea7c55863f8d0a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void transposeFineGrained(float *odata, float *idata, int width, int height) { __shared__ float block[TILE_DIM][TILE_DIM+1]; int xIndex = blockIdx.x * TILE_DIM + threadIdx.x; int yIndex = blockIdx.y...
2d2a29881a68e4dd6abaec6115ea7c55863f8d0a.cu
#include "includes.h" __global__ void transposeFineGrained(float *odata, float *idata, int width, int height) { __shared__ float block[TILE_DIM][TILE_DIM+1]; int xIndex = blockIdx.x * TILE_DIM + threadIdx.x; int yIndex = blockIdx.y * TILE_DIM + threadIdx.y; int index = xIndex + (yIndex)*width; for (int i=0; i < TILE_...
85de104191e06b46a68d6a262735cc2573a430b8.hip
// !!! This is a file automatically generated by hipify!!! #include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <hiprand/hiprand_kernel.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <sys/time.h> #include "copySharedMem.cu" #include<chrono> #include<iostream> using name...
85de104191e06b46a68d6a262735cc2573a430b8.cu
#include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <curand_kernel.h> #include <stdlib.h> #include <cuda.h> #include <sys/time.h> #include "copySharedMem.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{24...
8768b19260157f3ea786f31bea1c2f5bd95701e5.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <sys/time.h> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> #include "../separable-convolution/separable_convolution.h" #include "../motion-tracking/motion_tracking.h" #include "../edge-de...
8768b19260157f3ea786f31bea1c2f5bd95701e5.cu
#include <stdio.h> #include <sys/time.h> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> #include "../separable-convolution/separable_convolution.h" #include "../motion-tracking/motion_tracking.h" #include "../edge-detect/edge_detect.h" #include "../helper/helper_cuda.h" usi...
afb3702a0f0b06a8ab618bac5fbe02465afca662.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // auto-generated by ops.py // __constant__ int xdim0_update_halo_kernel3_minus_4_a; int xdim0_update_halo_kernel3_minus_4_a_h = -1; __constant__ int ydim0_update_halo_kernel3_minus_4_a; int ydim0_update_halo_kernel3_minus_4_a_h ...
afb3702a0f0b06a8ab618bac5fbe02465afca662.cu
// // auto-generated by ops.py // __constant__ int xdim0_update_halo_kernel3_minus_4_a; int xdim0_update_halo_kernel3_minus_4_a_h = -1; __constant__ int ydim0_update_halo_kernel3_minus_4_a; int ydim0_update_halo_kernel3_minus_4_a_h = -1; __constant__ int xdim1_update_halo_kernel3_minus_4_a; int xdim1_update_halo_kernel...
7e3ac3e3520c0d71dc873fe52e299b9ee5a7d569.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <primitiv/config.h> #include <primitiv/devices/cuda16/device.h> #include <primitiv/devices/cuda16/ops/common.h> #include <primitiv/internal/cuda/utils.h> namespace { __global__ void broadcast_fw_dev( const half *px, ...
7e3ac3e3520c0d71dc873fe52e299b9ee5a7d569.cu
#include <primitiv/config.h> #include <primitiv/devices/cuda16/device.h> #include <primitiv/devices/cuda16/ops/common.h> #include <primitiv/internal/cuda/utils.h> namespace { __global__ void broadcast_fw_dev( const half *px, std::uint32_t skip1, std::uint32_t skip2, std::uint32_t size, half *py) { cons...
13e2b1d0a79deb050a33f23d9d722428bc223ae3.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <iostream> using namespace std; //host extern float *Hy, coe_Hy, dt, dz; extern int size_space, size_Hy; const float PI = 3.141592653589793f; const float mu = (4 * PI)*1e-7f; //devic...
13e2b1d0a79deb050a33f23d9d722428bc223ae3.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <iostream> using namespace std; //host extern float *Hy, coe_Hy, dt, dz; extern int size_space, size_Hy; const float PI = 3.141592653589793f; const float mu = (4 * PI)*1e-7f; //device extern float *dev_Hy, *dev_Ex; void Hy_init_malloc(int ); v...
3d9dc1805b2ef66c67aad6be8e94a61496baa10d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" #define MAX_CELL_PER_THREAD 1 __device__ void gpu_swap(void **a, void **b) { void *temp = *a; *a = *b; *b = temp; } __global__ void kernel_compute_gen_singleblock_1(uint8_t *matrix_src, uint8_t *matrix_dst, ...
3d9dc1805b2ef66c67aad6be8e94a61496baa10d.cu
#include "includes.h" #define MAX_CELL_PER_THREAD 1 __device__ void gpu_swap(void **a, void **b) { void *temp = *a; *a = *b; *b = temp; } __global__ void kernel_compute_gen_singleblock_1(uint8_t *matrix_src, uint8_t *matrix_dst, uint32_t dim_m1, uint32_t cols, uint32_t iterations) { uint32_t cell = threadIdx.x; uin...
d41dd0ebd39225a57cfba6a7917e443485c20061.hip
// !!! This is a file automatically generated by hipify!!! /* * Copyright (c) 2017, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
d41dd0ebd39225a57cfba6a7917e443485c20061.cu
/* * Copyright (c) 2017, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
aa39c115e1e4debb4ccbf5ed4293156201830ec2.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <thrust\device_vector.h> #include <thrust\host_vector.h> #include <stdio.h> #include <iostream> using namespace std; __global__ void kernel(int *a, const int N) { int i = blockDi...
aa39c115e1e4debb4ccbf5ed4293156201830ec2.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <thrust\device_vector.h> #include <thrust\host_vector.h> #include <stdio.h> #include <iostream> using namespace std; __global__ void kernel(int *a, const int N) { int i = blockDim.x * blockIdx.x + threadIdx.x; if (i < N) { a...
c1ca0bf25f75463971cac077c9e992e55a3fa291.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /** * Copyright (c) 2016-present, Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
c1ca0bf25f75463971cac077c9e992e55a3fa291.cu
/** * Copyright (c) 2016-present, Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
633a4067b4f03bca810448149e0d8a1cdbbe949b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <cmath> #include <ctime> #include <iostream> using std::cout; using std::endl; __inline__ __device__ void swap(float &a, float &b) { float tmp = a; a = b; b = tmp; }; __global__ void update(float *A, float *B, int ...
633a4067b4f03bca810448149e0d8a1cdbbe949b.cu
#include <cmath> #include <ctime> #include <iostream> using std::cout; using std::endl; __inline__ __device__ void swap(float &a, float &b) { float tmp = a; a = b; b = tmp; }; __global__ void update(float *A, float *B, int N) { float slot[4]; int idx = blockIdx.x * blockDim.x + threadIdx.x; if (idx < N *...
cc576cdfc2b40c374a5f96282762ff121558e1a2.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <iostream> #include <fstream> #include <sstream> #include <math.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <driver_functions.h> #include "CycleTimer.h" #include "lsq.h" #include "sub.h...
cc576cdfc2b40c374a5f96282762ff121558e1a2.cu
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <fstream> #include <sstream> #include <math.h> #include <cuda.h> #include <cuda_runtime.h> #include <driver_functions.h> #include "CycleTimer.h" #include "lsq.h" #include "sub.h" #define NB 16 #define COLUMNS 256 /* static inline int updiv(int n, i...
51ce3d6dd6ee0850e6fbf6b949ff0cd0fcc85104.hip
// !!! This is a file automatically generated by hipify!!! /* * * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. * * * * See COPYRIGHT for license information * */ #define NVSHMEMI_HOST_ONLY #include "nvshmem_api.h" #include "nvshmem_internal.h" #include "nvshmemx_error.h" #include "amo_kernel_e...
51ce3d6dd6ee0850e6fbf6b949ff0cd0fcc85104.cu
/* * * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. * * * * See COPYRIGHT for license information * */ #define NVSHMEMI_HOST_ONLY #include "nvshmem_api.h" #include "nvshmem_internal.h" #include "nvshmemx_error.h" #include "amo_kernel_entrypoints.cuh" template <typename T> int nvshmemi_p2p_amo...
bac426075b92993a65c9643df13d1b49c46f0593.hip
// !!! This is a file automatically generated by hipify!!! // To Compile it // gcc -m32 -o test.out test.c sac.a #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <unistd.h> #include <math.h> #include "crsmex.h" #include <hip/hip_runtime.h> #include <hipfft.h> #include <hip/hip_comp...
bac426075b92993a65c9643df13d1b49c46f0593.cu
// To Compile it // gcc -m32 -o test.out test.c sac.a #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <unistd.h> #include <math.h> #include "crsmex.h" #include <cuda.h> #include <cufft.h> #include <cuComplex.h> extern "C"{ #include <sacio.h> #include <sac.h> } /******************...
41a7dd2a42aeffc849bfd75bc4fea5374e740a70.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" //Bibliotecas Basicas //Biblioteca Thrust //Biblioteca cuRAND //PARAMETROS GLOBAIS const int QUANT_PAIS_AVALIA = 4; int POP_TAM = 200; int N_CIDADES = 20; int BLOCKSIZE = 1024; int TOTALTHREADS = 2048; in...
41a7dd2a42aeffc849bfd75bc4fea5374e740a70.cu
#include "includes.h" //Bibliotecas Basicas //Biblioteca Thrust //Biblioteca cuRAND //PARAMETROS GLOBAIS const int QUANT_PAIS_AVALIA = 4; int POP_TAM = 200; int N_CIDADES = 20; int BLOCKSIZE = 1024; int TOTALTHREADS = 2048; int N_GERA = 100; const int MUT = 10; const int MAX = 19; const int MIN = 0; const int ELI...
07eaf7fe9f0a8a00474a00165770bd30588f7d9e.hip
// !!! This is a file automatically generated by hipify!!! // // Cuda Sudoku Solver // // Created by Arpit Jain // Copyright (c) 2014 New York University. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include <hiprand/hiprand_kernel.h> #include <math.h> #include <hip/hip_runtime.h> #define NUM_ITE...
07eaf7fe9f0a8a00474a00165770bd30588f7d9e.cu
// // Cuda Sudoku Solver // // Created by Arpit Jain // Copyright (c) 2014 New York University. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include <curand_kernel.h> #include <math.h> #include <cuda.h> #define NUM_ITERATION 10000 #define INIT_TEMPERATURE 0.4 #define MIN_TEMPERATURE 0.001 #define...
ae4257e763f4cda76374a3fa2832cb9e9ed9bc2f.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <stdlib.h> #include <stdio.h> __global__ void vector_add(int *out, int *a, int *b, int n){ int index = threadIdx.x; int stride = blockDim.x; for (int i = index; i < n; i+=stride) {...
ae4257e763f4cda76374a3fa2832cb9e9ed9bc2f.cu
#include <cuda.h> #include <cuda_runtime.h> #include <stdlib.h> #include <stdio.h> __global__ void vector_add(int *out, int *a, int *b, int n){ int index = threadIdx.x; int stride = blockDim.x; for (int i = index; i < n; i+=stride) { out[i] = a[i] + b[i]; } } int main() { int n = 10; ...
20558d213c6bc6f807203e30b74b7b92a311a5d6.hip
// !!! This is a file automatically generated by hipify!!! #include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <hiprand/hiprand_kernel.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <sys/time.h> #include "Cauta_Nod.cu" #include<chrono> #include<iostream> using namespac...
20558d213c6bc6f807203e30b74b7b92a311a5d6.cu
#include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <curand_kernel.h> #include <stdlib.h> #include <cuda.h> #include <sys/time.h> #include "Cauta_Nod.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{24,24}...
SortByPhi.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "VeloDefinitions.cuh" #include "math_constants.h" #include "Sorting.cuh" /** * @brief Calculates phi for each hit */ __device__ void sort_by_phi( const uint event_hit_start, const uint event_number_of_hits, float* ...
SortByPhi.cu
#include "VeloDefinitions.cuh" #include "math_constants.h" #include "Sorting.cuh" /** * @brief Calculates phi for each hit */ __device__ void sort_by_phi( const uint event_hit_start, const uint event_number_of_hits, float* hit_Xs, float* hit_Ys, float* hit_Zs, uint* hit_IDs, int32_t* hit_temp, uint* ...
658a4edf384535e241dbb444f58988e8bf543cd2.hip
// !!! This is a file automatically generated by hipify!!! #include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <hiprand/hiprand_kernel.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <sys/time.h> #include "mult_dist.cu" #include<chrono> #include<iostream> using namespac...
658a4edf384535e241dbb444f58988e8bf543cd2.cu
#include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <curand_kernel.h> #include <stdlib.h> #include <cuda.h> #include <sys/time.h> #include "mult_dist.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{24,24}...
ddea3fbeebd2467f825112dcaf9b97a0e8181361.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Pi - CUDA version 1 - uses integers for CUDA kernels * Author: Felipe Gutierrez, SBEL, July 2015 */ #include <iostream> #include <stdio.h> /* fprintf() */ #include <cstdlib> /* malloc and free */ #include <float.h> /* DBL_EPS...
ddea3fbeebd2467f825112dcaf9b97a0e8181361.cu
/* Pi - CUDA version 1 - uses integers for CUDA kernels * Author: Felipe Gutierrez, SBEL, July 2015 */ #include <iostream> #include <stdio.h> /* fprintf() */ #include <cstdlib> /* malloc and free */ #include <float.h> /* DBL_EPSILON() */ #include <math.h> /* sqrt() */ #include <ctime> #include "pi-kernel.h" /* On...
2a8fb4ea8b26a33c24711d98aba7fbaa1eaeadde.hip
// !!! This is a file automatically generated by hipify!!! #include <f/device/assert/cuda_assert.hpp> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <hip/hip_complex.h> #include <cassert> struct cuda_pattern; cuda_pattern* make_cuda_pattern( unsigned long n, unsigned long ug_size ); void release...
2a8fb4ea8b26a33c24711d98aba7fbaa1eaeadde.cu
#include <f/device/assert/cuda_assert.hpp> #include <cuda.h> #include <cuda_runtime.h> #include <cuComplex.h> #include <cassert> struct cuda_pattern; cuda_pattern* make_cuda_pattern( unsigned long n, unsigned long ug_size ); void release_cuda_pattern( cuda_pattern* cp ); void cuda_pattern_register_entry( cuda_patte...
b76ed6f531a6d695c24f55e5259baf61a8c07a12.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright 2018 Foundation for Research and Technology - Hellas * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy...
b76ed6f531a6d695c24f55e5259baf61a8c07a12.cu
/* * Copyright 2018 Foundation for Research and Technology - Hellas * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 [1] [1] * * Unless...
5e7df886a3676a028ef4c9fbe7c2f2358751acc8.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include <doctest.h> #include <taskflow/taskflow.hpp> // ---------------------------------------------------------------------------- // kernel helper // ---------------------------------...
5e7df886a3676a028ef4c9fbe7c2f2358751acc8.cu
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include <doctest.h> #include <taskflow/taskflow.hpp> // ---------------------------------------------------------------------------- // kernel helper // ---------------------------------------------------------------------------- template <typename T> __global__ void k_set(...
05aecd2d288434c5b98e1cd3763e07cc918cbfa1.hip
// !!! This is a file automatically generated by hipify!!! #define TIME 1 //#define PSKEL_LOGMODE 1 //#define TBB_USE_DEBUG 1 #define PSKEL_CUDA #include "PSkel.h" #include "hr_time.h" #include <omp.h> #include <fstream> #include <string> #include <stdio.h> #include <iostream> #include <sstream> #include <cmath> #in...
05aecd2d288434c5b98e1cd3763e07cc918cbfa1.cu
#define TIME 1 //#define PSKEL_LOGMODE 1 //#define TBB_USE_DEBUG 1 #define PSKEL_CUDA #include "PSkel.h" #include "hr_time.h" #include <omp.h> #include <fstream> #include <string> #include <stdio.h> #include <iostream> #include <sstream> #include <cmath> #include <cassert> #ifndef PSKEL_NEUMAN #ifndef PSKEL_MOORE...
525b23047e99d8b9a1ea049684f7524c89b79e87.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void kernel(int* D, int* q, int k){ // Find index of i row and j column of the distance array int i = blockIdx.x * blockDim.x + threadIdx.x; int j = blockIdx.y * blockDim.y + threadIdx.y; if(D[i * ...
525b23047e99d8b9a1ea049684f7524c89b79e87.cu
#include "includes.h" __global__ void kernel(int* D, int* q, int k){ // Find index of i row and j column of the distance array int i = blockIdx.x * blockDim.x + threadIdx.x; int j = blockIdx.y * blockDim.y + threadIdx.y; if(D[i * N + j] > D[i * N + k] + D[k * N + j]) { D[i * N + j] = D[i * N + k] + D[k * N + j]; q[i ...