hip_filename
stringlengths
5
84
hip_content
stringlengths
79
9.69M
cuda_filename
stringlengths
4
83
cuda_content
stringlengths
19
9.69M
a460dea88ea1580bb1b50851d2216c8e6c025e20.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // nvcc -O3 -std=c++11 -use_fast_math -ccbin g++ -arch=compute_75 -code=sm_75 -expt-relaxed-constexpr // Performs matrix mutliplication using shared memory tiles where ewach thread // may need to calculate and move more than one...
a460dea88ea1580bb1b50851d2216c8e6c025e20.cu
// nvcc -O3 -std=c++11 -use_fast_math -ccbin g++ -arch=compute_75 -code=sm_75 -expt-relaxed-constexpr // Performs matrix mutliplication using shared memory tiles where ewach thread // may need to calculate and move more than one data element. Assumes matrices // stored in row major order. The loop structure follow...
6d93a47dd86fc46e3b20663870a735e1c3f381ef.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * SASAPotential.cu * * Created on: Aug 6, 2010 * Author: zhmurov */ #include "../Core/global.h" #include "../Core/md.cuh" #include "sasa.h" #include "SASAPotential.cuh" namespace sasa_potential { class Log: public IL...
6d93a47dd86fc46e3b20663870a735e1c3f381ef.cu
/* * SASAPotential.cu * * Created on: Aug 6, 2010 * Author: zhmurov */ #include "../Core/global.h" #include "../Core/md.cuh" #include "sasa.h" #include "SASAPotential.cuh" namespace sasa_potential { class Log: public ILog { virtual void Write(const char* message) const { std::cout << makeTimePrefix() <<...
c82c2623096d000072ead89c37bccf1fd299d595.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void binaryTestingKernel ( int batchStart, int length, float* predictions, float* targets, int* result) { int withinBatch = blockIdx.x; int instanceStart = batchStart + withinBatch * length; int inst...
c82c2623096d000072ead89c37bccf1fd299d595.cu
#include "includes.h" __global__ void binaryTestingKernel ( int batchStart, int length, float* predictions, float* targets, int* result) { int withinBatch = blockIdx.x; int instanceStart = batchStart + withinBatch * length; int instanceEnd = instanceStart + length; for(int indexEntry = instanceStart; indexEntry < inst...
12bfe5e413f047f2d29334afb07cbd12d50ee03c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #ifndef THC_GENERIC_FILE #define THC_GENERIC_FILE "THH/generic/THHTensorRandom.hip" #else #include "ATen/hip/HIPContext.h" #define NUM_BLOCKS min((int)THCCeilDiv(size, (ptrdiff_t) BLOCK_SIZE), MAX_NUM_BLOCKS) #if defined(THC_REAL...
12bfe5e413f047f2d29334afb07cbd12d50ee03c.cu
#ifndef THC_GENERIC_FILE #define THC_GENERIC_FILE "THC/generic/THCTensorRandom.cu" #else #include "ATen/cuda/CUDAContext.h" #define NUM_BLOCKS min((int)THCCeilDiv(size, (ptrdiff_t) BLOCK_SIZE), MAX_NUM_BLOCKS) #if defined(THC_REAL_IS_FLOAT) || defined(THC_REAL_IS_DOUBLE) || defined(THC_REAL_IS_HALF) void THCTensor_...
15885edfb8ed76a79975ee832638d525936dc726.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "kd-tree-build.cuh" #include "multiple-radix-select.cuh" #include "quick-select.cuh" #include "radix-select.cuh" #include "stdio.h" #include "point.h" #include "helper_cuda.h" int nextPowerOf2_(int x) { --x; x |=...
15885edfb8ed76a79975ee832638d525936dc726.cu
#include "kd-tree-build.cuh" #include "multiple-radix-select.cuh" #include "quick-select.cuh" #include "radix-select.cuh" #include "stdio.h" #include "point.h" #include "helper_cuda.h" int nextPowerOf2_(int x) { --x; x |= x >> 1; x |= x >> 2; x |= x >> 4; x |= x >> 8; x |= x >> 16; return...
c108d0f616d95a17228c94dbfd31691cec174bc5.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 "reduce_moments.cu" #include<chrono> #include<iostream> using nam...
c108d0f616d95a17228c94dbfd31691cec174bc5.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 "reduce_moments.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{2...
572dd941e5c509de9736b17667b5e277d7961e19.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "Macro.h" #include "CUFLU.h" #if ( defined GPU && MODEL == ELBDM ) // useful macros #define to1D1(z,y,x) ( __umul24(z, FLU_NXT*FLU_NXT) + __umul24(y, FLU_NXT) + x ) #define to1D2(z,y,x) ( __umul24(z-FLU_GHOST_SIZE, PS...
572dd941e5c509de9736b17667b5e277d7961e19.cu
#include "Macro.h" #include "CUFLU.h" #if ( defined GPU && MODEL == ELBDM ) // useful macros #define to1D1(z,y,x) ( __umul24(z, FLU_NXT*FLU_NXT) + __umul24(y, FLU_NXT) + x ) #define to1D2(z,y,x) ( __umul24(z-FLU_GHOST_SIZE, PS2*PS2) + __umul24(y-FLU_GHOST_SIZE, PS2) + x-FLU_GHOST_SIZE ) #ifdef LAPLACIAN_4TH # d...
fb6f811484b5b8008f6f823e0781a7040ea5a447.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void scaleVector(float *d_res, const float *d_src, float scale, const int len) { const int pos = blockIdx.x * blockDim.x + threadIdx.x; if (pos >= len) return; d_res[pos] = d_src[pos] * scale; }
fb6f811484b5b8008f6f823e0781a7040ea5a447.cu
#include "includes.h" __global__ void scaleVector(float *d_res, const float *d_src, float scale, const int len) { const int pos = blockIdx.x * blockDim.x + threadIdx.x; if (pos >= len) return; d_res[pos] = d_src[pos] * scale; }
ee402021a4ae1ba805d0d58857eac3a76ac8950b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void Subtract( float * x, size_t idx, size_t N, float W0, float W1) { for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x) { x[(idx-2)*N+i] = W0*x[(idx-1)*N+i] - W1...
ee402021a4ae1ba805d0d58857eac3a76ac8950b.cu
#include "includes.h" __global__ void Subtract( float * x, size_t idx, size_t N, float W0, float W1) { for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x) { x[(idx-2)*N+i] = W0*x[(idx-1)*N+i] - W1*x[(idx-2)*N+i]; } return; }
2e8f172ce638c54d8a8ba2a4aa39e501b763e3cf.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> //#include <cutil_inline.h> extern "C" void runCudaPart(float a[], float b[], float c[], int n); __global__ void myKernel(float *a, float *b, float *c, int n) { int idx = blockI...
2e8f172ce638c54d8a8ba2a4aa39e501b763e3cf.cu
#include <stdio.h> #include <cuda.h> #include <cuda_runtime.h> //#include <cutil_inline.h> extern "C" void runCudaPart(float a[], float b[], float c[], int n); __global__ void myKernel(float *a, float *b, float *c, int n) { int idx = blockIdx.x*blockDim.x + threadIdx.x; //return; if (idx < n) { ...
14f16a44fa0df48ec51ad413f2290ee9fd019f9c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void gpu_init(int *mapad, int max, int size){ /*Identificaciones necesarios*/ int IDX_Thread = threadIdx.x; /*Identificacion del hilo en la dimension*/ int IDY_Thread = threadIdx.y; /*Identificacion...
14f16a44fa0df48ec51ad413f2290ee9fd019f9c.cu
#include "includes.h" __global__ void gpu_init(int *mapad, int max, int size){ /*Identificaciones necesarios*/ int IDX_Thread = threadIdx.x; /*Identificacion del hilo en la dimension*/ int IDY_Thread = threadIdx.y; /*Identificacion del hilo en la dimension y*/ int IDX_block = blockIdx.x; /*Identificacion del bloque en...
a45b2a54be21317b8ae03cc79c4737141de14799.hip
// !!! This is a file automatically generated by hipify!!! /* * Copyright (c) 2020-2021, 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...
a45b2a54be21317b8ae03cc79c4737141de14799.cu
/* * Copyright (c) 2020-2021, 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...
e08bbe89e9c832c390fd0a2ec3bb70aa9979c632.hip
// !!! This is a file automatically generated by hipify!!! #define GLM_FORCE_CUDA #include <stdio.h> #include <hip/hip_runtime.h> #include <cmath> #include <glm/glm.hpp> #include "utilityCore.hpp" #include "kernel.h" // LOOK-2.1 potentially useful for doing grid-based neighbor search #ifndef imax #define imax( a, b ) ...
e08bbe89e9c832c390fd0a2ec3bb70aa9979c632.cu
#define GLM_FORCE_CUDA #include <stdio.h> #include <cuda.h> #include <cmath> #include <glm/glm.hpp> #include "utilityCore.hpp" #include "kernel.h" // LOOK-2.1 potentially useful for doing grid-based neighbor search #ifndef imax #define imax( a, b ) ( ((a) > (b)) ? (a) : (b) ) #endif #ifndef imin #define imin( a, b ) ...
60cb96fbc1aafc318e195c1884e23b7e74a4095b.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 "bpnn_layerforward_CUDA.cu" #include<chrono> #include<iostream> u...
60cb96fbc1aafc318e195c1884e23b7e74a4095b.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 "bpnn_layerforward_CUDA.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{1...
14382be3b50f713a3f2ab4eb40a05bf719796bdb.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* ****************************************************************************** * * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at *...
14382be3b50f713a3f2ab4eb40a05bf719796bdb.cu
/* ****************************************************************************** * * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * * See the NOTICE file distributed wit...
2be42d040ae58e3b9e180d954241833f8cda54fc.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "network_functions/PsiOkVector.hpp" #include "quantum_states.hpp" #include "spin_ensembles.hpp" #include "types.h" namespace rbm_on_gpu { template<typename Psi_t> void psi_O_k_vector(complex<double>* result, const Psi_t&...
2be42d040ae58e3b9e180d954241833f8cda54fc.cu
#include "network_functions/PsiOkVector.hpp" #include "quantum_states.hpp" #include "spin_ensembles.hpp" #include "types.h" namespace rbm_on_gpu { template<typename Psi_t> void psi_O_k_vector(complex<double>* result, const Psi_t& psi, const Spins& spins) { complex_t* result_ptr; auto O_k_length = psi.get_num...
ae87076c1bea7d9c37221ef0f7a485b8f97822e0.hip
// !!! This is a file automatically generated by hipify!!! #include "nne.cuh" #include "hip/hip_runtime.h" #include "hip/hip_runtime_api.h" #include "device_launch_parameters.h" #include <cstdlib> __global__ void nodeCal(float* inList, float* wList, float* outList); __global__ void nodeLog(float* outputList, float sig...
ae87076c1bea7d9c37221ef0f7a485b8f97822e0.cu
#include "nne.cuh" #include "cuda.h" #include "cuda_runtime_api.h" #include "device_launch_parameters.h" #include <cstdlib> __global__ void nodeCal(float* inList, float* wList, float* outList); __global__ void nodeLog(float* outputList, float sigmoidConst); __global__ void nodeGradCal(float* wList, float* outputList, ...
7b6b5614c0b75618e0fec7faa80a25ddf081bc4f.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 "uplo_erfc.cu" #include<chrono> #include<iostream> using namespac...
7b6b5614c0b75618e0fec7faa80a25ddf081bc4f.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 "uplo_erfc.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{24,24}...
6e21199263c0bdc5253542394dc13e69b3ef3177.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "THHTensorRandom.h" #include "THHDeviceUtils.cuh" #include "THHGeneral.h" #include "THHTensorCopy.h" #include "THHTensorMath.h" #include "THHReduceApplyUtils.cuh" #include "THHTensorRandom.cuh" #include "THHGenerator.hpp" #...
6e21199263c0bdc5253542394dc13e69b3ef3177.cu
#include "THCTensorRandom.h" #include "THCDeviceUtils.cuh" #include "THCGeneral.h" #include "THCTensorCopy.h" #include "THCTensorMath.h" #include "THCReduceApplyUtils.cuh" #include "THCTensorRandom.cuh" #include "THCGenerator.hpp" #include "ATen/Config.h" #include "ATen/cuda/_curand_mtgp32_host.h" #include <thrust/fu...
c688b29fa34fb12afeff0e64166339ed0cbbe035.hip
// !!! This is a file automatically generated by hipify!!! // Copyright (c) 2019, NVIDIA Corporation. All rights reserved. // // This work is made available under the Nvidia Source Code License-NC. // To view a copy of this license, visit // https://nvlabs.github.io/stylegan2/license.html #include <torch/types.h> #in...
c688b29fa34fb12afeff0e64166339ed0cbbe035.cu
// Copyright (c) 2019, NVIDIA Corporation. All rights reserved. // // This work is made available under the Nvidia Source Code License-NC. // To view a copy of this license, visit // https://nvlabs.github.io/stylegan2/license.html #include <torch/types.h> #include <ATen/ATen.h> #include <ATen/AccumulateType.h> #inclu...
14778d0b1fc6e1cfa0a58cbdb36021377981187a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <time.h> #include <GL/glut.h> #include <GL/gl.h> #include <malloc.h> #include <signal.h> /****************************************************************************** Displays two...
14778d0b1fc6e1cfa0a58cbdb36021377981187a.cu
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <GL/glut.h> #include <GL/gl.h> #include <malloc.h> #include <signal.h> /****************************************************************************** Displays two grey scale images. On the left is an image that has come from an image processing pip...
37c9d88ab760fcb91e31010830b396100329e1a3.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #define TILE_SIZE 4 #define chunk_size 2 /*The algorithm and code given in the main reference paper have been followed*/ /*All matrices st...
37c9d88ab760fcb91e31010830b396100329e1a3.cu
#include <cuda_runtime.h> #include <cuda.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #define TILE_SIZE 4 #define chunk_size 2 /*The algorithm and code given in the main reference paper have been followed*/ /*All matrices stored and accessed in row major form*/ /*Function to perform rank-k upda...
4e345fdcd33c677273ea91645e31b73fda738ca4.hip
// !!! This is a file automatically generated by hipify!!! #include "hipsparse.h" #include <hip/hip_runtime.h> #include "utils.h" #include "time.h" int main(int argc, char *argv[]) { /*********************************************** * initialize program's input parameters * *******************************...
4e345fdcd33c677273ea91645e31b73fda738ca4.cu
#include "cusparse.h" #include <cuda_runtime.h> #include "utils.h" #include "time.h" int main(int argc, char *argv[]) { /*********************************************** * initialize program's input parameters * ***********************************************/ double alpha = 1; double beta = 0; doub...
d6ae4dd7fef8e131fac928f61bc54451a285d8ec.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> using namespace std; __global__ void add( int a, int b, int *c ) { *c = a + b; } int main( void ) { int c; int *dev_c; hipMalloc( &dev_c, sizeof(int) ) ; hipLaunchKernelGGL(( add), dim3(1),d...
d6ae4dd7fef8e131fac928f61bc54451a285d8ec.cu
#include <iostream> using namespace std; __global__ void add( int a, int b, int *c ) { *c = a + b; } int main( void ) { int c; int *dev_c; cudaMalloc( &dev_c, sizeof(int) ) ; add<<<1,1>>>( 2, 7, dev_c ); cudaMemcpy( &c, dev_c, sizeof(int),cudaMemcpyDeviceToHost ); //printf( "2 + 7 = %d\n...
f946785963d46923f5f66426b668b93dcac0d92a.hip
// !!! This is a file automatically generated by hipify!!! #include <unistd.h> #include <algorithm> #include <cstdlib> #include <limits> #include <vector> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <driver_functions.h> #define STB_IMAGE_IMPLEMENTATION #include "../../utils/stb_image.h" #def...
f946785963d46923f5f66426b668b93dcac0d92a.cu
#include <unistd.h> #include <algorithm> #include <cstdlib> #include <limits> #include <vector> #include <cuda.h> #include <cuda_runtime.h> #include <driver_functions.h> #define STB_IMAGE_IMPLEMENTATION #include "../../utils/stb_image.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "../../utils/stb_image_write....
bdf7f4049fef336ea74280e6c20c86a0f0b199ac.hip
// !!! This is a file automatically generated by hipify!!! #include <cstdio> #include <cmath> #include <hip/hip_runtime.h> static const int ThreadsPerBlock = 512; static __global__ void fractal(const int width, const int start_frame, const int gpu_frames, unsigned char* const pic) { // todo: use the GPU to compute ...
bdf7f4049fef336ea74280e6c20c86a0f0b199ac.cu
#include <cstdio> #include <cmath> #include <cuda.h> static const int ThreadsPerBlock = 512; static __global__ void fractal(const int width, const int start_frame, const int gpu_frames, unsigned char* const pic) { // todo: use the GPU to compute the requested frames (base the code on the previous project) } unsign...
83e8a64538b9b01e8a105aa9ecb5c76f2f686fdd.hip
// !!! This is a file automatically generated by hipify!!! // Chiranjit Mukherjee (chiranjit@soe.ucsc.edu) #include <cstdlib> #include <fstream> #include <iostream> #include <stdio.h> #include <time.h> #include <math.h> #include <string.h> #define SSS // If uncommented, runs the Stochastic Shotgun Search //#...
83e8a64538b9b01e8a105aa9ecb5c76f2f686fdd.cu
// Chiranjit Mukherjee (chiranjit@soe.ucsc.edu) #include <cstdlib> #include <fstream> #include <iostream> #include <stdio.h> #include <time.h> #include <math.h> #include <string.h> #define SSS // If uncommented, runs the Stochastic Shotgun Search //#define MCMC // If uncommented, runs the Markov chai...
9e0f2e77461fe543705b25dbccc05fc9a7c1e348.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 1.4.1) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver December 2013 @generated s Tue Dec 17 13:18:45 2013 @author Stan To...
9e0f2e77461fe543705b25dbccc05fc9a7c1e348.cu
/* -- MAGMA (version 1.4.1) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver December 2013 @generated s Tue Dec 17 13:18:45 2013 @author Stan Tomov @author Mark Gates */ #include "common_magma.h" #define PRECISION_s #define ...
fb628a4d7c0994460b1cfbca64577cff055a1140.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "cuda_field.cu" extern "C" { __global__ void field_init(int m){ cuda_field_init(m); } __global__ void make_unit(cuda_field_element* B, int n){ int thidX = (blockIdx.x * blockDim.x) + threadIdx.x; int thidY = (blockIdx...
fb628a4d7c0994460b1cfbca64577cff055a1140.cu
#include "cuda_field.cu" extern "C" { __global__ void field_init(int m){ cuda_field_init(m); } __global__ void make_unit(cuda_field_element* B, int n){ int thidX = (blockIdx.x * blockDim.x) + threadIdx.x; int thidY = (blockIdx.y * blockDim.y) + threadIdx.y; if(thidX < n && thidY < n){ B[thidX*n+thidY] = (thidX...
ca3e2cce8910ed17bb1163ea37805a94a1daa93c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> #include <stdlib.h> #define N (2048*2048) #define THREADS_PER_BLOCK 512 using namespace std; __global__ void mykernal() { // Run on device and called by host } __global__ void add(int *a, int *b, int *c, int n...
ca3e2cce8910ed17bb1163ea37805a94a1daa93c.cu
#include <iostream> #include <stdlib.h> #define N (2048*2048) #define THREADS_PER_BLOCK 512 using namespace std; __global__ void mykernal() { // Run on device and called by host } __global__ void add(int *a, int *b, int *c, int n) { // *c = *a + *b; int index = threadIdx.x + blockIdx.x * blockDim.x; if (...
aacc2e8726aca6e1960caa5db88f566e9603cd5b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #define COALESCED_NUM 16 #define blockDimX 256 #define blockDimY 1 #define gridDimX (gridDim.x) #define gridDimY (gridDim.y) #define idx (blockIdx.x*blockDimX+threadIdx.x) #define idy (blockIdx.y*blockDimY+threadIdx.y) #define bidy ...
aacc2e8726aca6e1960caa5db88f566e9603cd5b.cu
#define COALESCED_NUM 16 #define blockDimX 256 #define blockDimY 1 #define gridDimX (gridDim.x) #define gridDimY (gridDim.y) #define idx (blockIdx.x*blockDimX+threadIdx.x) #define idy (blockIdx.y*blockDimY+threadIdx.y) #define bidy (blockIdx.y) #define bidx (blockIdx.x) #define tidx (threadIdx.x) #define tidy (threadId...
ab776fcae4392987c088df033d505acb72705143.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Homework 2 // Image Blurring // // In this homework we are blurring an image. To do this, imagine that we have // a square array of weight values. For each pixel in the image, imagine that we // overlay this square array of weigh...
ab776fcae4392987c088df033d505acb72705143.cu
// Homework 2 // Image Blurring // // In this homework we are blurring an image. To do this, imagine that we have // a square array of weight values. For each pixel in the image, imagine that we // overlay this square array of weights on top of the image such that the center // of the weight array is aligned with the c...
89984f25c122692a54dda308773e5ca11cd40207.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "lab3.h" #include <cstdio> __device__ __host__ int CeilDiv(int a, int b) { return (a-1)/b + 1; } __device__ __host__ int CeilAlign(int a, int b) { return CeilDiv(a, b) * b; } __global__ void SimpleClone(const float *backg...
89984f25c122692a54dda308773e5ca11cd40207.cu
#include "lab3.h" #include <cstdio> __device__ __host__ int CeilDiv(int a, int b) { return (a-1)/b + 1; } __device__ __host__ int CeilAlign(int a, int b) { return CeilDiv(a, b) * b; } __global__ void SimpleClone(const float *background, const float *target, const float *mask, float *output...
0152bc8353bcf5830bc2ba29e2403f9b39698976.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "imagesHandler.h" #include <thrust/device_vector.h> #include <thrust/host_vector.h> #include <algorithm> #include <cfloat> #include <chrono> #include <random> #include <vector> #include <stdexcept> #include <string> struc...
0152bc8353bcf5830bc2ba29e2403f9b39698976.cu
#include "imagesHandler.h" #include <thrust/device_vector.h> #include <thrust/host_vector.h> #include <algorithm> #include <cfloat> #include <chrono> #include <random> #include <vector> #include <stdexcept> #include <string> struct Data { explicit Data(int size) : size(size), bytes(size * sizeof(float)){ cudaM...
9034a7fe70dfd8279324540d897926d2dead29ef.hip
// !!! This is a file automatically generated by hipify!!! // // Created by klaus on 09.07.21. // #include "ImmediateFunctionsThrust.cuh" #include "StreamFunctionHelper.cuh" #include <thrust/transform.h> #include <thrust/functional.h> #include <thrust/device_ptr.h> enum ImmOp { ADD, MUL, DIVI, DIVII,...
9034a7fe70dfd8279324540d897926d2dead29ef.cu
// // Created by klaus on 09.07.21. // #include "ImmediateFunctionsThrust.cuh" #include "StreamFunctionHelper.cuh" #include <thrust/transform.h> #include <thrust/functional.h> #include <thrust/device_ptr.h> enum ImmOp { ADD, MUL, DIVI, DIVII, SUBI, SUBII, MODI, MODII }; struct immFun...
938bafd8002e94b8b7f2c1d63953138cffe05d3f.hip
// !!! This is a file automatically generated by hipify!!! #include "Mesh.cuh" #include "book.cuh" #include <fstream> #include <iostream> #include <string> #include <sstream> #include <vector> #include <unordered_map> #include <map> using namespace std; Mesh::Mesh() { edges = NULL; verts = NULL; faces = NULL; edgeN...
938bafd8002e94b8b7f2c1d63953138cffe05d3f.cu
#include "Mesh.cuh" #include "book.cuh" #include <fstream> #include <iostream> #include <string> #include <sstream> #include <vector> #include <unordered_map> #include <map> using namespace std; Mesh::Mesh() { edges = NULL; verts = NULL; faces = NULL; edgeNum = 0; vertNum = 0; } Mesh::~Mesh() { } bool Mesh::Load...
b6ad9eec7e73b6a825f856a783d4a1b33d589506.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* % Function: demapper % Description: Maps complex-valued modulation symbols to binary digits using hard decision % Inputs: *symbols_R_h: Real part of the symbols % N: Number of output bits % Qm: Demodulation type (1=...
b6ad9eec7e73b6a825f856a783d4a1b33d589506.cu
/* % Function: demapper % Description: Maps complex-valued modulation symbols to binary digits using hard decision % Inputs: *symbols_R_h: Real part of the symbols % N: Number of output bits % Qm: Demodulation type (1=bpsk, 2=qpsk, 4=16qam, or 6=64qam) % Outputs: *bits_h: Demodulated bits By: Ahmad Nour...
b22dbe9ac871694eb7d142362a6779561c6c1d11.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) 2018-2023, 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 ...
b22dbe9ac871694eb7d142362a6779561c6c1d11.cu
/* * Copyright (c) 2018-2023, 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...
b358a4cc0b5132738ee9fdf15368b0d24c9b7eb2.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <ATen/ATen.h> #include <ATen/AccumulateType.h> #include <ATen/native/Pool.h> #include <ATen/hip/HIPContext.h> #include <ATen/hip/HIPApplyUtils.cuh> #include <ATen/hip/detail/TensorInfo.cuh> #include <ATen/hip/detail/IndexUt...
b358a4cc0b5132738ee9fdf15368b0d24c9b7eb2.cu
#include <ATen/ATen.h> #include <ATen/AccumulateType.h> #include <ATen/native/Pool.h> #include <ATen/cuda/CUDAContext.h> #include <ATen/cuda/CUDAApplyUtils.cuh> #include <ATen/cuda/detail/TensorInfo.cuh> #include <ATen/cuda/detail/IndexUtils.cuh> #include <ATen/cuda/detail/KernelUtils.h> #include <THC/THCNumerics.cuh> ...
c3ab18c2ba82b4a5f33cae5d7067ce7b843ef441.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #define imin(a,b) (a<b?a:b) const int threadsPerBlock = 256; __global__ void gpu_partial_dot_product( double *a, double *b, double *c, int N) { __shared__ double cache[threadsPerBlock]; int tid = thread...
c3ab18c2ba82b4a5f33cae5d7067ce7b843ef441.cu
#include <stdio.h> #define imin(a,b) (a<b?a:b) const int threadsPerBlock = 256; __global__ void gpu_partial_dot_product( double *a, double *b, double *c, int N) { __shared__ double cache[threadsPerBlock]; int tid = threadIdx.x + blockIdx.x * blockDim.x; int cacheIndex = threadIdx.x; double temp = ...
b634832f94ded6b349d1910e423fd4ef51291bf9.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * SPDX-FileCopyrightText: Copyright (c) 1993-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not ...
b634832f94ded6b349d1910e423fd4ef51291bf9.cu
/* * SPDX-FileCopyrightText: Copyright (c) 1993-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * 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 Lic...
b30ae363a8ed2f9772e70d4a832d0904a2e3aef9.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <cfloat> #include <vector> #include "caffe/layers/roi_pooling_layer.hpp" namespace caffe { template <typename Dtype> __global__ void ROIPoolForwardMax(const int nthreads, const Dtype* bottom_data, const Dtype spatial...
b30ae363a8ed2f9772e70d4a832d0904a2e3aef9.cu
#include <cfloat> #include <vector> #include "caffe/layers/roi_pooling_layer.hpp" namespace caffe { template <typename Dtype> __global__ void ROIPoolForwardMax(const int nthreads, const Dtype* bottom_data, const Dtype spatial_scale, const int channels, const int height, const int width, const int pooled_heig...
61303ac7c860509021fe62b6a5171bd45db4639e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 1.6.2) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date May 2015 @generated from zgecsrmv.cu normal z -> c, Sun May 3 11:22:...
61303ac7c860509021fe62b6a5171bd45db4639e.cu
/* -- MAGMA (version 1.6.2) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date May 2015 @generated from zgecsrmv.cu normal z -> c, Sun May 3 11:22:58 2015 */ #include "common_magma.h" #define BLOCK_SIZE 256 // CSR-SpMV kernel __glo...
dbb92a1e8157ab708117dd71399b9dabc03ee479.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Copyright 2021 Facebook * * 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.apa...
dbb92a1e8157ab708117dd71399b9dabc03ee479.cu
/* Copyright 2021 Facebook * * 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 wri...
d43e329201f35884a0444e1e0aef5ec05263b6c3.hip
// !!! This is a file automatically generated by hipify!!! #include <stdlib.h> #include <hip/hip_runtime_api.h> #define N 1000000 __global__ void vector_add(float *out, float *a, float *b, int n) { int index = blockIdx.x * blockDim.x + threadIdx.x; int stride = blockDim.x * gridDim.x; for(int i = index; ...
d43e329201f35884a0444e1e0aef5ec05263b6c3.cu
#include <stdlib.h> #include <cuda_profiler_api.h> #define N 1000000 __global__ void vector_add(float *out, float *a, float *b, int n) { int index = blockIdx.x * blockDim.x + threadIdx.x; int stride = blockDim.x * gridDim.x; for(int i = index; i < n; i += stride){ out[i] = a[i] + b[i]; } } i...
7a0aeb3236a5c041519e74f71a562c853adeaec2.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // SPDX-FileCopyrightText: 2021 CERN // SPDX-License-Identifier: Apache-2.0 #include "TestEm3.h" #include "TestEm3.cuh" #include <AdePT/Atomic.h> #include <AdePT/BVHNavigator.h> #include <AdePT/MParray.h> #include <CopCore/Global...
7a0aeb3236a5c041519e74f71a562c853adeaec2.cu
// SPDX-FileCopyrightText: 2021 CERN // SPDX-License-Identifier: Apache-2.0 #include "TestEm3.h" #include "TestEm3.cuh" #include <AdePT/Atomic.h> #include <AdePT/BVHNavigator.h> #include <AdePT/MParray.h> #include <CopCore/Global.h> #include <CopCore/PhysicalConstants.h> #include <CopCore/Ranluxpp.h> #include <VecG...
de9566464218772201bc6ace65fd724c95f6f14c.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <math.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> /* * This program computes the sum of the elements of * vector v using the pairwise (cascading) sum algorithm. */ #define N 8 // length o...
de9566464218772201bc6ace65fd724c95f6f14c.cu
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <cuda.h> #include <cuda_runtime.h> /* * This program computes the sum of the elements of * vector v using the pairwise (cascading) sum algorithm. */ #define N 8 // length of vector v. MUST BE A POWER OF 2!!! // Fill the vector v with n random f...
b77182dfdac08b4e01619eaa501aa98b9ee0b3fb.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 "matrix_multiply_tiling_cuda.cu" #include<chrono> #include<iostre...
b77182dfdac08b4e01619eaa501aa98b9ee0b3fb.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 "matrix_multiply_tiling_cuda.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,...
5cbf1f738c1fcc50ba8f155a1829e58df1b75ec1.hip
// !!! This is a file automatically generated by hipify!!! /*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If...
5cbf1f738c1fcc50ba8f155a1829e58df1b75ec1.cu
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, install...
e1df70620f45ee8b3ef1d70cedddb548424e58ae.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "Prerequisites.cuh" #include "Angles.cuh" #include "Correlation.cuh" #include "CTF.cuh" #include "FFT.cuh" #include "Generics.cuh" #include "Helper.cuh" #include "ImageManipulation.cuh" #include "Masking.cuh" #include "Opti...
e1df70620f45ee8b3ef1d70cedddb548424e58ae.cu
#include "Prerequisites.cuh" #include "Angles.cuh" #include "Correlation.cuh" #include "CTF.cuh" #include "FFT.cuh" #include "Generics.cuh" #include "Helper.cuh" #include "ImageManipulation.cuh" #include "Masking.cuh" #include "Optimization.cuh" #include "Transformation.cuh" namespace gtom { ////////////////////////...
60b2152366514114cb95046d0ac401105a8a6d76.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * flyingEdgesAlgorithm.cpp * * Created on: Feb 17, 2017 * Author: dbourge */ #include "FlyingEdgesAlgorithm.h" #include "CudaMarchingCubesTables.h" #include <numeric> #include <algorithm> // TODO #include <iostream>...
60b2152366514114cb95046d0ac401105a8a6d76.cu
/* * flyingEdgesAlgorithm.cpp * * Created on: Feb 17, 2017 * Author: dbourge */ #include "FlyingEdgesAlgorithm.h" #include "CudaMarchingCubesTables.h" #include <numeric> #include <algorithm> // TODO #include <iostream> // TODO #define MAX_X_GRID 65535 // says larger but doesnt work if larger.. #define MA...
2b5d176c3b9a6ccb0ed95889abee7de34820199b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <unistd.h> const int threadsPerBlock_x = 16; //naive __global__ void MatrixMulKernel1(float *dev_a, float *dev_b, float *dev_c, int n) { int x = threadIdx.x + b...
2b5d176c3b9a6ccb0ed95889abee7de34820199b.cu
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <unistd.h> const int threadsPerBlock_x = 16; //naive __global__ void MatrixMulKernel1(float *dev_a, float *dev_b, float *dev_c, int n) { int x = threadIdx.x + blockIdx.x * blockDim.x; int y = threadIdx.y + blockIdx.y * blockDim.y; float temp...
aa48415c5a4a6cdba7ed4a2c2fce8ae590f02f4f.hip
// !!! This is a file automatically generated by hipify!!! #include "scan.hpp" #include "checkCudaErrors.hpp" #include "cudaMemory.hpp" #include "functions.hpp" #include <hip/hip_runtime.h> #include <thrust/reduce.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> // -------------------- GPU Par...
aa48415c5a4a6cdba7ed4a2c2fce8ae590f02f4f.cu
#include "scan.hpp" #include "checkCudaErrors.hpp" #include "cudaMemory.hpp" #include "functions.hpp" #include <cuda.h> #include <thrust/reduce.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> // -------------------- GPU Parallel Reduce Add (thrust) -------------------- void thrustGPUscan( ...
377c6aff99921b0db3d20c1b76b4a80606cff13e.hip
// !!! This is a file automatically generated by hipify!!! #include "THHGeneral.h" #include "THHTensorCopy.h" #include "THHApply.cuh" #include "THHNumerics.cuh" inline int curGPU() { int curDev; THCudaCheck(hipGetDevice(&curDev)); return curDev; } // Copy operator for the pointwise apply kernel template <typen...
377c6aff99921b0db3d20c1b76b4a80606cff13e.cu
#include "THCGeneral.h" #include "THCTensorCopy.h" #include "THCApply.cuh" #include "THCNumerics.cuh" inline int curGPU() { int curDev; THCudaCheck(cudaGetDevice(&curDev)); return curDev; } // Copy operator for the pointwise apply kernel template <typename TypeDst, typename TypeSrc> struct CopyOp { __device_...
a945b2fb9d129ce3b86b4ea305d3ef782d3c24e0.hip
// !!! This is a file automatically generated by hipify!!! #include "THHReduceApplyUtils.cuh" #include <assert.h> #include <stdlib.h> // Maximum size per grid dimension that we assume (compute capability >= 2.0) #define MAX_GRID_SIZE 65535LL void THCCheckTensorDims(THCState* state, THCudaTensor* tensor, int arg) { ...
a945b2fb9d129ce3b86b4ea305d3ef782d3c24e0.cu
#include "THCReduceApplyUtils.cuh" #include <assert.h> #include <stdlib.h> // Maximum size per grid dimension that we assume (compute capability >= 2.0) #define MAX_GRID_SIZE 65535LL void THCCheckTensorDims(THCState* state, THCudaTensor* tensor, int arg) { int64_t dims = THCudaTensor__nDimension(state, tensor); ...
f825bc419b9469cb769c330293762030dce44d64.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime_api.h> #include <stdio.h> #include <iostream> #include <vector> #include <algorithm> #include <numeric> #define AxCheckError(err) CheckError(err,__FUNCTION__, __LINE__) #define AxCheckErrorMsg(err, msg) CheckErrorMsg(err, msg, __FUNCT...
f825bc419b9469cb769c330293762030dce44d64.cu
#include <cuda_profiler_api.h> #include <stdio.h> #include <iostream> #include <vector> #include <algorithm> #include <numeric> #define AxCheckError(err) CheckError(err,__FUNCTION__, __LINE__) #define AxCheckErrorMsg(err, msg) CheckErrorMsg(err, msg, __FUNCTION__, __LINE__) void GenerateTestData(int const N, float* c...
9edc7f985e5d744a2284ba2b270e8d30f72ef30c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // ------------------------------------------------------------------ // Deep Feature Flow // Copyright (c) 2017 Microsoft // Licensed under The MIT License // Written by Yuwen Xiong // ----------------------------------------------...
9edc7f985e5d744a2284ba2b270e8d30f72ef30c.cu
// ------------------------------------------------------------------ // Deep Feature Flow // Copyright (c) 2017 Microsoft // Licensed under The MIT License // Written by Yuwen Xiong // ------------------------------------------------------------------ // Based on: // Faster R-CNN // Copyright (c) 2015 Microsoft // Lic...
eb733ff8554233fb76e42d6fb934771564301bc3.hip
// !!! This is a file automatically generated by hipify!!! //---------------------------------------------------------------------------// // Copyright (c) 2013-2014 Kyle Lutz <kyle.r.lutz@gmail.com> // // Distributed under the Boost Software License, Version 1.0 // See accompanying file LICENSE_1_0.txt or copy at // h...
eb733ff8554233fb76e42d6fb934771564301bc3.cu
//---------------------------------------------------------------------------// // Copyright (c) 2013-2014 Kyle Lutz <kyle.r.lutz@gmail.com> // // Distributed under the Boost Software License, Version 1.0 // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // See http://boosto...
a5724c9a8bf3c2e09b5908067526e6ad5f946892.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> #include <sys/time.h> #include <ctime> #include <fstream> #include <cmath> #include <cstdlib> using namespace std; //Eratosthanes' sieve on odds __global__ static void sieve(char *primes, int n, int root) { ...
a5724c9a8bf3c2e09b5908067526e6ad5f946892.cu
#include <iostream> #include <sys/time.h> #include <ctime> #include <fstream> #include <cmath> #include <cstdlib> using namespace std; //Eratosthanes' sieve on odds __global__ static void sieve(char *primes, int n, int root) { int i = blockIdx.x * blockDim.x + threadIdx.x + 3; if (i < root && primes[i] == ...
10f31187a4dd9d75844051e4fbc3364404d5b05d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // sudo nvprof --unified-memory-profiling off ./ManagedMemoryVecAdd // Use this command for profiling without errors for unified memory profiling #include<iostream> __global__ void vecAdd(int *a, int *b, int *c, int N){ int i = bl...
10f31187a4dd9d75844051e4fbc3364404d5b05d.cu
// sudo nvprof --unified-memory-profiling off ./ManagedMemoryVecAdd // Use this command for profiling without errors for unified memory profiling #include<iostream> __global__ void vecAdd(int *a, int *b, int *c, int N){ int i = blockDim.x * blockIdx.x + threadIdx.x; if(i < N){ c[i] = a[i] + b[i]; } } __global__ voi...
41b4d3b1fe2b1f0571eb363973cbea250a3ddc8b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * This example explains how to divide the host and * device code into separate files using vector addition */ #include "kernel.h" #define N 64 __global__ void addKernel(float *a,float *b) { int idx=threadIdx.x+blockI...
41b4d3b1fe2b1f0571eb363973cbea250a3ddc8b.cu
/* * This example explains how to divide the host and * device code into separate files using vector addition */ #include "kernel.h" #define N 64 __global__ void addKernel(float *a,float *b) { int idx=threadIdx.x+blockIdx.x*blockDim.x; if(idx>=N) return; a[idx]+=b[idx]; } void vectorAdd() { //host m...
e4cef96fe37ab2986e9875037f884879ca73b0ed.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "common.h" __global__ void CorrKernel(const float* gpuIm1, const float* gpuIm2, float* R, int N1, int N2, int M); void checkCUDAError(const char *msg); void GPUCorr(float* R, const float* im1, const float* im2, int M, int...
e4cef96fe37ab2986e9875037f884879ca73b0ed.cu
#include "common.h" __global__ void CorrKernel(const float* gpuIm1, const float* gpuIm2, float* R, int N1, int N2, int M); void checkCUDAError(const char *msg); void GPUCorr(float* R, const float* im1, const float* im2, int M, int N1, int N2) { // pointer to device memory. float* gpuR; float* gpuIm1; ...
ebb959ed5c9e3ee136020b4353bea807574af758.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "cuimage/cuda/arithmetic.h" #include "cuimage/cuda/devptr.h" #include "cuimage/cuda/kernel.h" #include "cuimage/cuda/utils.h" #include "cuimage/operations/math_cu.h" #include <nvfunctional> namespace cuimage { template <...
ebb959ed5c9e3ee136020b4353bea807574af758.cu
#include "cuimage/cuda/arithmetic.h" #include "cuimage/cuda/devptr.h" #include "cuimage/cuda/kernel.h" #include "cuimage/cuda/utils.h" #include "cuimage/operations/math_cu.h" #include <nvfunctional> namespace cuimage { template <typename T, typename Op> __global__ void g_Apply(DevPtr<T> input1, const DevPtr<T> input...
81fe945b9a405d0cc1660326da55d2ca4377de80.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "sph_header.h" #include "sph_param.h" #include "sph_math.h" #include "sph_kernel.cu" #include <cutil_math.h> #define EXP 2.718281f #define EXT2 1e-12f #define EXT 1e-6f __device__ float wavelet(float input) { float sigma...
81fe945b9a405d0cc1660326da55d2ca4377de80.cu
#include "sph_header.h" #include "sph_param.h" #include "sph_math.h" #include "sph_kernel.cu" #include <cutil_math.h> #define EXP 2.718281f #define EXT2 1e-12f #define EXT 1e-6f __device__ float wavelet(float input) { float sigma=2.0; return 2.0f/(pow(PI, 0.25f)*pow(3.0f*sigma, 0.5f)) * ((input*input)/(sigma*sigma...
ca1db359ace27cfcb882c4c2d42842565c4ca240.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void device_api_kernel(hiprandState_t *states, float *out, int N) { int i; int tid = blockIdx.x * blockDim.x + threadIdx.x; int nthreads = gridDim.x * blockDim.x; hiprandState_t *state = states + tid...
ca1db359ace27cfcb882c4c2d42842565c4ca240.cu
#include "includes.h" __global__ void device_api_kernel(curandState *states, float *out, int N) { int i; int tid = blockIdx.x * blockDim.x + threadIdx.x; int nthreads = gridDim.x * blockDim.x; curandState *state = states + tid; curand_init(9384, tid, 0, state); for (i = tid; i < N; i += nthreads) { float rand = curan...
32d6cf42e6b37d3280ef05844eb277d1bed81cc2.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "gpu_common.h" #include <math.h> namespace seq2seq { #define SEQ2SEQ_TANH(x) (__fdividef(2.0f, (1.0f + __expf(-2.0f*(x)))) - 1.0f) #define SEQ2SEQ_TANH_D(x) (1.0f - (x) * (x)) #define SEQ2SEQ_SIGMOID(x) (_...
32d6cf42e6b37d3280ef05844eb277d1bed81cc2.cu
#include "gpu_common.h" #include <math.h> namespace seq2seq { #define SEQ2SEQ_TANH(x) (__fdividef(2.0f, (1.0f + __expf(-2.0f*(x)))) - 1.0f) #define SEQ2SEQ_TANH_D(x) (1.0f - (x) * (x)) #define SEQ2SEQ_SIGMOID(x) (__fdividef(1.0f, 1.0f + __expf(-(x)))) #define SEQ2SEQ_SIGMOID_D(x) ((x) * (1.0f - (x))...
b72bf09bf4123fc2da4ef7e7dc0188ad67dea816.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <arbor/gpu/gpu_common.hpp> #include <arbor/gpu/math_cu.hpp> #include <arbor/gpu/reduce_by_key.hpp> #include <arbor/mechanism_abi.h> namespace testing { #define PPACK_IFACE_BLOCK \ auto _pp_var_width __attribu...
b72bf09bf4123fc2da4ef7e7dc0188ad67dea816.cu
#include <arbor/gpu/gpu_common.hpp> #include <arbor/gpu/math_cu.hpp> #include <arbor/gpu/reduce_by_key.hpp> #include <arbor/mechanism_abi.h> namespace testing { #define PPACK_IFACE_BLOCK \ auto _pp_var_width __attribute__((unused)) = params_.width;\ auto _pp_var_n_detectors __attribute__((unused))...
add434b1034d75c3dce60b3e26ab9833df9816af.hip
// !!! This is a file automatically generated by hipify!!! /* * Copyright (c) 2019-2021, 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...
add434b1034d75c3dce60b3e26ab9833df9816af.cu
/* * Copyright (c) 2019-2021, 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...
257d02c16faa2f3f77bcff5ae68bff3fd8e54ffb.hip
// !!! This is a file automatically generated by hipify!!! #include "util.h" #include "kernel.h" #include "matrix.h" #include <hip/hip_runtime_api.h> __global__ void mat_mul_nn_kernel(const Matrix A, const Matrix B, Matrix C, const float alpha, const float beta) { float Cvalue = 0; int r = blockIdx.x * blockDim.x ...
257d02c16faa2f3f77bcff5ae68bff3fd8e54ffb.cu
#include "util.h" #include "kernel.h" #include "matrix.h" #include <cuda_runtime_api.h> __global__ void mat_mul_nn_kernel(const Matrix A, const Matrix B, Matrix C, const float alpha, const float beta) { float Cvalue = 0; int r = blockIdx.x * blockDim.x + threadIdx.x; int c = blockIdx.y * blockDim.y + threadIdx.y;...
0a142004fff004de44c5884afa2c1d161bd7ff0a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // LabelIslandSortArea.cu // #include "LabelIslandSortArea.h" #include "Histogram.h" #include <iostream> using namespace std; // MAX_PAIRS_NUM //- #ifndef MAX_PAIRS_NUM #define MAX_PAIRS_NUM 256 #endif // SORT_ARRAY_TYPE_AS...
0a142004fff004de44c5884afa2c1d161bd7ff0a.cu
// LabelIslandSortArea.cu // 实现区域排序算法 #include "LabelIslandSortArea.h" #include "Histogram.h" #include <iostream> using namespace std; // 宏:MAX_PAIRS_NUM //(面积值-标记值)键值对的个数。 #ifndef MAX_PAIRS_NUM #define MAX_PAIRS_NUM 256 #endif // 宏:SORT_ARRAY_TYPE_ASC // 排序标识,升序排序。 #ifndef SORT_ARRAY_TYPE_ASC #define SORT_ARRA...
57a986f7a3c805c347a61205d62a774cf4c0869f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #define Width 31 #define TITE_WIDTH 16 __global__ void MatrixMulKernel (float* Md, float* Nd, float* Pd, int ncols) { int row = blockIdx.y * blockDim.y + threadIdx.y; int col = blockIdx.x * blockDim.x + thread...
57a986f7a3c805c347a61205d62a774cf4c0869f.cu
#include <stdio.h> #define Width 31 #define TITE_WIDTH 16 __global__ void MatrixMulKernel (float* Md, float* Nd, float* Pd, int ncols) { int row = blockIdx.y * blockDim.y + threadIdx.y; int col = blockIdx.x * blockDim.x + threadIdx.x; printf("Block ID X : %d and Block ID Y: %d\n", blockIdx.x,blockIdx.y); float P...
8e06f88a3d194013848ca872de142d337d0a5400.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "caffe2/core/context_gpu.h" #include "caffe2/operators/local_response_normalization_op.h" namespace caffe2 { namespace { template <typename T> __global__ void LRNFillScaleNCHW(const int nthreads, const T* in, const in...
8e06f88a3d194013848ca872de142d337d0a5400.cu
#include "caffe2/core/context_gpu.h" #include "caffe2/operators/local_response_normalization_op.h" namespace caffe2 { namespace { template <typename T> __global__ void LRNFillScaleNCHW(const int nthreads, const T* in, const int num, const int channels, const int height, const int width, const int size, const ...
c53ddcb345d8fb2c216cbef3a6cbef323d078a70.hip
// !!! This is a file automatically generated by hipify!!! #include <cmath> #include <cstdlib> #include <cstdio> #include <chrono> #include <hip/hip_runtime.h> __global__ void rotate_matrix_parallel (float *matrix, const int n) { int layer = blockIdx.x * blockDim.x + threadIdx.x; if (layer < n/2) { int first =...
c53ddcb345d8fb2c216cbef3a6cbef323d078a70.cu
#include <cmath> #include <cstdlib> #include <cstdio> #include <chrono> #include <hip/hip_runtime.h> __global__ void rotate_matrix_parallel (float *matrix, const int n) { int layer = blockIdx.x * blockDim.x + threadIdx.x; if (layer < n/2) { int first = layer; int last = n - 1 - layer; for(int i = first...
381f7e477596228ab68e21728cbc6b4b80d46f74.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "hemisphere_implement.h" #include "brdf_common.h" __global__ void hemisphere_kernel(float3* pos, unsigned width) { unsigned int x = blockIdx.x*blockDim.x + threadIdx.x; unsigned int y = blockIdx.y*blockDim.y + thr...
381f7e477596228ab68e21728cbc6b4b80d46f74.cu
#include "hemisphere_implement.h" #include "brdf_common.h" __global__ void hemisphere_kernel(float3* pos, unsigned width) { unsigned int x = blockIdx.x*blockDim.x + threadIdx.x; unsigned int y = blockIdx.y*blockDim.y + threadIdx.y; float3 pin = pos[y*width+x]; pos[y*width+x] = normalize(pin); } ext...
e23cdb15af3ed26c2798cd3573c7e5c2c1c9ad85.hip
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/UnaryOps.h> #include <ATen/native/hip/Loops.cuh> #include <ATen/native/hip/JitLoops.cuh> #include <ATen/Dispatch.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/TensorIterator.h> namespace ...
e23cdb15af3ed26c2798cd3573c7e5c2c1c9ad85.cu
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/UnaryOps.h> #include <ATen/native/cuda/Loops.cuh> #include <ATen/native/cuda/JitLoops.cuh> #include <ATen/Dispatch.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/TensorIterator.h> namespace at { namespace native { template<typename scalar_t> stru...
e3f9ac7f36279a83fcfea0640371f849d6828607.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /******************************************************************************* GPU OPTIMIZED MONTE CARLO (GOMC) 2.75 Copyright (C) 2022 GOMC Group A copy of the MIT License can be found in License.txt along with this program, also...
e3f9ac7f36279a83fcfea0640371f849d6828607.cu
/******************************************************************************* GPU OPTIMIZED MONTE CARLO (GOMC) 2.75 Copyright (C) 2022 GOMC Group A copy of the MIT License can be found in License.txt along with this program, also can be found at <https://opensource.org/licenses/MIT>. ********************************...
86dd46537d8c6cf856b0536d93607bbc6520ac4a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /** * @file sigmoid_internal_device.cu * @author Daniel Nichols * @version 0.0.1 * @date 2019-02-23 * * @copyright Copyright (c) 2019 */ #include "compute/sigmoid/sigmoid_internal.h" namespace magmadnn { namespace internal...
86dd46537d8c6cf856b0536d93607bbc6520ac4a.cu
/** * @file sigmoid_internal_device.cu * @author Daniel Nichols * @version 0.0.1 * @date 2019-02-23 * * @copyright Copyright (c) 2019 */ #include "compute/sigmoid/sigmoid_internal.h" namespace magmadnn { namespace internal { template <typename T> __global__ void kernel_fast_sigmoid_full_device(unsigned int s...
a81a8b7bec557202a34f43c81714e48c95f3906f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #ifndef THC_GENERIC_FILE #define THC_GENERIC_FILE "generic/THCTensorMathBlas.cu" #else THC_API accreal THCTensor_(dot)(THCState *state, THCTensor *self, THCTensor *src) { #if defined(THC_REAL_IS_FLOAT) || defined(THC_REAL_IS_DOUBLE...
a81a8b7bec557202a34f43c81714e48c95f3906f.cu
#ifndef THC_GENERIC_FILE #define THC_GENERIC_FILE "generic/THCTensorMathBlas.cu" #else THC_API accreal THCTensor_(dot)(THCState *state, THCTensor *self, THCTensor *src) { #if defined(THC_REAL_IS_FLOAT) || defined(THC_REAL_IS_DOUBLE) || defined(THC_REAL_IS_HALF) THAssert(THCTensor_(checkGPU)(state, 2, self, src)); ...
b3f981eaa6218c498ca9bdaa1dc94bdc0a9d6bf4.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "BatchMatMulExecution.hpp" namespace MNN { namespace CUDA { template <typename T> __global__ void transpose_bias(T *input, T *output, const T* bias, int batch, int e, int h) { for (int index = blockIdx.x * blockDim.x +...
b3f981eaa6218c498ca9bdaa1dc94bdc0a9d6bf4.cu
#include "BatchMatMulExecution.hpp" namespace MNN { namespace CUDA { template <typename T> __global__ void transpose_bias(T *input, T *output, const T* bias, int batch, int e, int h) { for (int index = blockIdx.x * blockDim.x + threadIdx.x; index < batch * e * h; index += blockDim.x * gridDim.x) { int i = ...
146fbbf8e5eb079dc648fab865b9e6d812b87865.hip
// !!! This is a file automatically generated by hipify!!! #include "../THCTensorMathCompareT.cuh" #include "THHTensor.hpp" #include "THHStream.hpp" #include "../generic/THCTensorMathCompareT.cu" #include "../THCGenerateHalfType.h"
146fbbf8e5eb079dc648fab865b9e6d812b87865.cu
#include "../THCTensorMathCompareT.cuh" #include "THCTensor.hpp" #include "THCStream.hpp" #include "../generic/THCTensorMathCompareT.cu" #include "../THCGenerateHalfType.h"
0170f47eb148e6b826e5f08ca32c744ad2bd0417.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __device__ inline float stableSigmoid(float x) { if(x >= 0) { float z = expf(-x); return 1.0 / (1.0 + z); } else { float z = expf(x); return z / (1.0 + z); } } __global__ void gHighwayForward(float* out, const ...
0170f47eb148e6b826e5f08ca32c744ad2bd0417.cu
#include "includes.h" __device__ inline float stableSigmoid(float x) { if(x >= 0) { float z = expf(-x); return 1.0 / (1.0 + z); } else { float z = expf(x); return z / (1.0 + z); } } __global__ void gHighwayForward(float* out, const float* in1, const float* in2, const float* t, size_t length) { for(int bid = 0; bid < le...
fcb7ceeabb9268179ada31d4775a598ed43dd110.hip
// !!! This is a file automatically generated by hipify!!! #ifdef USE_LEGACY_DSLASH #include <cstdlib> #include <cstdio> #include <string> #include <iostream> #include <typeinfo> #include <color_spinor_field.h> #include <clover_field.h> // these control the Wilson-type actions #ifdef GPU_WILSON_DIRAC //#define DIREC...
fcb7ceeabb9268179ada31d4775a598ed43dd110.cu
#ifdef USE_LEGACY_DSLASH #include <cstdlib> #include <cstdio> #include <string> #include <iostream> #include <typeinfo> #include <color_spinor_field.h> #include <clover_field.h> // these control the Wilson-type actions #ifdef GPU_WILSON_DIRAC //#define DIRECT_ACCESS_LINK //#define DIRECT_ACCESS_WILSON_SPINOR //#defi...
b2725791e5c4c7e793f982a99a15099742d9bcb4.hip
// !!! This is a file automatically generated by hipify!!! #ifndef THC_GENERIC_FILE #define THC_GENERIC_FILE "THHUNN/generic/HardTanh.hip" #else #include <THHUNN/common.h> void THNN_(HardTanh_updateOutput)( THCState *state, THCTensor *input, THCTensor *output, accreal min_v...
b2725791e5c4c7e793f982a99a15099742d9bcb4.cu
#ifndef THC_GENERIC_FILE #define THC_GENERIC_FILE "THCUNN/generic/HardTanh.cu" #else #include <THCUNN/common.h> void THNN_(HardTanh_updateOutput)( THCState *state, THCTensor *input, THCTensor *output, accreal min_val_, accreal max_val_, bool inplace) {...
c76306603d046fd90be63b2dbfb0e6cc6d415c27.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /** * @file bf_parallel.cu * @author Federico Picchi * @brief CUDA-based implementation of Bilateral Filter * @date June 2021 * * @copyright Copyright (c) 2021 * */ #include "bilateral_filter/bf.hpp" #if defined(_DEBUG) ...
c76306603d046fd90be63b2dbfb0e6cc6d415c27.cu
/** * @file bf_parallel.cu * @author Federico Picchi * @brief CUDA-based implementation of Bilateral Filter * @date June 2021 * * @copyright Copyright (c) 2021 * */ #include "bilateral_filter/bf.hpp" #if defined(_DEBUG) #include <iostream> #endif inline void handleError(cudaError_t err, int line) { #if def...
6036fdba870504fbe74e0c5a8e156e2b47d57287.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "simple.hpp" /*The CUDA kernel */ __global__ void vector_add_cu(float *out, float *a, float *b, int n){ for(int i = 0; i < n; i++){ out[i] = a[i] + b[i]; } } /* Implementation of the function to be wrapped by Cython *...
6036fdba870504fbe74e0c5a8e156e2b47d57287.cu
#include "simple.hpp" /*The CUDA kernel */ __global__ void vector_add_cu(float *out, float *a, float *b, int n){ for(int i = 0; i < n; i++){ out[i] = a[i] + b[i]; } } /* Implementation of the function to be wrapped by Cython */ void addition(float *out, float *a, float *b, int N){ float *d_a, *d_b, *d_ou...
37b19667c7c644ebf561c0fd666c16a6f518f910.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "ndt_gpu/NormalDistributionsTransform.h" #include "ndt_gpu/debug.h" #include <cmath> #include <iostream> #include <pcl/common/transforms.h> #include "glog/logging.h" using std::endl; namespace gpu { GNormalDistributions...
37b19667c7c644ebf561c0fd666c16a6f518f910.cu
#include "ndt_gpu/NormalDistributionsTransform.h" #include "ndt_gpu/debug.h" #include <cmath> #include <iostream> #include <pcl/common/transforms.h> #include "glog/logging.h" using std::endl; namespace gpu { GNormalDistributionsTransform::GNormalDistributionsTransform() { //GRegistration::GRegistration(); gauss_...
e6a4d88005a0d5aba10ca2b709c4720bad5ef75b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /*! * Copyright 2017 XGBoost contributors */ #include <thrust/reduce.h> #include <thrust/execution_policy.h> #include <thrust/sequence.h> #include <xgboost/tree_updater.h> #include <algorithm> #include <memory> #include <queue> #i...
e6a4d88005a0d5aba10ca2b709c4720bad5ef75b.cu
/*! * Copyright 2017 XGBoost contributors */ #include <thrust/reduce.h> #include <thrust/execution_policy.h> #include <thrust/sequence.h> #include <xgboost/tree_updater.h> #include <algorithm> #include <memory> #include <queue> #include <utility> #include <vector> #include "../common/compressed_iterator.h" #include "...
fc6c4ed928fd4b9d7322b831f7f3ff27ee8f67c5.hip
// !!! This is a file automatically generated by hipify!!! /*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // I...
fc6c4ed928fd4b9d7322b831f7f3ff27ee8f67c5.cu
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
5814ada8b4e81505d041ab7653084eb949b235a0.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /*************************************************************************************************** * Copyright (c) 2017 - 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * R...
5814ada8b4e81505d041ab7653084eb949b235a0.cu
/*************************************************************************************************** * Copyright (c) 2017 - 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
8a15c18a4f7f07bb3086f97c2eb273b05a208a86.hip
// !!! This is a file automatically generated by hipify!!! /* ----------------------------------------------------------------- * Programmer(s): Slaven Peles, and Cody J. Balos @ LLNL * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2021, Lawrence L...
8a15c18a4f7f07bb3086f97c2eb273b05a208a86.cu
/* ----------------------------------------------------------------- * Programmer(s): Slaven Peles, and Cody J. Balos @ LLNL * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2021, Lawrence Livermore National Security * and Southern Methodist Univer...
cmp_cmp_ptx.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <math.h> #include <hip/hip_runtime.h> #include <helper_cuda.h> #include <helper_functions.h> #include "cuda_intrinsics.h" #include "cuda_warptrace.h" #define FLTSIZE sizeof(float) inline int BLK(int data, int ...
cmp_cmp_ptx.cu
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <cuda_runtime.h> #include <helper_cuda.h> #include <helper_functions.h> #include "cuda_intrinsics.h" #include "cuda_warptrace.h" #define FLTSIZE sizeof(float) inline int BLK(int data, int blocksize) { return (data + blocksize - 1) / blocksize; } __...
39a52ade80f9441dc9da9b21cee122205a8e50e7.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void group_point_grad_gpu(int b, int n, int c, int m, int nsample, const float *grad_out, const int *idx, float *grad_points) { int batch_index = blockIdx.x; idx += m*nsample*batch_index; grad_out +=...
39a52ade80f9441dc9da9b21cee122205a8e50e7.cu
#include "includes.h" __global__ void group_point_grad_gpu(int b, int n, int c, int m, int nsample, const float *grad_out, const int *idx, float *grad_points) { int batch_index = blockIdx.x; idx += m*nsample*batch_index; grad_out += m*nsample*c*batch_index; grad_points += n*c*batch_index; int index = threadIdx.x; int ...
28c168561fba9748350c7bbf6db6320cd4bbf893.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include "cuda_utils.h" // input: points(b, c, n) idx(b, npoints, nsample) // output: out(b, c, npoints, nsample) __global__ void group_points_kernel(int b, int c, int n, int npoints, ...
28c168561fba9748350c7bbf6db6320cd4bbf893.cu
#include <stdio.h> #include <stdlib.h> #include "cuda_utils.h" // input: points(b, c, n) idx(b, npoints, nsample) // output: out(b, c, npoints, nsample) __global__ void group_points_kernel(int b, int c, int n, int npoints, int nsample, const floa...
76cfdf11c74aa416878fec1b660745fb985263bd.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /*! ******************* BEGIN Caffe Copyright Notice and Disclaimer ***************** * * COPYRIGHT * * All contributions by the University of California: * Copyright (c) 2014-2017 The Regents of the University of California ...
76cfdf11c74aa416878fec1b660745fb985263bd.cu
/*! ******************* BEGIN Caffe Copyright Notice and Disclaimer ***************** * * COPYRIGHT * * All contributions by the University of California: * Copyright (c) 2014-2017 The Regents of the University of California (Regents) * All rights reserved. * * All other contributions: * Copyright (c) 2014-2...
d8f17b897899d4e4892379b9bc5766eef7c2a0f8.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright 2014 Nervana Systems Inc. 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...
d8f17b897899d4e4892379b9bc5766eef7c2a0f8.cu
/* * Copyright 2014 Nervana Systems Inc. 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 required ...
fc744308f297b8c73602738bc195538c98bf80d8.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "cellularautomata_kernal.h" #include <hip/hip_vector_types.h> #include <cstdio> //extern "C" bool extern "C" float CUDATimeStep(int* pFlatGrid, int DIM) { int *dev_pFlatGrid; //Pointers to device allocated memory int *...
fc744308f297b8c73602738bc195538c98bf80d8.cu
#include "cellularautomata_kernal.h" #include <vector_types.h> #include <cstdio> //extern "C" bool extern "C" float CUDATimeStep(int* pFlatGrid, int DIM) { int *dev_pFlatGrid; //Pointers to device allocated memory int *dev_DIM; cudaEvent_t start,stop; //Events for timings //START: Record duration of GPGPU proc...
940d119173095e1c8b549be1835da2dc0576fa02.hip
// !!! This is a file automatically generated by hipify!!! #include "THHTensorMath.h" #include "THHGeneral.h" #include "TH/THHalf.h" #include "THHTensorCopy.h" #include "THHApply.cuh" #include "THHNumerics.cuh" #include "THHTensorMathCompareT.cuh" #include "THHTensor.hpp" template <typename T> struct TensorAddConstant...
940d119173095e1c8b549be1835da2dc0576fa02.cu
#include "THCTensorMath.h" #include "THCGeneral.h" #include "TH/THHalf.h" #include "THCTensorCopy.h" #include "THCApply.cuh" #include "THCNumerics.cuh" #include "THCTensorMathCompareT.cuh" #include "THCTensor.hpp" template <typename T> struct TensorAddConstantOp { TensorAddConstantOp(T v) : val(v) {} __device__ __...
8000d71705826fea7c04034840660a06495d105b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "common.h" //void checkCUDAErrorFn(const char *msg, const char *file, int line) { // hipError_t err = hipGetLastError(); // if (hipSuccess == err) { // return; // } // // fprintf(stderr, "CUDA error"); /...
8000d71705826fea7c04034840660a06495d105b.cu
#include "common.h" //void checkCUDAErrorFn(const char *msg, const char *file, int line) { // cudaError_t err = cudaGetLastError(); // if (cudaSuccess == err) { // return; // } // // fprintf(stderr, "CUDA error"); // if (file) { // fprintf(stderr, " (%s:%d)", file, line); // } // fpr...
adb8c39b5fae7402fe1aded51fa5891284d6e931.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "hiprand/hiprand.h" #include "rocblas.h" extern "C" { #include "dropout_layer.h" #include "hip/hip_runtime.h" #include "utils.h" } __global__ void yoloswag420blazeit360noscope(float *input, int size, float *rand, float pr...
adb8c39b5fae7402fe1aded51fa5891284d6e931.cu
#include "cuda_runtime.h" #include "curand.h" #include "cublas_v2.h" extern "C" { #include "dropout_layer.h" #include "cuda.h" #include "utils.h" } __global__ void yoloswag420blazeit360noscope(float *input, int size, float *rand, float prob, float scale) { int id = (blockIdx.x + blockIdx.y * gridDim.x) * blockDim...
cc20e2621b2a23075496a1d3825f7b7c7dfe70e7.hip
// !!! This is a file automatically generated by hipify!!! #define BLOCK_SIZE 64 #define _DEBUG #include "cutil.h" #include <hip/hip_runtime.h> #include <stdio.h> #include "cuda_memory.h" //#ifdef WIN32 //#include "win32time.h" //#else #include <sys/time.h> //#endif #include "MirroredArray.h" #include "hash_table_p...
cc20e2621b2a23075496a1d3825f7b7c7dfe70e7.cu
#define BLOCK_SIZE 64 #define _DEBUG #include "cutil.h" #include <cuda_runtime.h> #include <stdio.h> #include "cuda_memory.h" //#ifdef WIN32 //#include "win32time.h" //#else #include <sys/time.h> //#endif #include "MirroredArray.h" #include "hash_table_pycuda.cu" //#ifdef LIBRARY //extern "C" //#ifdef WIN32 //__...