hip_filename
stringlengths
5
84
hip_content
stringlengths
79
9.69M
cuda_filename
stringlengths
4
83
cuda_content
stringlengths
19
9.69M
7606b5125cbe6fb0499e6041b3eb0508192167e1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void accumulatedPartSizesKernel(int size, int *part, int *weights, int *accumulatedSize) { int idx = blockIdx.x * blockDim.x + threadIdx.x; if (idx == size - 1) accumulatedSize[part[idx]] = weights[i...
7606b5125cbe6fb0499e6041b3eb0508192167e1.cu
#include "includes.h" __global__ void accumulatedPartSizesKernel(int size, int *part, int *weights, int *accumulatedSize) { int idx = blockIdx.x * blockDim.x + threadIdx.x; if (idx == size - 1) accumulatedSize[part[idx]] = weights[idx]; if (idx < size - 1) { int thisPart = part[idx]; if (thisPart != part[idx + 1]) accu...
70880df999250c856a1100c6b71818d2398d6369.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...
70880df999250c856a1100c6b71818d2398d6369.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...
3b3f6083b39c96cb58cba230f1ca963bac1fc84e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include<stdio.h> #include<stdlib.h> #include<math.h> __global__ void alter(int *a, int * t){ int n = threadIdx.x, m=blockIdx.x, size = blockDim.x; t[m*size + n] = 1; int d = m; while(d>=0)...
3b3f6083b39c96cb58cba230f1ca963bac1fc84e.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include<stdio.h> #include<stdlib.h> #include<math.h> __global__ void alter(int *a, int * t){ int n = threadIdx.x, m=blockIdx.x, size = blockDim.x; t[m*size + n] = 1; int d = m; while(d>=0){ t[m*size+n]*=a[m*size+n]; d--; } } int main(void){ in...
db3f362c56858cc39ecfca02880022f32bdaf2a1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* NiuTrans.Tensor - an open-source tensor library * Copyright (C) 2017, Natural Language Processing Lab, Northestern University. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may n...
db3f362c56858cc39ecfca02880022f32bdaf2a1.cu
/* NiuTrans.Tensor - an open-source tensor library * Copyright (C) 2017, Natural Language Processing Lab, Northestern University. * 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 L...
0dd17dc0415aa362bd87a4623b7bf90fb03e7695.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <vector> #include "caffe/layer.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/vision_layers.hpp" namespace caffe { template <typename Dtype> __global__ void LRNFillScale(const int nthreads, const Dtype* co...
0dd17dc0415aa362bd87a4623b7bf90fb03e7695.cu
#include <vector> #include "caffe/layer.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/vision_layers.hpp" namespace caffe { template <typename Dtype> __global__ void LRNFillScale(const int nthreads, const Dtype* const in, const int num, const int channels, const int height, const int width, co...
44f378c73a2a386464988198d201cfe197bbab02.hip
// !!! This is a file automatically generated by hipify!!! #include "../common/common.h" #include <stdio.h> #include <hip/hip_runtime.h> #include <stdlib.h> #include "../common/stopwatch.h" __device__ bool prime=1; __global__ void primeGPU(int N) { if(N==1) {prime=0; return;} if(N==2 || N==3) { return;} ...
44f378c73a2a386464988198d201cfe197bbab02.cu
#include "../common/common.h" #include <stdio.h> #include <cuda_runtime.h> #include <stdlib.h> #include "../common/stopwatch.h" __device__ bool prime=1; __global__ void primeGPU(int N) { if(N==1) {prime=0; return;} if(N==2 || N==3) { return;} const unsigned int i=blockIdx.x*blockDim.x+threadIdx.x; if...
5a5df1e2a5e7164effcf9452af518ea9f9e8dce7.hip
// !!! This is a file automatically generated by hipify!!! /* * Copyright (c) 2019-2020, 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...
5a5df1e2a5e7164effcf9452af518ea9f9e8dce7.cu
/* * Copyright (c) 2019-2020, 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...
c011397a0b73809d3bc38a3c3e5d0f55d0c4a76e.hip
// !!! This is a file automatically generated by hipify!!! #include "encoder.h" #include "kernels/transformerKernels.h" #include "kernels/multilgKernels.h" /** @file Transformer encoder, composed by gemm lib and custom cuda kernel function */ namespace lightseq { namespace cuda { template <OperationType OpType_> E...
c011397a0b73809d3bc38a3c3e5d0f55d0c4a76e.cu
#include "encoder.h" #include "kernels/transformerKernels.h" #include "kernels/multilgKernels.h" /** @file Transformer encoder, composed by gemm lib and custom cuda kernel function */ namespace lightseq { namespace cuda { template <OperationType OpType_> Encoder<OpType_>::Encoder(int max_batch_size, const int *p_d...
3f7c97d40d62c55701be1a044e6cb8bc634b0858.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /******************************************************************************* * * ANIMATION PROCESSING * *******************************************************************************/ #include "animate.h" #include <stdio.h> ...
3f7c97d40d62c55701be1a044e6cb8bc634b0858.cu
/******************************************************************************* * * ANIMATION PROCESSING * *******************************************************************************/ #include "animate.h" #include <stdio.h> /******************************************************************************/ __globa...
08b4d33bceb734c1ac7763a63967e2f2de50c804.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #define CBLACK "\33[30m" #define CRED "\33[31m" #define CGREEN "\33[32m" #define CWHITE "\33[37m" #define SIT_SIZE 500 #define NBR_COIN 162 #define NBR_...
08b4d33bceb734c1ac7763a63967e2f2de50c804.cu
#include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #define CBLACK "\33[30m" #define CRED "\33[31m" #define CGREEN "\33[32m" #define CWHITE "\33[37m" #define SIT_SIZE 500 #define NBR_COIN 162 #define NBR_COIN_CUDA 162 #define NBR_BLOCK 1024 #define NBR_HIGH_SCORE 50 #define MIN_PRICE 0.00062...
68f4df390b137f3777b7a826bf221d4ede821a05.hip
// !!! This is a file automatically generated by hipify!!! /* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, ...
68f4df390b137f3777b7a826bf221d4ede821a05.cu
/* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related...
d8078df5d769fe79904fdfef4b93dcb8380b3035.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <math.h> #define NUM_NODES 1024 // Declaration of a structure typedef struct { int startIndex; // starting index in Adj list int numberOfNeighbors; // number of neighbors of each ...
d8078df5d769fe79904fdfef4b93dcb8380b3035.cu
#include <stdio.h> #include <stdlib.h> #include <math.h> #define NUM_NODES 1024 // Declaration of a structure typedef struct { int startIndex; // starting index in Adj list int numberOfNeighbors; // number of neighbors of each vertices } Node; __global__ void bfs_optimized(Node *gpu_vertex, int *gpu_neighbors, bo...
64ca6e5b724b8c568246820792c28f2efe915521.hip
// !!! This is a file automatically generated by hipify!!! #include "./c_runtime_api.h" #include <cassert> #include <cstdio> #include <rocblas.h> #include <hip/hip_runtime.h> #include <math.h> /* TODO: Your code here */ /* all your GPU kernel code, e.g. matrix_softmax_cross_entropy_kernel */ // y = inputs[0], y_ = in...
64ca6e5b724b8c568246820792c28f2efe915521.cu
#include "./c_runtime_api.h" #include <cassert> #include <cstdio> #include <cublas_v2.h> #include <cuda_runtime.h> #include <math.h> /* TODO: Your code here */ /* all your GPU kernel code, e.g. matrix_softmax_cross_entropy_kernel */ // y = inputs[0], y_ = inputs[1] // np.mean(-np.sum(y_ * np.log(softmax(y)), axis=1),...
7c3a81cc044be8279ebcdd9689bdcc1b7c19e14e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // auto-generated by ops.py // __constant__ int xdim0_update_halo_kernel2_yvel_minus_2_top; int xdim0_update_halo_kernel2_yvel_minus_2_top_h = -1; __constant__ int ydim0_update_halo_kernel2_yvel_minus_2_top; int ydim0_update_halo...
7c3a81cc044be8279ebcdd9689bdcc1b7c19e14e.cu
// // auto-generated by ops.py // __constant__ int xdim0_update_halo_kernel2_yvel_minus_2_top; int xdim0_update_halo_kernel2_yvel_minus_2_top_h = -1; __constant__ int ydim0_update_halo_kernel2_yvel_minus_2_top; int ydim0_update_halo_kernel2_yvel_minus_2_top_h = -1; __constant__ int xdim1_update_halo_kernel2_yvel_minus_...
32a64fc71be4d7693d04717dd23cb46c9157bd78.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <string> #include <math.h> #include <stdio.h> #define numBlocks 12 #define numThreads 32 struct RSA_KEY { unsigned long p; // selected prime 1 unsigned long q; // selected prime 2 ...
32a64fc71be4d7693d04717dd23cb46c9157bd78.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <string> #include <math.h> #include <stdio.h> #define numBlocks 12 #define numThreads 32 struct RSA_KEY { unsigned long p; // selected prime 1 unsigned long q; // selected prime 2 unsigned long n; // public - the modulus unsigned long e; //...
1b21b11ebff902440cab03dab81babda9cad3587.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #define STRIDE 2 __global__ void kernel3(int m, int n, int k, double *d_A, double *d_B, double *d_C){ int i = (blockIdx.y * blockDim.y + threadIdx.y) * STRIDE; int j = blockIdx.x * blockDim.x + threadIdx.x; int s...
1b21b11ebff902440cab03dab81babda9cad3587.cu
#define STRIDE 2 __global__ void kernel3(int m, int n, int k, double *d_A, double *d_B, double *d_C){ int i = (blockIdx.y * blockDim.y + threadIdx.y) * STRIDE; int j = blockIdx.x * blockDim.x + threadIdx.x; int sum1=0; for(int s1 = 0; s1 < STRIDE; s1++){ sum1 = i + s1; if (sum1 ...
7325765420f18dd852643ba957d9d7cc5af0cdfa.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // nvcc hello-world.cu -L /usr/local/cuda/lib -lcudart -o hello-world #include <cstdlib> #include <cstdio> #include "Matching.h" #include "const.h" //#include "cam.h" #include "WindowMatching.h" #include "timer.h" #include <cmath> ...
7325765420f18dd852643ba957d9d7cc5af0cdfa.cu
// nvcc hello-world.cu -L /usr/local/cuda/lib -lcudart -o hello-world #include <cstdlib> #include <cstdio> #include "Matching.h" #include "const.h" //#include "cam.h" #include "WindowMatching.h" #include "timer.h" #include <cmath> using namespace cv; static void HandleError( cudaError_t err, ...
6184847cfe9407acb9f676916497e9ece36a5b39.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "THHUNN.h" #include "THHDeviceTensor.cuh" #include "THHDeviceTensorUtils.cuh" #include "THHDeviceUtils.cuh" #include "THHReduceApplyUtils.cuh" __global__ void SpatialReflectionPadding_updateOutput( THCDeviceTensor<float...
6184847cfe9407acb9f676916497e9ece36a5b39.cu
#include "THCUNN.h" #include "THCDeviceTensor.cuh" #include "THCDeviceTensorUtils.cuh" #include "THCDeviceUtils.cuh" #include "THCReduceApplyUtils.cuh" __global__ void SpatialReflectionPadding_updateOutput( THCDeviceTensor<float, 4> input, THCDeviceTensor<float, 4> output, int padT, int padB, int padL, int padR...
c875d933fdc41714332906d1048a9ded7e6f83fa.hip
// !!! This is a file automatically generated by hipify!!! #include <cmath> #include <cstdio> #include <cstring> #include <string> #include <algorithm> #include <iostream> #include <cstdlib> // #include <unistd.h> // #include <windows.h> // #include <unistd.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h>...
c875d933fdc41714332906d1048a9ded7e6f83fa.cu
#include <cmath> #include <cstdio> #include <cstring> #include <string> #include <algorithm> #include <iostream> #include <cstdlib> // #include <unistd.h> // #include <windows.h> // #include <unistd.h> #include <cuda.h> #include <cuda_runtime.h> #include <device_launch_parameters.h> // #include <device_functions.h> #...
c86394ba776ff1e1ed7e15112434d2c383161af4.hip
// !!! This is a file automatically generated by hipify!!! #include<iostream> #include<stdlib.h> #include <hip/hip_runtime.h> #include <math.h> #define N 1000000 #define RADIUS 3 int checkResults(int startElem, int endElem, float* cudaRes, float* res) { int nDiffs=0; const float smallVal = 0.000001f; for(...
c86394ba776ff1e1ed7e15112434d2c383161af4.cu
#include<iostream> #include<stdlib.h> #include <cuda.h> #include <math.h> #define N 1000000 #define RADIUS 3 int checkResults(int startElem, int endElem, float* cudaRes, float* res) { int nDiffs=0; const float smallVal = 0.000001f; for(int i=startElem; i<endElem; i++) if(fabs(cudaRes[i]-res[i])>sm...
dfc4fcac77ef33e1a0048be805308948d77b1af5.hip
// !!! This is a file automatically generated by hipify!!! /* * ----------------------------------------------------------------- * Programmer(s): Slaven Peles @ LLNL * ----------------------------------------------------------------- * Acknowledgements: This example is based on cvAdvDiff_bnd * e...
dfc4fcac77ef33e1a0048be805308948d77b1af5.cu
/* * ----------------------------------------------------------------- * Programmer(s): Slaven Peles @ LLNL * ----------------------------------------------------------------- * Acknowledgements: This example is based on cvAdvDiff_bnd * example by Scott D. Cohen, Alan C. * Hind...
1254805a932f72e94d0f2aba47b373279ffe1688.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/cuda/cu_inc/common.cuh" #include "shrink_impl.h" namespace onnxruntime { namespace cuda { // Generic impleme...
1254805a932f72e94d0f2aba47b373279ffe1688.cu
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/cuda/cu_inc/common.cuh" #include "shrink_impl.h" namespace onnxruntime { namespace cuda { // Generic implementation of Shrink template <typename T> __global__ void _ShrinkKernel( const T* inpu...
4e8a504a934cc9f72b9883f58ea158e45ead3215.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...
4e8a504a934cc9f72b9883f58ea158e45ead3215.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...
aa5e23c9d19abf811b5f518bbc1119ed8222ab64.hip
// !!! This is a file automatically generated by hipify!!! /* * RegionalFeatures.cu */ #include <assert.h> #include <hip/hip_runtime.h> #include <helper_functions.h> #include <helper_cuda.h> #include <hip/hip_fp16.h> #include <hipcub/hipcub.hpp> #include "RegionalFeatures.cuh" struct MaxOp { template <typename ...
aa5e23c9d19abf811b5f518bbc1119ed8222ab64.cu
/* * RegionalFeatures.cu */ #include <assert.h> #include <cuda_runtime.h> #include <helper_functions.h> #include <helper_cuda.h> #include <cuda_fp16.h> #include <cub/cub.cuh> #include "RegionalFeatures.cuh" struct MaxOp { template <typename T> __device__ __forceinline__ T operator()(const T &a, const T ...
93344aa0431571e776dc5f1253dc1740fc75d618.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) 2020, 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 * *...
93344aa0431571e776dc5f1253dc1740fc75d618.cu
/* * Copyright (c) 2020, 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 ...
4037a572aaabc9719fe2673d26c94aa7c6bd1384.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" static unsigned int GRID_SIZE_N; static unsigned int GRID_SIZE_4N; static unsigned int MAX_STATE_VALUE; __global__ static void cudaEvaluateRightGammaKernel(int *wptr, double *x1, double *x2, double *diagptabl...
4037a572aaabc9719fe2673d26c94aa7c6bd1384.cu
#include "includes.h" static unsigned int GRID_SIZE_N; static unsigned int GRID_SIZE_4N; static unsigned int MAX_STATE_VALUE; __global__ static void cudaEvaluateRightGammaKernel(int *wptr, double *x1, double *x2, double *diagptable, double *output, const int limit) { const int i = blockIdx.x * blockDim.x + threadIdx....
8340f2ffd2bc9e97654c4276a88daae6ca9eae79.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Author: Sardar Haque Email: haque.sardar@gmail.com */ #include "../include/fastPolyEvaluation.h" using namespace std; void fastEvaluation(int k, sfixn p, sfixn *M1, sfixn *M2, sfixn *Fpoly, int check) { int i, j; /* c...
8340f2ffd2bc9e97654c4276a88daae6ca9eae79.cu
/* Author: Sardar Haque Email: haque.sardar@gmail.com */ #include "../include/fastPolyEvaluation.h" using namespace std; void fastEvaluation(int k, sfixn p, sfixn *M1, sfixn *M2, sfixn *Fpoly, int check) { int i, j; /* creating subproduct tree*/ sfixn *Mgpu[MAX_LEVEL], *A, *B, *C, *D, *E, *F, *G; sfixn ...
a8fc66edd292ca84fa8d27394b7dbd0c7e68ccb1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // This file is part of bp-layers. // // Copyright (C) 2020 Patrick Knbelreiter <knoebelreiter at icg dot tugraz dot at> // Christian Sormann <christian dot sormann at icg dot tugraz dot at> // Institute for Computer Graphics and Vi...
a8fc66edd292ca84fa8d27394b7dbd0c7e68ccb1.cu
// This file is part of bp-layers. // // Copyright (C) 2020 Patrick Knöbelreiter <knoebelreiter at icg dot tugraz dot at> // Christian Sormann <christian dot sormann at icg dot tugraz dot at> // Institute for Computer Graphics and Vision, Graz University of Technology // https://www.tugraz.at/institute/icg/teams/team-p...
41a9ef2d56120149ead418b95d768e58ebff77c9.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <time.h> #include <math.h> <<<<<<< Updated upstream const long N = pow(2,30); ======= const int N = 1024; >>>>>>> Stashed changes const int blocksize = 16; __global__ void GPU_multi(long *a, long *b) { ...
41a9ef2d56120149ead418b95d768e58ebff77c9.cu
#include <stdio.h> #include <time.h> #include <math.h> <<<<<<< Updated upstream const long N = pow(2,30); ======= const int N = 1024; >>>>>>> Stashed changes const int blocksize = 16; __global__ void GPU_multi(long *a, long *b) { a[threadIdx.x] *= b[threadIdx.x]; } void CPU_multi(long *a, long *b) { for(long i ...
4b58782f4e21f46a971849dc44c6a254bb451bf6.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) Meta Platforms, Inc. and affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ // This file...
4b58782f4e21f46a971849dc44c6a254bb451bf6.cu
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ // This file is auto-generated. See "generate_kernels.py" #include <ATen/native/transformers/cuda/me...
c9f794195f9298f79bf0cf4b6db52f54e6e86338.hip
// !!! This is a file automatically generated by hipify!!! /*! * Copyright 2017 XGBoost contributors */ #include <thrust/device_vector.h> #include <xgboost/base.h> #include "../helpers.h" #include "gtest/gtest.h" #include "../../../src/data/sparse_page_source.h" #include "../../../src/gbm/gbtree_model.h" #include "...
c9f794195f9298f79bf0cf4b6db52f54e6e86338.cu
/*! * Copyright 2017 XGBoost contributors */ #include <thrust/device_vector.h> #include <xgboost/base.h> #include "../helpers.h" #include "gtest/gtest.h" #include "../../../src/data/sparse_page_source.h" #include "../../../src/gbm/gbtree_model.h" #include "../../../src/tree/updater_gpu_hist.cu" #include "../../../s...
d0649d5639d5c3bdfb0b8e4acf3e99d881bccc37.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "ex1.h" #define HIST_LENGTH 256 #define IMG_SIZE IMG_WIDTH*IMG_HEIGHT __device__ void prefix_sum(int arr[], int arr_size) { int threadID = threadIdx.x; int offset = 1; int last = arr[arr_size-1]; for(int ...
d0649d5639d5c3bdfb0b8e4acf3e99d881bccc37.cu
#include "ex1.h" #define HIST_LENGTH 256 #define IMG_SIZE IMG_WIDTH*IMG_HEIGHT __device__ void prefix_sum(int arr[], int arr_size) { int threadID = threadIdx.x; int offset = 1; int last = arr[arr_size-1]; for(int level = arr_size / 2; level > 0; level /= 2) { if(threadID < level) { ...
0d4492a8200c4defe9fe275167e72b006afe52dc.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> using namespace std; #define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); } inline void gpuAssert(hipError_t code, const char *file, int line, bool abort=true) { if (code != hipSuccess) { ...
0d4492a8200c4defe9fe275167e72b006afe52dc.cu
#include <iostream> using namespace std; #define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); } inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true) { if (code != cudaSuccess) { fprintf(stderr,"GPUassert: %d %s %s %d\n", code, cudaGetErrorString(code), file, line)...
05486389c5b9088386ba036f42af5f14c0875357.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #ifdef GLOBAL __device__ char x = 0; #endif __global__ void racey_kernel() { #ifdef SHARED __shared__ char x; #endif if (threadIdx.x == 0 && blockIdx.x == 0) #ifdef WW x = threadIdx.x + blockIdx...
05486389c5b9088386ba036f42af5f14c0875357.cu
#include <stdio.h> #ifdef GLOBAL __device__ char x = 0; #endif __global__ void racey_kernel() { #ifdef SHARED __shared__ char x; #endif if (threadIdx.x == 0 && blockIdx.x == 0) #ifdef WW x = threadIdx.x + blockIdx.x; #elif RW volatile char c = x; #endif __syncthreads(); if (threadIdx....
24d573b4dcf0621f8ce1bd754239229a3a7e4fb7.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 2.1.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date August 2016 @generated from sparse-iter/blas/zgedensereimsplit.cu, no...
24d573b4dcf0621f8ce1bd754239229a3a7e4fb7.cu
/* -- MAGMA (version 2.1.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date August 2016 @generated from sparse-iter/blas/zgedensereimsplit.cu, normal z -> d, Tue Aug 30 09:38:46 2016 */ #include "magmasparse_internal.h" #define BLO...
83e305ce7e9ae1c1b2ecce6d602520637b2e2a2b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <cstdio> #include <cstdlib> #include <math.h> #include <time.h> #define MINVAL 0.00 #define MAXVAL 10.0 #define TOL 1e-5 #define NUM_THREADS 16 double CPS = 2.9e9; int LEN; // to be defined via cmd args ///...
83e305ce7e9ae1c1b2ecce6d602520637b2e2a2b.cu
#include <cstdio> #include <cstdlib> #include <math.h> #include <time.h> #define MINVAL 0.00 #define MAXVAL 10.0 #define TOL 1e-5 #define NUM_THREADS 16 double CPS = 2.9e9; int LEN; // to be defined via cmd args //////////////////////////// CUDA RELATED //////////////////////////////////// // Asser...
f812e54b892e2d143bbec764ee8ad562200a8e3d.hip
// !!! This is a file automatically generated by hipify!!! //#include <stdlib.h> //#include <string.h> //#include <stdio.h> #include "jim.h" #include "jimautoconf.h" #include "jim-subcmd.h" static __device__ int history_cmd_getline(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { #if __HIPCC__ char *line = nullp...
f812e54b892e2d143bbec764ee8ad562200a8e3d.cu
//#include <stdlib.h> //#include <string.h> //#include <stdio.h> #include "jim.h" #include "jimautoconf.h" #include "jim-subcmd.h" static __device__ int history_cmd_getline(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { #if __CUDACC__ char *line = nullptr; //Jim_HistoryGetline(Jim_String(argv[0])); #else char...
6e3f474c49111be6ab9182d21897066799076ee5.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * NVIDIA Corporation and its licensors retain all intellectual property and * proprietary rights in and to this software and related documentation. * Any us...
6e3f474c49111be6ab9182d21897066799076ee5.cu
/* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * NVIDIA Corporation and its licensors retain all intellectual property and * proprietary rights in and to this software and related documentation. * Any use, reproduction, disclosure, or distribution of this software * and related documentat...
9bca041eb486d82ed1c8d21fe32efa3be06d57ff.hip
// !!! This is a file automatically generated by hipify!!! // ** Original codelet code ** // // #pragma hmppcg cpiparam __arg0 INOUT e%hmpp_codelet__threeMMloopa: (1, 2) e%hmpp_codelet__threeMMloopc: (3, 0) // #pragma hmppcg cpiparam __arg1 INOUT f%hmpp_codelet__threeMMloopb: (2, 2) f%hmpp_codelet__threeMMloopc: (3, 1)...
9bca041eb486d82ed1c8d21fe32efa3be06d57ff.cu
// ** Original codelet code ** // // #pragma hmppcg cpiparam __arg0 INOUT e%hmpp_codelet__threeMMloopa: (1, 2) e%hmpp_codelet__threeMMloopc: (3, 0) // #pragma hmppcg cpiparam __arg1 INOUT f%hmpp_codelet__threeMMloopb: (2, 2) f%hmpp_codelet__threeMMloopc: (3, 1) // #pragma hmppcg cpiparam __arg2 INOUT a%hmpp_codelet__th...
f093b5fc27b8cd15d4db91ee05c7a87bcd4db909.hip
// !!! This is a file automatically generated by hipify!!! #include "fast_pcl/ndt_gpu/MatrixDevice.h" #include "fast_pcl/ndt_gpu/debug.h" namespace gpu { MatrixDevice::MatrixDevice(int rows, int cols) { rows_ = rows; cols_ = cols; offset_ = 1; fr_ = true; checkCudaErrors(hipMalloc(&buffer_, sizeof(double) * rows...
f093b5fc27b8cd15d4db91ee05c7a87bcd4db909.cu
#include "fast_pcl/ndt_gpu/MatrixDevice.h" #include "fast_pcl/ndt_gpu/debug.h" namespace gpu { MatrixDevice::MatrixDevice(int rows, int cols) { rows_ = rows; cols_ = cols; offset_ = 1; fr_ = true; checkCudaErrors(cudaMalloc(&buffer_, sizeof(double) * rows_ * cols_ * offset_)); checkCudaErrors(cudaMemset(buffer_...
34e8a81cd460aa150d1c9b4c1b72e1ae865603d5.hip
// !!! This is a file automatically generated by hipify!!! /* Jim - A small embeddable Tcl interpreter * * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * Copyright 2005 Clemens Hintze <c.hintze@gmx.net> * Copyright 2005 patthoyts - Pat Thoyts <patthoyts@users.sf.net> * Copyright 2008,2009 oharboe - yvind Ha...
34e8a81cd460aa150d1c9b4c1b72e1ae865603d5.cu
/* Jim - A small embeddable Tcl interpreter * * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * Copyright 2005 Clemens Hintze <c.hintze@gmx.net> * Copyright 2005 patthoyts - Pat Thoyts <patthoyts@users.sf.net> * Copyright 2008,2009 oharboe - Øyvind Harboe - oyvind.harboe@zylin.com * Copyright 2008 Andrew Lun...
ebbb230a8ffb19654cd6f9d921f783171d2cb5ac.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <Timer.hpp> #include <iostream> #include <iomanip> using LOFAR::NSTimer; using std::cout; using std::cerr; using std::endl; using std::fixed; using std::setprecision; // function to check if there are any cuda errors voi...
ebbb230a8ffb19654cd6f9d921f783171d2cb5ac.cu
#include <Timer.hpp> #include <iostream> #include <iomanip> using LOFAR::NSTimer; using std::cout; using std::cerr; using std::endl; using std::fixed; using std::setprecision; // function to check if there are any cuda errors void cudaErrorCheck(cudaError_t error){ if (error != cudaSuccess) { fprintf(stderr, "cud...
f3b15c4ee94c96328bed826f014431b9722f36b6.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) 2019-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 ...
f3b15c4ee94c96328bed826f014431b9722f36b6.cu
/* * Copyright (c) 2019-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...
825aa1f0ce1bc073ada37ee66327917049e85859.hip
// !!! This is a file automatically generated by hipify!!! //#define MAIN_PROGRAM // c standard headers #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <assert.h> #include <cblas.h> #include <float.h> #include <sys/time.h> // own c headers #include "../common.h" #include "../matr...
825aa1f0ce1bc073ada37ee66327917049e85859.cu
//#define MAIN_PROGRAM // c standard headers #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <assert.h> #include <cblas.h> #include <float.h> #include <sys/time.h> // own c headers #include "../common.h" #include "../matrix_operations/tensor.h" #include "../matrix_operations/matr...
31edca18c1bdfd603faf31feeb973ee5268e543e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "cumath.h" #define real float #define real3 float3 #define real4 float4 #define mkreal4 make_float4 #define SHAPEX 4 #define SHAPEY 4 #define SHAPEZ 4 #define L(x,y,z) ((x) + ( (y) + (z) * SHAPEY ) * SHAPEX) #define G...
31edca18c1bdfd603faf31feeb973ee5268e543e.cu
#include "cumath.h" #define real float #define real3 float3 #define real4 float4 #define mkreal4 make_float4 #define SHAPEX 4 #define SHAPEY 4 #define SHAPEZ 4 #define L(x,y,z) ((x) + ( (y) + (z) * SHAPEY ) * SHAPEX) #define Gx 0 #define Gy -9 #define Gz 0 __device__ real norm( real4 p ) { return sqrt( p.x*p....
95ecedba45e395cff386123f1e5310b718397a77.hip
// !!! This is a file automatically generated by hipify!!! // CIS565 CUDA Raytracer: A parallel raytracer for Patrick Cozzi's CIS565: GPU Computing at the University of Pennsylvania // Written by Yining Karl Li, Copyright (c) 2012 University of Pennsylvania // This file includes code from: // Rob Farber for CUDA-...
95ecedba45e395cff386123f1e5310b718397a77.cu
// CIS565 CUDA Raytracer: A parallel raytracer for Patrick Cozzi's CIS565: GPU Computing at the University of Pennsylvania // Written by Yining Karl Li, Copyright (c) 2012 University of Pennsylvania // This file includes code from: // Rob Farber for CUDA-GL interop, from CUDA Supercomputing For The Masses: http:/...
9512a1e064d5312b60977e6c29472dfd2d7b5b4c.hip
// !!! This is a file automatically generated by hipify!!! #include "phong.h" rtDeclareVariable(float3, shading_normal, attribute shading_normal, ); rtDeclareVariable(float3, geometric_normal, attribute geometric_normal, ); // // Transparent object shadows, no textures // rtDeclareVariable(float3, shadow_attenuatio...
9512a1e064d5312b60977e6c29472dfd2d7b5b4c.cu
#include "phong.h" rtDeclareVariable(float3, shading_normal, attribute shading_normal, ); rtDeclareVariable(float3, geometric_normal, attribute geometric_normal, ); // // Transparent object shadows, no textures // rtDeclareVariable(float3, shadow_attenuation, , ); RT_PROGRAM void any_hit_glass() { const float3 wo...
a66307f34f5fbbf7e0b4d5ed4812c621978dd56d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" //pass //--gridDim=[32,1,1] --blockDim=[32,1,1] //REQUIRES: hipExtent //REQUIRES: SURFACE #include "common.h" __global__ void d_integrate_trapezoidal(hipExtent extent) { uint x = blockIdx.x*blockDim.x + threadIdx.x; ...
a66307f34f5fbbf7e0b4d5ed4812c621978dd56d.cu
//pass //--gridDim=[32,1,1] --blockDim=[32,1,1] //REQUIRES: cudaExtent //REQUIRES: SURFACE #include "common.h" __global__ void d_integrate_trapezoidal(cudaExtent extent) { uint x = blockIdx.x*blockDim.x + threadIdx.x; // for higher speed could use hierarchical approach for sum if (x >= extent.widt...
1ec0a57b6fef52a52eecfac130a36f204dbab19b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "gradient2d-512-16-256_kernel.hu" __device__ float __sbref_wrap(float *sb, size_t index) { return sb[index]; } __global__ void kernel0_16(float *A, int dimsize, int timestep, int c0) { #ifndef AN5D_TYPE #define AN5D_TYPE u...
1ec0a57b6fef52a52eecfac130a36f204dbab19b.cu
#include "gradient2d-512-16-256_kernel.hu" __device__ float __sbref_wrap(float *sb, size_t index) { return sb[index]; } __global__ void kernel0_16(float *A, int dimsize, int timestep, int c0) { #ifndef AN5D_TYPE #define AN5D_TYPE unsigned #endif const AN5D_TYPE __c0Len = (timestep - 0); const AN5D_TYPE __c0Pad...
2139ccd9adf30a422ce6ab8bec9b748752ae0fb3.hip
// !!! This is a file automatically generated by hipify!!! #include "cudnnconvgradient.h" void crossbowCudnnKernelConvGradient (void *args) { float alpha, beta; crossbowStreamP s = (crossbowStreamP) args; /* Get input buffer */ crossbowDataBufferP input = crossbowStreamGetCurrentInput (s); /* Get model variab...
2139ccd9adf30a422ce6ab8bec9b748752ae0fb3.cu
#include "cudnnconvgradient.h" void crossbowCudnnKernelConvGradient (void *args) { float alpha, beta; crossbowStreamP s = (crossbowStreamP) args; /* Get input buffer */ crossbowDataBufferP input = crossbowStreamGetCurrentInput (s); /* Get model variable `weights` and `bias` */ int hasBias = crossbowKernelCon...
d36cc9ff6fb3a31e43a2d59ba20000344165829e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <cstdlib> #include <iostream> #include <math.h> #include <time.h> #include <hipfft.h> #include <hipfftXt.h> #include <hip/hip_complex.h> #include <random> #include "f...
d36cc9ff6fb3a31e43a2d59ba20000344165829e.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <cstdlib> #include <iostream> #include <math.h> #include <time.h> #include <cufft.h> #include <cufftXt.h> #include <cuComplex.h> #include <random> #include "fdtdrav.h" //using namespace std; using std::cout; using std::endl; ...
f2038828edf9dc155335260e1ee02de823272782.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void init_i32 (int* vector, int value, int len) { int idx = blockIdx.x * blockDim.x + threadIdx.x; if (idx < len) { vector[idx] = value; } }
f2038828edf9dc155335260e1ee02de823272782.cu
#include "includes.h" __global__ void init_i32 (int* vector, int value, int len) { int idx = blockIdx.x * blockDim.x + threadIdx.x; if (idx < len) { vector[idx] = value; } }
4bcd81e297229ca532672a2f722ce4ab1d72f94a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <math.h> #define N (1024) // CUDA kernel. Each thread takes care of one element of c __global__ void vecAdd(float *a, float *b, float *c) { // Get our global thread ID int id =...
4bcd81e297229ca532672a2f722ce4ab1d72f94a.cu
#include <stdio.h> #include <stdlib.h> #include <math.h> #define N (1024) // CUDA kernel. Each thread takes care of one element of c __global__ void vecAdd(float *a, float *b, float *c) { // Get our global thread ID int id = blockIdx.x*blockDim.x+threadIdx.x; // Make sure we do not go out of bounds // ...
3cbea43a66746e62431a047138cae30b4fa0ddd3.hip
// !!! This is a file automatically generated by hipify!!! /* * Copyright (c) 2017 NVIDIA CORPORATION. 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 mu...
3cbea43a66746e62431a047138cae30b4fa0ddd3.cu
/* * Copyright (c) 2017 NVIDIA CORPORATION. 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, this list of co...
99e18ba587d87a05b334dfbc2569fef8720664e0.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 ...
99e18ba587d87a05b334dfbc2569fef8720664e0.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...
8481d3444acb727e3b4e90a8ec15649838df12b6.hip
// !!! This is a file automatically generated by hipify!!! #include "gpu.h" // GPU void checkErrors(const char *label, const char *file, int line) { #ifdef MY_TEST hipError_t err; err = hipDeviceSynchronize(); if (err != hipSuccess) { char *e = (char*) hipGetErrorString(err); printf("CUDA Error: %s (at %s)\...
8481d3444acb727e3b4e90a8ec15649838df12b6.cu
#include "gpu.h" // Проверка ошибок GPU void checkErrors(const char *label, const char *file, int line) { #ifdef MY_TEST cudaError_t err; err = cudaThreadSynchronize(); if (err != cudaSuccess) { char *e = (char*) cudaGetErrorString(err); printf("CUDA Error: %s (at %s)\nFile:\"%s\"\nLine:\"%d\"\n\n", e, label,...
c7596a586e89095c1690d35ac74f816cba0b2282.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "yeti_rank_pointwise.cuh" #include "radix_sort_block.cuh" #include <catboost/cuda/cuda_lib/kernel/kernel.cuh> #include <catboost/cuda/cuda_lib/kernel/arch.cuh> #include <catboost/cuda/cuda_util/kernel/kernel_helpers.cuh> #i...
c7596a586e89095c1690d35ac74f816cba0b2282.cu
#include "yeti_rank_pointwise.cuh" #include "radix_sort_block.cuh" #include <catboost/cuda/cuda_lib/kernel/kernel.cuh> #include <catboost/cuda/cuda_lib/kernel/arch.cuh> #include <catboost/cuda/cuda_util/kernel/kernel_helpers.cuh> #include <catboost/cuda/cuda_util/kernel/fill.cuh> #include <catboost/cuda/cuda_util/kerne...
4f0b5e6ca54c6b77911a2f248e422c83f9a1590e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <vector> #include "caffe/layers/superpixel_centroid_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { __device__ double atomicAddD3(double* address, double val) { unsigned long long int* address_as_ul...
4f0b5e6ca54c6b77911a2f248e422c83f9a1590e.cu
#include <vector> #include "caffe/layers/superpixel_centroid_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { __device__ double atomicAddD3(double* address, double val) { unsigned long long int* address_as_ull = (unsigned long long int*)address; unsigned long long int old = *address_as_ull, a...
8660a67b42f48023698a35ffb8a0cba1284a3da1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Copyright 2020 The OneFlow Authors. 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 ...
8660a67b42f48023698a35ffb8a0cba1284a3da1.cu
/* Copyright 2020 The OneFlow Authors. 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 by applicable law or agre...
6e62bb4a87fb56f10f22f38bbb9cafc4d39f386a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 2.5.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date January 2019 @generated from sparse/blas/zgeelltmv.cu, normal z -> d,...
6e62bb4a87fb56f10f22f38bbb9cafc4d39f386a.cu
/* -- MAGMA (version 2.5.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date January 2019 @generated from sparse/blas/zgeelltmv.cu, normal z -> d, Wed Jan 2 14:18:53 2019 */ #include "magmasparse_internal.h" #define BLOCK_SIZE 512 ...
9b89b5ec387ad69512340c2f92ef42aa8948c114.hip
// !!! This is a file automatically generated by hipify!!! #include "../common/common.h" #include <hip/hip_runtime.h> #include <stdio.h> #define DIM 128 /* * An example of using shared memory to optimize performance of a parallel * reduction by constructing partial results for a thread block in shared memory * befo...
9b89b5ec387ad69512340c2f92ef42aa8948c114.cu
#include "../common/common.h" #include <cuda_runtime.h> #include <stdio.h> #define DIM 128 /* * An example of using shared memory to optimize performance of a parallel * reduction by constructing partial results for a thread block in shared memory * before flushing to global memory. */ extern __shared__ int dsmem...
5bd0496cb0ec98c9328936c5ca3a022e86101f64.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stddef.h> #include <stdint.h> #include "model_gpu_utils.h" #include "ten_tusscher_2004_epi_S3_6.h" extern "C" SET_ODE_INITIAL_CONDITIONS_GPU(set_model_initial_conditions_gpu) { print_to_stdout_and_file("Using ten...
5bd0496cb0ec98c9328936c5ca3a022e86101f64.cu
#include <stddef.h> #include <stdint.h> #include "model_gpu_utils.h" #include "ten_tusscher_2004_epi_S3_6.h" extern "C" SET_ODE_INITIAL_CONDITIONS_GPU(set_model_initial_conditions_gpu) { print_to_stdout_and_file("Using ten Tusscher 2004 epi GPU model\n"); // execution configuration const int GRID = ...
de634d6d88444a6a29a978a4393933687a6cea58.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "billow.cuh" #include "..\..\cpp\modules\generators\Billow.h" __device__ float billow2D_Simplex(float2 point, float freq, float lacun, float persist, int init_seed, int octaves) { float result = 0.0f; float amplitude = 1...
de634d6d88444a6a29a978a4393933687a6cea58.cu
#include "billow.cuh" #include "..\..\cpp\modules\generators\Billow.h" __device__ float billow2D_Simplex(float2 point, float freq, float lacun, float persist, int init_seed, int octaves) { float result = 0.0f; float amplitude = 1.0f; // Scale starting point by frequency. point.x = point.x * freq; point.y = point....
5bc2a5dfb47c82fe42a01897a3c2b76cee958b98.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) 2019, 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 * *...
5bc2a5dfb47c82fe42a01897a3c2b76cee958b98.cu
/* * Copyright (c) 2019, 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 ...
0ffdfed1c78491ee570066149bba36c40a3e7a28.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * BSD 2-Clause License * * Copyright (c) 2020, Alessandro Capotondi * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following ...
0ffdfed1c78491ee570066149bba36c40a3e7a28.cu
/* * BSD 2-Clause License * * Copyright (c) 2020, Alessandro Capotondi * 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 copyri...
d93a6f19c58363c0e024f127f6dd9ef22f41ebcc.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <random> #include <iostream> #include <cmath> #include <vector> #include <math.h> #include <stdio.h> #include <rocblas.h> #include <hiprand/hiprand.h> #define recur_batch_size 2; #define TRAINING (false) #ifndef PER...
d93a6f19c58363c0e024f127f6dd9ef22f41ebcc.cu
#include <random> #include <iostream> #include <cmath> #include <vector> #include <math.h> #include <stdio.h> #include <cublas_v2.h> #include <curand.h> #define recur_batch_size 2; #define TRAINING (false) #ifndef PERFOPTS #define PERFOPTS (31) #endif int option = 0; #define GROUP_GEMM ((PERFOPTS & 1)) #def...
635a26fbade48c6c82db9df001fb4ce49b9ab063.hip
// !!! This is a file automatically generated by hipify!!! #include <iomanip> #include <memory> #include <chrono> #include <vector> #include <tuple> #include <hip/hip_runtime.h> #include <cudnn.h> #include <hiprand/hiprand.h> #include <thrust/device_ptr.h> #include <thrust/fill.h> #include "tensor.h" #include "cudnn...
635a26fbade48c6c82db9df001fb4ce49b9ab063.cu
#include <iomanip> #include <memory> #include <chrono> #include <vector> #include <tuple> #include <cuda.h> #include <cudnn.h> #include <curand.h> #include <thrust/device_ptr.h> #include <thrust/fill.h> #include "tensor.h" #include "cudnn_helper.h" #define USE_GET 0 class cudnnCNN { TensorDescriptor4d<float> x...
e505e11fa2efb0afd8689fc1e01aafb18895d4a4.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <unittest/unittest.h> #include <thrust/partition.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> template<typename Iterator, typename Predicate, typename Iterator2> __global__ void is_partitioned_ke...
e505e11fa2efb0afd8689fc1e01aafb18895d4a4.cu
#include <unittest/unittest.h> #include <thrust/partition.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> template<typename Iterator, typename Predicate, typename Iterator2> __global__ void is_partitioned_kernel(Iterator first, Iterator last, Predicate pred, Iterator2 result) { *result = thru...
8258fdf5e2f4e1dbf8d471f01c2d46102fc7cd48.hip
// !!! This is a file automatically generated by hipify!!! #include <iostream> #include <algorithm> #include <cstdlib> #include <ctime> #include <hip/hip_runtime.h> #include <stdio.h> #include <cassert> //define the chunk sizes that each threadblock will work on #define BLKXSIZE 32 #define BLKYSIZE 4 #define BLKZSIZE 4...
8258fdf5e2f4e1dbf8d471f01c2d46102fc7cd48.cu
#include <iostream> #include <algorithm> #include <cstdlib> #include <ctime> #include <cuda.h> #include <stdio.h> #include <cassert> //define the chunk sizes that each threadblock will work on #define BLKXSIZE 32 #define BLKYSIZE 4 #define BLKZSIZE 4 #define Q 19 #define lx 10 #define ly 10 #define lz 5 // for cuda er...
6ba89a69011980073779f0925642b24c90f5f0f8.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Copyright 2019 Stanford, NVIDIA * * 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:/...
6ba89a69011980073779f0925642b24c90f5f0f8.cu
/* Copyright 2019 Stanford, NVIDIA * * 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 t...
687c86f988ace5b515656639a3107244622a1768.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 1.5.0-beta3) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date July 2014 @generated from zcompact.cu normal z -> d, Fri Jul 18...
687c86f988ace5b515656639a3107244622a1768.cu
/* -- MAGMA (version 1.5.0-beta3) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date July 2014 @generated from zcompact.cu normal z -> d, Fri Jul 18 17:34:28 2014 @author Stan Tomov */ #include "common_magma.h" #include <assert.h...
d73568d29afccd5c4a61267cb8b9e43207fec719.hip
// !!! This is a file automatically generated by hipify!!! /* -- MAGMA (version 2.4.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date June 2018 @generated from sparse/blas/zmdot_shfl.cu, normal z -> s, Mon Jun 25 18:24:25 2018 ...
d73568d29afccd5c4a61267cb8b9e43207fec719.cu
/* -- MAGMA (version 2.4.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date June 2018 @generated from sparse/blas/zmdot_shfl.cu, normal z -> s, Mon Jun 25 18:24:25 2018 @author Moritz Kreutzer */ #include "magmasparse_interna...
a7038850fa6af77540ca92d85f573569515e0924.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Copyright 2020 The OneFlow Authors. 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 ...
a7038850fa6af77540ca92d85f573569515e0924.cu
/* Copyright 2020 The OneFlow Authors. 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 by applicable law or agre...
715429c42386dd206b8d50e88836e09870951093.hip
// !!! This is a file automatically generated by hipify!!! /* Compile with -lcublas flag */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <hip/hip_runtime.h> #include <rocblas.h> #define N 275 // Matrix size /* static void simple_sgemm(int n, float alpha, const float *A, const float *B, float be...
715429c42386dd206b8d50e88836e09870951093.cu
/* Compile with -lcublas flag */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <cuda_runtime.h> #include <cublas_v2.h> #define N 275 // Matrix size /* static void simple_sgemm(int n, float alpha, const float *A, const float *B, float beta, float *C) { int i, j, k; for (i = 0; i < n; ++i) { ...
7af2b297cf472e2cbc53dcfb318b04be163e61d8.hip
// !!! This is a file automatically generated by hipify!!! /* -- MAGMA (version 2.2.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2016 @generated from sparse/blas/zgeisai_16.cu, normal z -> s, Sun Nov 20 20:20:42 2016 ...
7af2b297cf472e2cbc53dcfb318b04be163e61d8.cu
/* -- MAGMA (version 2.2.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2016 @generated from sparse/blas/zgeisai_16.cu, normal z -> s, Sun Nov 20 20:20:42 2016 */ #include "magmasparse_internal.h" #define PRECISION_s #...
17f6cdc2e4f0e29e384a3ed47d1283db1d50dbee.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * NVIDIA Corporation and its licensors retain all intellectual property and * proprietary rights in and to this software and related documentation. * Any use,...
17f6cdc2e4f0e29e384a3ed47d1283db1d50dbee.cu
/* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * NVIDIA Corporation and its licensors retain all intellectual property and * proprietary rights in and to this software and related documentation. * Any use, reproduction, disclosure, or distribution of this software * and related documentation...
940acf6f07ddfd70ada9a39e30fdbd97d0b18e39.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <gmp.h> #include <cassert> #include "cgbn/cgbn.h" #include "utility/support.h" #define TPI 32 #define BITS 768 #define TPB 128 // the number of threads per b...
940acf6f07ddfd70ada9a39e30fdbd97d0b18e39.cu
#include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <cuda.h> #include <gmp.h> #include <cassert> #include "cgbn/cgbn.h" #include "utility/support.h" #define TPI 32 #define BITS 768 #define TPB 128 // the number of threads per block to launch (must be divisible by 32 typedef struct { cgbn_mem_t...
0eada1b6bf058b348ce2b50a332412d05d78fd19.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #foreach( $degs in $degrees ) // P(X)/Q(X) = a_0 + a_1*X + a_2*X^2 + ... + a_n*X^n / 1 + |b_0||X| + |b_1||X|^2 + ... + |b_i||X|^{i+1} #set( $degs_a = $degs[0] ) #set( $degs_b = $degs[1] ) #set( $coefs_a = $degs_a ) #set( $coefs_b ...
0eada1b6bf058b348ce2b50a332412d05d78fd19.cu
#foreach( $degs in $degrees ) // P(X)/Q(X) = a_0 + a_1*X + a_2*X^2 + ... + a_n*X^n / 1 + |b_0||X| + |b_1||X|^2 + ... + |b_i||X|^{i+1} #set( $degs_a = $degs[0] ) #set( $degs_b = $degs[1] ) #set( $coefs_a = $degs_a ) #set( $coefs_b = $degs_b - 1 ) #set( $a_counts = $coefs_a + 1 ) #set( $b_counts = $coefs_b + 1 ) #set( ...
90cbef594fdead6d008a8cd4673c4d0b12361e6d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "stdafx.h" #include "cuda_loss_function.h" #include "core/cuda_platform.h" using namespace np::engine::loss; using namespace np::engine::loss::cuda; using namespace np::core::cuda; using namespace std; LossFunction* Loss...
90cbef594fdead6d008a8cd4673c4d0b12361e6d.cu
#include "stdafx.h" #include "cuda_loss_function.h" #include "core/cuda_platform.h" using namespace np::engine::loss; using namespace np::engine::loss::cuda; using namespace np::core::cuda; using namespace std; LossFunction* LossFunction::CreateInstanceCUDA(core::cuda::CudaInstance* cuda_instance, _loss_type type, b...
db51d158b1359104f1d5859526213cb613aa66e0.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 "computeScaledHeatmap.cu" #include<chrono> #include<iostream> usi...
db51d158b1359104f1d5859526213cb613aa66e0.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 "computeScaledHeatmap.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,...
ab24b7dfa64d45c4036984dd32fe6c56d59c8d44.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <caffepro/layers/diag4d_operation_layer.h> #include <caffepro/proto/caffe.pb.h> #include <caffepro/utils/utils.h> namespace caffepro { diag4d_operation_layer::diag4d_operation_layer(caffepro_context *context, const Layer...
ab24b7dfa64d45c4036984dd32fe6c56d59c8d44.cu
#include <caffepro/layers/diag4d_operation_layer.h> #include <caffepro/proto/caffe.pb.h> #include <caffepro/utils/utils.h> namespace caffepro { diag4d_operation_layer::diag4d_operation_layer(caffepro_context *context, const LayerParameter &param) : caffepro_layer(context, param) { attr_.num_inputs_min = attr_.n...
10ed28bc11ba93ef082b59589e71d66545d9b463.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Copyright (c) 2019 PaddlePaddle Authors. 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...
10ed28bc11ba93ef082b59589e71d66545d9b463.cu
// Copyright (c) 2019 PaddlePaddle Authors. 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 requir...
3aac4c6ef66bfc45c7f2c068261ece83b39a07dc.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <time.h> #include <hip/hip_runtime.h> #include <hiprand/hiprand.h> #include <hiprand/hiprand_kernel.h> #define N 1024 //making my own strcpy and and str cat because screw cuda, not giving access to libraries :(...
3aac4c6ef66bfc45c7f2c068261ece83b39a07dc.cu
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <cuda.h> #include <curand.h> #include <curand_kernel.h> #define N 1024 //making my own strcpy and and str cat because screw cuda, not giving access to libraries :( __device__ char* nStrCpy(char *dest, const char *src) { int i =0; do { dest[i] = sr...
7681585de8d1bf6fb28e94db785d57399cb2f85b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <time.h> /* square root of number of threads in a block (the number of threads in a block is NT^2) */ #define NT 32 /* length of the target domain */ #define L 10.0 /* number of ...
7681585de8d1bf6fb28e94db785d57399cb2f85b.cu
#include <stdio.h> #include <stdlib.h> #include <time.h> /* square root of number of threads in a block (the number of threads in a block is NT^2) */ #define NT 32 /* length of the target domain */ #define L 10.0 /* number of division for the discretization of the target domain */ #define N 256 /* dimensionless...
278dc5a58d7bb0cbf189e5fa9c9fa97776211537.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> unsigned int filter_radius = 16; #define FILTER_LENGTH (2 * 16 + 1) #define ABS(val) ((val)<0.0 ? (-(val)) : (val)) #define accuracy 0.05 #define TYPE float #define cudaCheckError() { ...
278dc5a58d7bb0cbf189e5fa9c9fa97776211537.cu
#include <stdio.h> #include <stdlib.h> unsigned int filter_radius = 16; #define FILTER_LENGTH (2 * 16 + 1) #define ABS(val) ((val)<0.0 ? (-(val)) : (val)) #define accuracy 0.05 #define TYPE float #define cudaCheckError() { \ cudaError...
187f58c0c15f35ea61a80173956b32a1af480c49.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License,...
187f58c0c15f35ea61a80173956b32a1af480c49.cu
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * 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. * *...
894ca140de31790b057579cd0ff25c2eabff1533.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Copyright 2009, Andrew Corrigan, acorriga@gmu.edu // This code is from the AIAA-2009-4001 paper #include <helper_cuda.h> #include <helper_timer.h> #include <iostream> #include <fstream> #if CUDART_VERSION < 3000 struct double3...
894ca140de31790b057579cd0ff25c2eabff1533.cu
// Copyright 2009, Andrew Corrigan, acorriga@gmu.edu // This code is from the AIAA-2009-4001 paper #include <helper_cuda.h> #include <helper_timer.h> #include <iostream> #include <fstream> #if CUDART_VERSION < 3000 struct double3 { double x, y, z; }; #endif /* * Options * */ #define GAMMA 1.4 #define iterati...
5351db2db2f730d26df0b0cc30928cee187cb553.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) 2019, 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 * *...
5351db2db2f730d26df0b0cc30928cee187cb553.cu
/* * Copyright (c) 2019, 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 ...
c4212861b77f42997f2815bfa59c8855ae58e54b.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 "matrixMultiplicationKernel.hip" #include<chrono> #include<iostre...
c4212861b77f42997f2815bfa59c8855ae58e54b.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 "matrixMultiplicationKernel.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8...
a960ccff25bca93b188ac3f4bb3a3f903eca6451.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 "kernel_scanNaiveSumVertical.cu" #include<chrono> #include<iostre...
a960ccff25bca93b188ac3f4bb3a3f903eca6451.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 "kernel_scanNaiveSumVertical.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,...
b08c84e8824c004daaeac6cb6f8ce49a055d6d70.hip
// !!! This is a file automatically generated by hipify!!! // This is here so Netbeans doesn't error-spam my IDE #if !defined(__HIPCC__) // define the keywords, so that the IDE does not complain about them #define __global__ #define __device__ #define __shared__ #define __constant__ #define bloc...
b08c84e8824c004daaeac6cb6f8ce49a055d6d70.cu
// This is here so Netbeans doesn't error-spam my IDE #if !defined(__CUDACC__) // define the keywords, so that the IDE does not complain about them #define __global__ #define __device__ #define __shared__ #define __constant__ #define blockIdx.x 1 #define blockDim.x 1 #define threadIdx.x ...
520164a70fbdc5b1bc6f75fa1408ddbf151b3234.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Modification of Ingemar Ragnemalm "Real Hello World!" program // To compile execute below: // nvcc hello-world.cu -L /usr/local/cuda/lib -lcudart -o hello-world #include <stdio.h> // N = data size... // Changing this will incre...
520164a70fbdc5b1bc6f75fa1408ddbf151b3234.cu
// Modification of Ingemar Ragnemalm "Real Hello World!" program // To compile execute below: // nvcc hello-world.cu -L /usr/local/cuda/lib -lcudart -o hello-world #include <stdio.h> // N = data size... // Changing this will increase array size and will change number of blocks #define N 128 #define BLOCK_SIZE 32 #de...
e3143cf34b290bea68f4616822968a23c92629a3.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <bits/stdc++.h> #include <thrust/device_vector.h> #include <thrust/copy.h> #include <thrust/execution_policy.h> #define to_ptr(x) thrust::raw_pointer_cast(&x[0]) #define gpu_copy(x, y) thrust::copy((x).begin(), (x).end(), (...
e3143cf34b290bea68f4616822968a23c92629a3.cu
#include <bits/stdc++.h> #include <thrust/device_vector.h> #include <thrust/copy.h> #include <thrust/execution_policy.h> #define to_ptr(x) thrust::raw_pointer_cast(&x[0]) #define gpu_copy(x, y) thrust::copy((x).begin(), (x).end(), (y).begin()) #define gpu_copy_to(x, y, pos) thrust::copy((x).begin(), (x).end(), (y).begi...
16a8a1de0f9a539d2e315f672c9e8ad1b266928a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // Created by on 2020/11/10. // #include "consts.h" #include "utils.h" #include "gpu_utils.h" __constant__ float dev_coeff[R + 1]; __global__ void naive_kernel(const float *src, float *dst, const int NX, const int NY, const i...
16a8a1de0f9a539d2e315f672c9e8ad1b266928a.cu
// // Created by 王张苏徽 on 2020/11/10. // #include "consts.h" #include "utils.h" #include "gpu_utils.h" __constant__ float dev_coeff[R + 1]; __global__ void naive_kernel(const float *src, float *dst, const int NX, const int NY, const int NZ) { int gx = blockIdx.x * blockDim.x + threadIdx.x; int gy = blockIdx.y...
b7be925bbea332f10c2a8ff0f010bddb335f2f38.hip
// !!! This is a file automatically generated by hipify!!! // General #include <iostream> #include <algorithm> #include <sstream> #include <assert.h> // Warpkernel #include "warpkernel.hpp" // cusp #include <cusp/coo_matrix.h> #include <cusp/io/matrix_market.h> #include <cusp/csr_matrix.h> #include <cusp/multiply.h> #...
b7be925bbea332f10c2a8ff0f010bddb335f2f38.cu
// General #include <iostream> #include <algorithm> #include <sstream> #include <assert.h> // Warpkernel #include "warpkernel.hpp" // cusp #include <cusp/coo_matrix.h> #include <cusp/io/matrix_market.h> #include <cusp/csr_matrix.h> #include <cusp/multiply.h> #include <cusp/detail/timer.h> #include <cusp/hyb_matrix.h> ...
4451802c8b2322ffd859073f0941b02b211084af.hip
// !!! This is a file automatically generated by hipify!!! #include <nori/bumpMap.h> #include <filesystem/resolver.h> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include "opencv2/imgproc/imgproc.hpp" NORI_NAMESPACE_BEGIN __device__ Vector3f BumpMap::eval(const Point2f& uv, const Frame& f...
4451802c8b2322ffd859073f0941b02b211084af.cu
#include <nori/bumpMap.h> #include <filesystem/resolver.h> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include "opencv2/imgproc/imgproc.hpp" NORI_NAMESPACE_BEGIN __device__ Vector3f BumpMap::eval(const Point2f& uv, const Frame& frame) { // rescale and shift float x = (uv.x()/m_...
e16444d64f4c758328a39ac08f4513b0bed262e9.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Homework 1 // Color to Greyscale Conversion //A common way to represent color images is known as RGBA - the color //is specified by how much Red, Grean and Blue is in it. //The 'A' stands for Alpha and is used for transparency, ...
e16444d64f4c758328a39ac08f4513b0bed262e9.cu
// Homework 1 // Color to Greyscale Conversion //A common way to represent color images is known as RGBA - the color //is specified by how much Red, Grean and Blue is in it. //The 'A' stands for Alpha and is used for transparency, it will be //ignored in this homework. //Each channel Red, Blue, Green and Alpha is rep...
913f497e8ad8fb92f78447f4049b32f7c1082e4e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <algorithm> #include <cfloat> #include <cmath> #include <vector> #include "caffe/layer.hpp" #include "caffe/vision_layers.hpp" #include "caffe/sds_layers.hpp" #include "caffe/util/math_functions.hpp" using std::max; using...
913f497e8ad8fb92f78447f4049b32f7c1082e4e.cu
#include <algorithm> #include <cfloat> #include <cmath> #include <vector> #include "caffe/layer.hpp" #include "caffe/vision_layers.hpp" #include "caffe/sds_layers.hpp" #include "caffe/util/math_functions.hpp" using std::max; using std::min; namespace caffe { template <typename Dtype> inline Dtype sigmoid(Dtype x) { ...
a39c0adc05013487938aa43775bf172cb74ca63f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "pairwise_transform.h" #define MIN 1e-12 __device__ double op(double d1,double d2,double *params) { double diff = d1 - d2; double absDiff = abs(diff); if(absDiff < MIN) return 1; retu...
a39c0adc05013487938aa43775bf172cb74ca63f.cu
#include "pairwise_transform.h" #define MIN 1e-12 __device__ double op(double d1,double d2,double *params) { double diff = d1 - d2; double absDiff = abs(diff); if(absDiff < MIN) return 1; return 0; } __device__ double op(double d1,double *params) { return d1; } extern "...
093514d50a57960b850eff6c36b92c140286eba9.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" extern "C" { #define FLT_MIN 1.175494351e-38F #define FLT_MAX 3.402823466e+38F __global__ void separateChannels(const uchar4* const inputImageRGBA, int numRows, i...
093514d50a57960b850eff6c36b92c140286eba9.cu
extern "C" { #define FLT_MIN 1.175494351e-38F #define FLT_MAX 3.402823466e+38F __global__ void separateChannels(const uchar4* const inputImageRGBA, int numRows, int numCols, float* const redChannel, ...