hip_filename
stringlengths
5
84
hip_content
stringlengths
79
9.69M
cuda_filename
stringlengths
4
83
cuda_content
stringlengths
19
9.69M
84ea5b3687d512db85d7263a5a55756fce686cb5.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdiocu.h> #include <crtdefscu.h> #include <ext\memfile.h> #include <assert.h> static __global__ void g_ext_memfile_test1() { printf("ext_memfile_test1\n"); } hipError_t ext_memfile_test1() {hipLaunchKernelGGL(( g_ext_me...
84ea5b3687d512db85d7263a5a55756fce686cb5.cu
#include <stdiocu.h> #include <crtdefscu.h> #include <ext\memfile.h> #include <assert.h> static __global__ void g_ext_memfile_test1() { printf("ext_memfile_test1\n"); } cudaError_t ext_memfile_test1() { g_ext_memfile_test1<<<1, 1>>>(); return cudaDeviceSynchronize(); }
60df6f02030fedd82bc95bc4982bbc5e297f4ed7.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdlib.h> #include <assert.h> #include <iostream> #include <random> #include "../nn_utils/nn_exception.hh" #include "../nn_utils/shape.hh" #include "linear_softmax.hh" #define BLOCK_DIM 16 // This kernel is optimized...
60df6f02030fedd82bc95bc4982bbc5e297f4ed7.cu
#include <stdlib.h> #include <assert.h> #include <iostream> #include <random> #include "../nn_utils/nn_exception.hh" #include "../nn_utils/shape.hh" #include "linear_softmax.hh" #define BLOCK_DIM 16 // This kernel is optimized to ensure all global reads and writes are coalesced, // and to avoid bank conflicts in ...
4c284d104ca5d1f839ddb4826046ef4316f3bf45.hip
// !!! This is a file automatically generated by hipify!!! // includes, system #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> // includes, project #include <hip/hip_runtime.h> #include <hipfft.h> #include <hipfftXt.h> #include <helper_cuda.h> #include <helper_functions.h> // Complex data...
4c284d104ca5d1f839ddb4826046ef4316f3bf45.cu
// includes, system #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> // includes, project #include <cuda_runtime.h> #include <cufft.h> #include <cufftXt.h> #include <helper_cuda.h> #include <helper_functions.h> // Complex data type typedef float2 Complex; static __device__ __host__ inline ...
796bbdf45d349fce8c9d71434850a76d511d2ae1.hip
// !!! This is a file automatically generated by hipify!!! #include <ATen/native/TensorIterator.h> #include <ATen/native/ReduceOps.h> #include <ATen/native/Resize.h> #include <ATen/native/hip/Loops.cuh> #include <ATen/native/hip/Reduce.cuh> #include <ATen/native/hip/Normalization.cuh> #include <c10/hip/HIPMathCompat.h>...
796bbdf45d349fce8c9d71434850a76d511d2ae1.cu
#include <ATen/native/TensorIterator.h> #include <ATen/native/ReduceOps.h> #include <ATen/native/Resize.h> #include <ATen/native/cuda/Loops.cuh> #include <ATen/native/cuda/Reduce.cuh> #include <ATen/native/cuda/Normalization.cuh> #include <c10/cuda/CUDAMathCompat.h> namespace at { namespace native { namespace { inli...
de401239e63ef1fcdf83e732c4dee8d34fa138e1.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-...
de401239e63ef1fcdf83e732c4dee8d34fa138e1.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:/...
58111d66fd137a9f9dd26a7ecf436aee2d5ae564.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /****************************************************************************** * Copyright 2019 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this...
58111d66fd137a9f9dd26a7ecf436aee2d5ae564.cu
/****************************************************************************** * Copyright 2019 The Apollo 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 ...
0aac155a298455eb45d84c25ca233a7fc15c8aea.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "GPUUtils.hpp" // Huge props to wykvictor for this solution https://github.com/opencv/opencv/issues/6295#issuecomment-246647886 __global__ void inRangeCudaKernel(const cv::cuda::PtrStepSz<uchar3> src, cv::cuda::PtrStepSz...
0aac155a298455eb45d84c25ca233a7fc15c8aea.cu
#include "GPUUtils.hpp" // Huge props to wykvictor for this solution https://github.com/opencv/opencv/issues/6295#issuecomment-246647886 __global__ void inRangeCudaKernel(const cv::cuda::PtrStepSz<uchar3> src, cv::cuda::PtrStepSzb dst, int lbc0, int ubc0, int lbc1, int ubc1, int lbc2, int ubc2) { int x = blockIdx.x...
664a806d90cd315567d022be4cfc620c3a7d4fa1.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <iostream> #include <hip/hip_runtime.h> // kernels are C++ functions defined with CUDA // They will be called with << >>() // hipGetDeviceCount (int* count) // Returns the number of compute-capable devices // hipGetDevicePropert...
664a806d90cd315567d022be4cfc620c3a7d4fa1.cu
#include <stdio.h> #include <iostream> #include <cuda_runtime.h> // kernels are C++ functions defined with CUDA // They will be called with << >>() // cudaGetDeviceCount (int* count) // Returns the number of compute-capable devices // cudaGetDeviceProperties (cudaDeviceProp* prop, int device) // Returns informati...
e473a1432a319b557670ff9420c4610b3547f604.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Copyright 2017 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:/...
e473a1432a319b557670ff9420c4610b3547f604.cu
/* Copyright 2017 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...
a4aa0de0a6ccd19e2064fe384a5b2b298b6e5885.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // source: http://www.cl.cam.ac.uk/research/rainbow/projects/dcbgrid/DCBGrid-preprint.pdf #include "GpuImage.h" #include "helper_cuda.h" #include "AmCudaHelper.cuh" #include <iostream> void GpuImage::Create( GpuImageType type, int...
a4aa0de0a6ccd19e2064fe384a5b2b298b6e5885.cu
// source: http://www.cl.cam.ac.uk/research/rainbow/projects/dcbgrid/DCBGrid-preprint.pdf #include "GpuImage.h" #include "helper_cuda.h" #include "AmCudaHelper.cuh" #include <iostream> void GpuImage::Create( GpuImageType type, int width, int height ) { if ( type != imageType || width != w || height != h ) { ...
08db76dc964acf6c946aa9e52f496ad38081c6e1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #ifdef USE_OPENCV #include <math.h> #include <math_constants.h> #include <opencv2/core/core.hpp> #include <vector> #include "caffe/layers/detectnet_transform_layer.hpp" #include "caffe/util/detectnet_coverage.hpp" #include "caffe...
08db76dc964acf6c946aa9e52f496ad38081c6e1.cu
#ifdef USE_OPENCV #include <math.h> #include <math_constants.h> #include <opencv2/core/core.hpp> #include <vector> #include "caffe/layers/detectnet_transform_layer.hpp" #include "caffe/util/detectnet_coverage.hpp" #include "caffe/util/gpu_memory.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { // Ca...
073d5f50c9be7f739977b906dc8e0f00636067eb.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include "hd_block_size.h" #define TODEV(A,s) float *A##_d;hipMalloc((void**)&A##_d,((s))*sizeof(float));hipMemcpy(A##_d,A,(s)*sizeof(float),hipMemcpyHostToDevice); #define FROMDEV(A,s) hipMemcpy(A,A##_d,(s)*size...
073d5f50c9be7f739977b906dc8e0f00636067eb.cu
#include <stdio.h> #include "hd_block_size.h" #define TODEV(A,s) float *A##_d;cudaMalloc((void**)&A##_d,((s))*sizeof(float));cudaMemcpy(A##_d,A,(s)*sizeof(float),cudaMemcpyHostToDevice); #define FROMDEV(A,s) cudaMemcpy(A,A##_d,(s)*sizeof(float),cudaMemcpyDeviceToHost); #define CLNUP(A) cudaFree(A##_d) #define TODEV3(...
fe8c7908b9cd7eef487998e29491f7cb4788086a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Copyright 2022 The Microsoft DeepSpeed Team */ #include "dequantization_utils.h" #include "memory_access_utils.h" namespace cg = cooperative_groups; template <typename T, int numBits, dequantize::Type qType, int unroll, int th...
fe8c7908b9cd7eef487998e29491f7cb4788086a.cu
/* Copyright 2022 The Microsoft DeepSpeed Team */ #include "dequantization_utils.h" #include "memory_access_utils.h" namespace cg = cooperative_groups; template <typename T, int numBits, dequantize::Type qType, int unroll, int threads> __global__ void dequantize_kernel(T* __restrict__ dequant_data, ...
c258f058e917497c2f0493b9bf70047bac7b649d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include "testMultiGPU_Jacobi2D_Decom.cuh" #include <iostream> #include <chrono> #include <memory> #include <vector> #include <fstream> using namespace std; using namespace std::chrono; #define...
c258f058e917497c2f0493b9bf70047bac7b649d.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include "testMultiGPU_Jacobi2D_Decom.cuh" #include <iostream> #include <chrono> #include <memory> #include <vector> #include <fstream> using namespace std; using namespace std::chrono; #define IMUL(a,b) __mul24(a,b) //cudaError_t performMultiGPUJacobi(...
ff72425b759500648faa4ac6daa37e28e322cc45.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <string> #include <iostream> #include <thread> #include <atomic> #include <vector> #include <mutex> #include <chrono> using namespace std; atomic<int> epoch; atomic<int> count; int num_threads; int duration; static int TO...
ff72425b759500648faa4ac6daa37e28e322cc45.cu
#include <string> #include <iostream> #include <thread> #include <atomic> #include <vector> #include <mutex> #include <chrono> using namespace std; atomic<int> epoch; atomic<int> count; int num_threads; int duration; static int TOTAL_ITERATIONS_THREAD = 100; static int TOTAL_ITERATIONS_PROGRAM = 100; mutex thread_mut...
4ad786472792faaf13a3019778c8044a5297485e.hip
// !!! This is a file automatically generated by hipify!!! #include "THHUNN.h" #include "common.h" #include "im2col.h" void THNN_CudaSpatialDilatedConvolution_updateOutput(THCState *state, THCudaTensor *input, THCudaTensor *output, THCudaTensor *weight, THCudaTensor *bias, THCudaTensor *column...
4ad786472792faaf13a3019778c8044a5297485e.cu
#include "THCUNN.h" #include "common.h" #include "im2col.h" void THNN_CudaSpatialDilatedConvolution_updateOutput(THCState *state, THCudaTensor *input, THCudaTensor *output, THCudaTensor *weight, THCudaTensor *bias, THCudaTensor *columns, THCudaTensor *ones, int kW, int kH, int dW, ...
b3992b851fcd23923c874c724382106c4bcb6754.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <cstdlib> __global__ void conv_batchnorm_fusion_kernel(float *output, float *input, float *weight, float *bias, int batch, int in_channel, int out_channel, int heig...
b3992b851fcd23923c874c724382106c4bcb6754.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <cstdlib> __global__ void conv_batchnorm_fusion_kernel(float *output, float *input, float *weight, float *bias, int batch, int in_channel, int out_channel, int height, int width, int kernel_height, int kernel_width, int pad_h...
123b01baa5d066e0cd292609e2202e9b29cdf067.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <bits/stdc++.h> #define milliseconds 1e3 using namespace std; typedef struct _Node_info{ u_short parent_index; u_int potential_flow; } Node_info; void readInput(const char* filename, u_int total_nodes, u_short* residua...
123b01baa5d066e0cd292609e2202e9b29cdf067.cu
#include <bits/stdc++.h> #define milliseconds 1e3 using namespace std; typedef struct _Node_info{ u_short parent_index; u_int potential_flow; } Node_info; void readInput(const char* filename, u_int total_nodes, u_short* residual_capacity) { ifstream file; file.open(filename); if (!file) { cout << "Er...
277d3b0a84598fc3b791a76644f0822778682fe6.hip
// !!! This is a file automatically generated by hipify!!! #include "common/book.h" #include <hip/hip_runtime.h> #include <cuda_device_runtime_api.h> #include <hip/hip_runtime.h> #include <stdio.h> #define N 10 __global__ void add(int *a, int *b, int *c) { int tid = threadIdx.x + blockIdx.x * blockDim.x; while ...
277d3b0a84598fc3b791a76644f0822778682fe6.cu
#include "common/book.h" #include <cuda.h> #include <cuda_device_runtime_api.h> #include <cuda_runtime.h> #include <stdio.h> #define N 10 __global__ void add(int *a, int *b, int *c) { int tid = threadIdx.x + blockIdx.x * blockDim.x; while (tid < N) { c[tid] = a[tid] + b[tid]; tid += blockDim.x * gridDim...
b709bde563e0ccdac0b07d99c7c82843dcb0235d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 1.4.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver August 2013 @generated s Tue Aug 13 16:45:08 2013 */ #include "common_magm...
b709bde563e0ccdac0b07d99c7c82843dcb0235d.cu
/* -- MAGMA (version 1.4.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver August 2013 @generated s Tue Aug 13 16:45:08 2013 */ #include "common_magma.h" /* //////////////////////////////////////////////////////////////////////////// ...
e0f956ab8ced332bd15fcc2f3d5f7af90975b2e5.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <assert.h> #include <hipcub/hipcub.hpp> #include "caffe2/core/context_gpu.h" #include "caffe2/operators/operator_fallback_gpu.h" #include "cross_entropy_wsl_op.h" namespace caffe2 { namespace { __global__ void LabelBalan...
e0f956ab8ced332bd15fcc2f3d5f7af90975b2e5.cu
#include <assert.h> #include <cub/block/block_reduce.cuh> #include "caffe2/core/context_gpu.h" #include "caffe2/operators/operator_fallback_gpu.h" #include "cross_entropy_wsl_op.h" namespace caffe2 { namespace { __global__ void LabelBalanceWSLKernel(const int outer_size, const i...
peer2peerMemcpy.hip
// !!! This is a file automatically generated by hipify!!! /* * * peer2peerMemcpy.cu * * Microbenchmark of peer-to-peer memcpy using portable pinned memory. * The CUDA driver implements a similar strategy for GPUs that * cannot perform peer-to-peer directly, e.g. because they are plugged * into different I/O hub...
peer2peerMemcpy.cu
/* * * peer2peerMemcpy.cu * * Microbenchmark of peer-to-peer memcpy using portable pinned memory. * The CUDA driver implements a similar strategy for GPUs that * cannot perform peer-to-peer directly, e.g. because they are plugged * into different I/O hubs. * * Build with: nvcc -I ../chLib <options> peer2peerMe...
c80331d1b383bf814c0c1a0cfe6dcf7f817a29f0.hip
// !!! This is a file automatically generated by hipify!!! #include <torch/extension.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <vector> namespace { template <typename scalar_t> __global__ void cross_prod_cuda_forward_kernel( const torch::PackedTensorAccessor<scalar_t,3,torch::Restric...
c80331d1b383bf814c0c1a0cfe6dcf7f817a29f0.cu
#include <torch/extension.h> #include <cuda.h> #include <cuda_runtime.h> #include <vector> namespace { template <typename scalar_t> __global__ void cross_prod_cuda_forward_kernel( const torch::PackedTensorAccessor<scalar_t,3,torch::RestrictPtrTraits,size_t> x1, const torch::PackedTensorAccessor<scalar_t,3,t...
ceb6e451d18202ea4fe4afa5e8050bdd9ed18c7c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Author: ddlee, me@ddlee.cn * modified from MXNet's MultiboxTarget Operator */ #include "./assign_anchor-inl.h" #include <mshadow/cuda/tensor_gpu-inl.cuh> #define ASSIGN_ANCHOR_CUDA_CHECK(condition) \ /* Code block avoids ...
ceb6e451d18202ea4fe4afa5e8050bdd9ed18c7c.cu
/* * Author: ddlee, me@ddlee.cn * modified from MXNet's MultiboxTarget Operator */ #include "./assign_anchor-inl.h" #include <mshadow/cuda/tensor_gpu-inl.cuh> #define ASSIGN_ANCHOR_CUDA_CHECK(condition) \ /* Code block avoids redefinition of cudaError_t error */ \ do { \ cudaError_t error = condition; \ ...
642dacb05f3e51b7242d2ae2e59c34d4af788fba.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" extern "C" extern "C" extern "C" extern "C" extern "C" extern "C" //=== Vector arithmetic ====================================================== extern "C" extern "C" exte...
642dacb05f3e51b7242d2ae2e59c34d4af788fba.cu
#include "includes.h" extern "C" extern "C" extern "C" extern "C" extern "C" extern "C" //=== Vector arithmetic ====================================================== extern "C" extern "C" extern "C" extern "C" extern "C" extern "C" //=== Vector-and-scalar arithmetic ==...
22add1c034167ce02b6437d3b398c8a839221a00.hip
// !!! This is a file automatically generated by hipify!!! #include "stdio.h" #include "CudaMatrixKernels.hh" #include <math_constants.h> #include <hip/hip_runtime.h> #include <limits> #ifdef __CDT_PARSER__ #define __global__ #define __device__ #define __host__ #define __shared__ #endif #define THREADS_PER_BLOCK 1024...
22add1c034167ce02b6437d3b398c8a839221a00.cu
#include "stdio.h" #include "CudaMatrixKernels.hh" #include <math_constants.h> #include <cuda_runtime.h> #include <limits> #ifdef __CDT_PARSER__ #define __global__ #define __device__ #define __host__ #define __shared__ #endif #define THREADS_PER_BLOCK 1024 /***********************************************************...
80ed54063da4bcbb4cfd410ed2c5e35765da59a9.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * 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 ...
80ed54063da4bcbb4cfd410ed2c5e35765da59a9.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...
ce74c56e053cda13e2cfc483a3cb4bdc5e626910.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // pbrt is Copyright(c) 1998-2020 Matt Pharr, Wenzel Jakob, and Greg Humphreys. // The pbrt source code is licensed under the Apache License, Version 2.0. // SPDX: Apache-2.0 #include <pbrt/pbrt.h> #include <pbrt/gpu/accel.h> #inc...
ce74c56e053cda13e2cfc483a3cb4bdc5e626910.cu
// pbrt is Copyright(c) 1998-2020 Matt Pharr, Wenzel Jakob, and Greg Humphreys. // The pbrt source code is licensed under the Apache License, Version 2.0. // SPDX: Apache-2.0 #include <pbrt/pbrt.h> #include <pbrt/gpu/accel.h> #include <pbrt/gpu/optix.h> #include <pbrt/interaction.h> #include <pbrt/materials.h> #inclu...
ba146d52001dbc9e55c2979ab39e72d104b38b2b.hip
// !!! This is a file automatically generated by hipify!!! #include "THHUNN.h" #include "common.h" #if THRUST_PATH #include <thrust/fill.h> #include <thrust/functional.h> #include <thrust/device_ptr.h> #include <thrust/reduce.h> #include <thrust/inner_product.h> #else #include <bolt/amp/functio...
ba146d52001dbc9e55c2979ab39e72d104b38b2b.cu
#include "THCUNN.h" #include "common.h" #if THRUST_PATH #include <thrust/fill.h> #include <thrust/functional.h> #include <thrust/device_ptr.h> #include <thrust/reduce.h> #include <thrust/inner_product.h> #else #include <bolt/amp/functional.h> #include <bolt/amp/inner_product.h> #endif stru...
e1dfe5d2cbbd77cecc3480bb144c3f6fcb1a7853.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* this example to show malloc 2D interface used to get a memory optimized add padding then make sure alignment is better for fetch */ #include <common_functions.h> #include <iostream> using namespace std; __global__ void MyKernel...
e1dfe5d2cbbd77cecc3480bb144c3f6fcb1a7853.cu
/* this example to show malloc 2D interface used to get a memory optimized add padding then make sure alignment is better for fetch */ #include <common_functions.h> #include <iostream> using namespace std; __global__ void MyKernel(char* devPtr, size_t pitch, int width, int height) { for (int r = 0; r < height; ++r)...
40d85435f862cdb86752ea8ca6951507cc0f7bfb.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "vadd.cuh" #include <cstdio> #include <cstdlib> #include <iostream> #define THREAD_NUM 512 // #define THREAD_NUM 1024 int main(int argc, char *argv[]) { int N = atoi(argv[1]); float *a, *b; hipMallocManaged(&a, N * ...
40d85435f862cdb86752ea8ca6951507cc0f7bfb.cu
#include "vadd.cuh" #include <cstdio> #include <cstdlib> #include <iostream> #define THREAD_NUM 512 // #define THREAD_NUM 1024 int main(int argc, char *argv[]) { int N = atoi(argv[1]); float *a, *b; cudaMallocManaged(&a, N * sizeof(float)); cudaMallocManaged(&b, N * sizeof(float)); // assign a and b for ...
f1f0d9f73197b2683116d28cb5d515d076b97f71.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #define N 8192 // Number of rows/columns of the matrix. #define TILE_DIM 32 #define SIZE N*N // Total size of a matrix. // Compares two matrices element by element. int isTransposed (const double* a, const doub...
f1f0d9f73197b2683116d28cb5d515d076b97f71.cu
#include <stdio.h> #define N 8192 // Number of rows/columns of the matrix. #define TILE_DIM 32 #define SIZE N*N // Total size of a matrix. // Compares two matrices element by element. int isTransposed (const double* a, const double* b, const int dim) { for (int i = 0; i < dim; i++) { for (int j = 0; j < dim; j...
d83846d691ba4a92e5dc192f6939988c7284ccf1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "funset.h" #include <iostream> using namespace std; int test1(); int test2(); int test3();// int test4();//JuliaCUDA int test5();// int test6();// int test7();//rippleCUDA int test8();//CUDA int test9();//Juli...
d83846d691ba4a92e5dc192f6939988c7284ccf1.cu
#include "funset.h" #include <iostream> using namespace std; int test1(); int test2(); int test3();//通过线程块索引来计算两个矢量和 int test4();//Julia的CUDA实现 int test5();//通过线程索引来计算两个矢量和 int test6();//通过线程块索引和线程索引来计算两个矢量和 int test7();//ripple的CUDA实现 int test8();//点积运算的CUDA实现 int test9();//Julia的CUDA实现,加入了线程同步函数__syncth...
8a03311e10206f49e8057bf910a80e07153270f2.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <opencv2\core.hpp> #include <opencv2\highgui.hpp> #include <stdio.h> #include<ctime> using namespace cv; using namespace std; void Thresholding(const Mat& inpu...
8a03311e10206f49e8057bf910a80e07153270f2.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <opencv2\core.hpp> #include <opencv2\highgui.hpp> #include <stdio.h> #include<ctime> using namespace cv; using namespace std; void Thresholding(const Mat& input, Mat& output, unsigned char th) { // TODO: Add your CPU sid...
fa73b8553adb35da44a67981dfe779b05bd4499f.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include "fitsio.h" #include "ddyn.cuh" void Grid::write_image(int wj,const char * Version){ fitsfile *fptr; /* pointer to the FITS file; defined in fitsio.h */ configdat...
fa73b8553adb35da44a67981dfe779b05bd4499f.cu
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include "fitsio.h" #include "ddyn.cuh" void Grid::write_image(int wj,const char * Version){ fitsfile *fptr; /* pointer to the FITS file; defined in fitsio.h */ configdata *cfg = &cconfig; char *fname; char *ver; int ...
566750a884a5b877638809f6c2f1f501ed960afa.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 2.0.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date February 2016 @precisions normal z -> s d c */ #include "magma_intern...
566750a884a5b877638809f6c2f1f501ed960afa.cu
/* -- MAGMA (version 2.0.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date February 2016 @precisions normal z -> s d c */ #include "magma_internal.h" #define NB 64 // each thread block does one NB x n block row of A. // each thre...
169e5007782e1bb5447c739a3ab8ddc2d04b4c20.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * 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 soft...
169e5007782e1bb5447c739a3ab8ddc2d04b4c20.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...
f76f3e039bc20c2e5f9e0156f3ff12a91a28bcd3.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 "addScalar.cu" #include<chrono> #include<iostream> using namespac...
f76f3e039bc20c2e5f9e0156f3ff12a91a28bcd3.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 "addScalar.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{24,24}...
d43d3811990e804e0b50186a1446048e7c856797.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <algorithm> #include <memory> #include <thrust/count.h> #include <thrust/device_ptr.h> #include <thrust/device_vector.h> #include <vector> #include "caffe/layers/mtcnn_bbox_layer.hpp" namespace caffe { template <typename...
d43d3811990e804e0b50186a1446048e7c856797.cu
#include <algorithm> #include <memory> #include <thrust/count.h> #include <thrust/device_ptr.h> #include <thrust/device_vector.h> #include <vector> #include "caffe/layers/mtcnn_bbox_layer.hpp" namespace caffe { template <typename Dtype> __global__ void filter_by_threshold(const Dtype *prob, const int prob_cnt, ...
cf1bff21b28444dd295f4ededfa7c2f7dcd38a91.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.hip" #include<chrono> #include<iostream> using namespace ...
cf1bff21b28444dd295f4ededfa7c2f7dcd38a91.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.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{24,24},{3...
39d41575acd745be2f4848c5a5c105bd09a9410f.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <thrust/device_vector.h> #include <thrust/host_vector.h> #include <thrust/scan.h> #include "common.h" #include "thrust.h" namespace StreamCompaction { namespace Thrust { float timeThrust(...
39d41575acd745be2f4848c5a5c105bd09a9410f.cu
#include <cuda.h> #include <cuda_runtime.h> #include <thrust/device_vector.h> #include <thrust/host_vector.h> #include <thrust/scan.h> #include "common.h" #include "thrust.h" namespace StreamCompaction { namespace Thrust { float timeThrust(int n, int *odata, const int *idata) { int* dev_odata; ...
36fe0e26e725c96ac9dec06bc0b0bdd7e3bff299.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <sys/time.h> extern "C" { #include "timer.h" } #define NTIMES 16 // CUDA kernel version of stream triad __global__ void StreamTriad(int n, double scalar, double *a, double *b, double *c){ int i = ...
36fe0e26e725c96ac9dec06bc0b0bdd7e3bff299.cu
#include <stdio.h> #include <sys/time.h> extern "C" { #include "timer.h" } #define NTIMES 16 // CUDA kernel version of stream triad __global__ void StreamTriad(int n, double scalar, double *a, double *b, double *c){ int i = blockIdx.x*blockDim.x+threadIdx.x; // Protect from going out-of-bounds if (i >= n...
3e75c95a6a6e1422da2470b30e080380195b38b6.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #define HANDLE_ERROR(err) (HandleError(err, __FILE__, __LINE_...
3e75c95a6a6e1422da2470b30e080380195b38b6.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #define HANDLE_ERROR(err) (HandleError(err, __FILE__, __LINE__)) using namespace std; using namespace cv; static const in...
dce2240b4e8c19237992b1202ddb9bcddaa99214.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /******************************************************************************** * * Copyright (C) 2015 Culham Centre for Fusion Energy, * United Kingdom Atomic Energy Authority, Oxfordshire OX14 3DB, UK * * Licensed under th...
dce2240b4e8c19237992b1202ddb9bcddaa99214.cu
/******************************************************************************** * * Copyright (C) 2015 Culham Centre for Fusion Energy, * United Kingdom Atomic Energy Authority, Oxfordshire OX14 3DB, UK * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in c...
4d6b308ef931caeffc912f8eacc129298a09dfdb.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright 2020 Naval Postgraduate School * * 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 * ...
4d6b308ef931caeffc912f8eacc129298a09dfdb.cu
/* * Copyright 2020 Naval Postgraduate School * * 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...
14f00c86d077781a1865358b27be677b65cc972d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "../include/cuda_bordering.h" __global__ void bordering_rect(uchar *d_input, int height, int width, int top, int bottom, int left, int right, uchar color, uchar *d_output) { int row = blockDim.y*blockIdx.y + threadIdx...
14f00c86d077781a1865358b27be677b65cc972d.cu
#include "../include/cuda_bordering.h" __global__ void bordering_rect(uchar *d_input, int height, int width, int top, int bottom, int left, int right, uchar color, uchar *d_output) { int row = blockDim.y*blockIdx.y + threadIdx.y; int col = blockDim.x*blockIdx.x + threadIdx.x; // each thread handle 4 pixels ...
7c0e2c5341e9e4f9355013018da248037c2a3b7c.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <math.h> #include <hip/hip_runtime_api.h> #include <hiprand/hiprand.h> #include "hiprand/hiprand_kernel.h" #include <assert.h> // L should be (multiple of (THR_NUMBER - 2) ) + 2 #define L 114 const int AREA = L...
7c0e2c5341e9e4f9355013018da248037c2a3b7c.cu
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <cuda_runtime_api.h> #include <curand.h> #include "curand_kernel.h" #include <assert.h> // L should be (multiple of (THR_NUMBER - 2) ) + 2 #define L 114 const int AREA = L*L; const int NTOT = (L-2)*(L-2); // #define T 6. // #define T 0.1 // #define T...
67f565dc7d39b454aa338740c10b5afa7058e259.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "modulated_deform_conv_cuda_kernel.cuh" #include "pytorch_cuda_helper.hpp" void modulated_deformable_im2col_cuda( const Tensor data_im, const Tensor data_offset, const Tensor data_mask, const int batch_size, const ...
67f565dc7d39b454aa338740c10b5afa7058e259.cu
#include "modulated_deform_conv_cuda_kernel.cuh" #include "pytorch_cuda_helper.hpp" void modulated_deformable_im2col_cuda( const Tensor data_im, const Tensor data_offset, const Tensor data_mask, const int batch_size, const int channels, const int height_im, const int width_im, const int height_col, const i...
88d2c49642d92b97dc19ded89f37d66683e89f29.hip
// !!! This is a file automatically generated by hipify!!! #include "common/book.h" #include "common/cpu_anim.h" #include <hip/hip_runtime.h> #include <cuda_device_runtime_api.h> #include <hip/hip_runtime.h> #define DIM 1024 #define PI 3.1415926535897932f #define MAX_TEMP 1.0f #define MIN_TEMP 0.0001f #define SPEED 0...
88d2c49642d92b97dc19ded89f37d66683e89f29.cu
#include "common/book.h" #include "common/cpu_anim.h" #include <cuda.h> #include <cuda_device_runtime_api.h> #include <cuda_runtime.h> #define DIM 1024 #define PI 3.1415926535897932f #define MAX_TEMP 1.0f #define MIN_TEMP 0.0001f #define SPEED 0.25f struct DataBlock { unsigned char *output_bitmap; float *dev_in...
a3f45d744bc7ab5e4c97b8bc9add228dec87785f.hip
// !!! This is a file automatically generated by hipify!!! /* Udacity Homework 3 HDR Tone-mapping Background HDR ============== A High Dynamic Range (HDR) image contains a wider variation of intensity and color than is allowed by the RGB format with 1 byte per channel that we have used in the previous assignment. To...
a3f45d744bc7ab5e4c97b8bc9add228dec87785f.cu
/* Udacity Homework 3 HDR Tone-mapping Background HDR ============== A High Dynamic Range (HDR) image contains a wider variation of intensity and color than is allowed by the RGB format with 1 byte per channel that we have used in the previous assignment. To store this extra information we use single precision float...
8a20c1168b7b47bbfc9e503b91c7d7163c17f455.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <cstdio> #include <iostream> #include "data_manager.h" #include "gpu_util.h" #include "gpu_benchmark.h" #define BLOCK_SIZE 32 __global__ void naiveMulKernel(size_t pitch_A, size_t pitch_B, size_t pitch_C, ...
8a20c1168b7b47bbfc9e503b91c7d7163c17f455.cu
#include <cstdio> #include <iostream> #include "data_manager.h" #include "gpu_util.h" #include "gpu_benchmark.h" #define BLOCK_SIZE 32 __global__ void naiveMulKernel(size_t pitch_A, size_t pitch_B, size_t pitch_C, float* cuda_A, float* cuda_B, float* cuda_C, int k); void naiveGP...
9df4b875fbc047c803944a3411c9e213e60e1d18.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 2.2.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2016 @precisions normal z -> s d c @author Mark Gates...
9df4b875fbc047c803944a3411c9e213e60e1d18.cu
/* -- MAGMA (version 2.2.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2016 @precisions normal z -> s d c @author Mark Gates */ #include "magma_internal.h" #define NB 64 /* Matrix is m x m, and is divided i...
a4ddb6fcfe8e534117ec6b8dc495355bf00c0012.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <math.h> #include <unistd.h> #undef CUDA_IFC4C_BENCH #ifdef _OPENMP #include <omp.h> #endif #ifdef __cplusplus extern "C" { #endif #include "integ/ofmo-integ.h" #include "integ/ofmo-ifc4c.h" extern FILE* fp_p...
a4ddb6fcfe8e534117ec6b8dc495355bf00c0012.cu
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <unistd.h> #undef CUDA_IFC4C_BENCH #ifdef _OPENMP #include <omp.h> #endif #ifdef __cplusplus extern "C" { #endif #include "integ/ofmo-integ.h" #include "integ/ofmo-ifc4c.h" extern FILE* fp_prof; // from common/ofmo-prof.h #ifdef __cplusplus } #endif...
616c8188b2a09adcc76503e32a499ddfb3d0b7c1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "yolov5_face_plugin.h" #include "stdio.h" #include <iostream> #include <cassert> #include <memory> #include<math.h> #ifndef CUDA_CHECK #define CUDA_CHECK(callstr) ...
616c8188b2a09adcc76503e32a499ddfb3d0b7c1.cu
#include "yolov5_face_plugin.h" #include "stdio.h" #include <iostream> #include <cassert> #include <memory> #include<math.h> #ifndef CUDA_CHECK #define CUDA_CHECK(callstr) \ { ...
360b3871a0f5c7ef46d7e9f7ef768e0a9e18c50a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #define DAWN_GENERATED 1 #undef DAWN_BACKEND_T #define DAWN_BACKEND_T CUDA #ifndef BOOST_RESULT_OF_USE_TR1 #define BOOST_RESULT_OF_USE_TR1 1 #endif #ifndef BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE 1 #endif #ifndef G...
360b3871a0f5c7ef46d7e9f7ef768e0a9e18c50a.cu
#define DAWN_GENERATED 1 #undef DAWN_BACKEND_T #define DAWN_BACKEND_T CUDA #ifndef BOOST_RESULT_OF_USE_TR1 #define BOOST_RESULT_OF_USE_TR1 1 #endif #ifndef BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE 1 #endif #ifndef GRIDTOOLS_DAWN_HALO_EXTENT #define GRIDTOOLS_DAWN_HALO_EXTENT 3 #endif #ifndef BOOST_PP_...
04a651341ece82d6cda53eb5e5f4617c1a8472ce.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 "childKernel.cu" #include<chrono> #include<iostream> using namesp...
04a651341ece82d6cda53eb5e5f4617c1a8472ce.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 "childKernel.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{24,2...
cacaaaf633989ab395904fb2c58377decd2da11f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "celllist.h" #include <mirheo/core/logger.h> #include <mirheo/core/pvs/object_vector.h> #include <mirheo/core/pvs/particle_vector.h> #include <mirheo/core/pvs/views/pv.h> #include <mirheo/core/utils/cuda_common.h> #include...
cacaaaf633989ab395904fb2c58377decd2da11f.cu
#include "celllist.h" #include <mirheo/core/logger.h> #include <mirheo/core/pvs/object_vector.h> #include <mirheo/core/pvs/particle_vector.h> #include <mirheo/core/pvs/views/pv.h> #include <mirheo/core/utils/cuda_common.h> #include <mirheo/core/utils/kernel_launch.h> #include <mirheo/core/utils/type_traits.h> #pragma...
fb6478d3a332d501fcd737be7e9e4883aa77333b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/AccumulateType.h> #include <ATen/div_rtn.h> #include <ATen/hip/HIPBlas.h> #include <ATen/hip/detail/KernelUtils.h> #i...
fb6478d3a332d501fcd737be7e9e4883aa77333b.cu
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/AccumulateType.h> #include <ATen/div_rtn.h> #include <ATen/cuda/CUDABlas.h> #include <ATen/cuda/detail/KernelUtils.h> #include <ATen/native/ConvUtils.h> #include <ATen/native/cuda/block_reduce.cuh> #includ...
74df0a894ab8da05665f34cc6f8f059fcb0471a5.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <math_functions.h> // CUDA's, not caffe's, for fabs, signbit #include <thrust/device_vector.h> #include <thrust/functional.h> // thrust::plus #include <thrust/reduce.h> #include <cmath> #include "caffe/common.hpp" #incl...
74df0a894ab8da05665f34cc6f8f059fcb0471a5.cu
#include <math_functions.h> // CUDA's, not caffe's, for fabs, signbit #include <thrust/device_vector.h> #include <thrust/functional.h> // thrust::plus #include <thrust/reduce.h> #include <cmath> #include "caffe/common.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <> void caffe_gpu_gemm<...
6eeb518a65fc00b8b6881ff23d18a0173e49fc63.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include<cuda_runtime.h> #include<sys/time.h> #include<stdint.h> #include<stdio.h> #define CHECK(call)\ {\ const hipError_t error = call;\ if(error != hipSuccess)\ {\ printf("Error: %s, %d\n", __FILE__, __LINE__);\ printf("...
6eeb518a65fc00b8b6881ff23d18a0173e49fc63.cu
#include<cuda_runtime.h> #include<sys/time.h> #include<stdint.h> #include<stdio.h> #define CHECK(call)\ {\ const cudaError_t error = call;\ if(error != cudaSuccess)\ {\ printf("Error: %s, %d\n", __FILE__, __LINE__);\ printf("Code: %d, reason: %s\n", error, cudaGetErrorString(error));\ exit(0);\ }\ }\ dou...
7a8d9b69bc0efdabd7ac39424d3bc3c6376c7870.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #ifndef _REDUCTION_KERNEL_H_ #define _REDUCTION_KERNEL_H_ #include <stdio.h> #include "reduction.h" __global__ void reduction_naive(float* d_odata, float* d_idata, int num_elements) { int idx = (blockIdx.y*gridDim.x+blockIdx....
7a8d9b69bc0efdabd7ac39424d3bc3c6376c7870.cu
#ifndef _REDUCTION_KERNEL_H_ #define _REDUCTION_KERNEL_H_ #include <stdio.h> #include "reduction.h" __global__ void reduction_naive(float* d_odata, float* d_idata, int num_elements) { int idx = (blockIdx.y*gridDim.x+blockIdx.x)*blockDim.x+threadIdx.x; d_odata[idx] = d_idata[idx]+d_idata[idx+num_elements/2]; } ...
019570d51d421876aaa13a62d54a29aaab986dcf.hip
// !!! This is a file automatically generated by hipify!!! #include "image-processing.h" //#if defined(_MSC_VER) && (_MSC_VER >= 1600) //#pragma execution_character_set("utf-8") //#endif //#include <iostream> //#include <cmath> //#include <limits.h> //#include <hip/hip_runtime.h> //#include <opencv2/opencv.hpp> /...
019570d51d421876aaa13a62d54a29aaab986dcf.cu
#include "image-processing.h" //#if defined(_MSC_VER) && (_MSC_VER >= 1600) //#pragma execution_character_set("utf-8") //#endif //#include <iostream> //#include <cmath> //#include <limits.h> //#include <cuda.h> //#include <opencv2/opencv.hpp> //using namespace cv; //using namespace std; //// cpu: 对图像进行缩放 //exter...
82f9b4afef03c169ad9ecb9141da398cc08b6e27.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <cfloat> #include <Render.h> #include <Hitable.h> #include <Material.h> #include <Objects/Sphere.h> __global__ void render_init(int max_x, int max_y, hiprandState_t *rand_state) { int i = threadIdx.x + blockIdx.x * block...
82f9b4afef03c169ad9ecb9141da398cc08b6e27.cu
#include <cfloat> #include <Render.h> #include <Hitable.h> #include <Material.h> #include <Objects/Sphere.h> __global__ void render_init(int max_x, int max_y, curandState *rand_state) { int i = threadIdx.x + blockIdx.x * blockDim.x; int j = threadIdx.y + blockIdx.y * blockDim.y; if((i >= max_x) || (j >= max_y)) re...
f373a999b01370dc58f28f55110d4a87104fca84.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <ATen/ATen.h> #include <ATen/ceil_div.h> #include <ATen/hip/Atomic.cuh> #include <ATen/hip/HIPContext.h> #include <ATen/hip/DeviceUtils.cuh> #include <ATen/TensorUtils.h> #include <ATen/NativeFunctions.h> #include <ATen/Ac...
f373a999b01370dc58f28f55110d4a87104fca84.cu
#include <ATen/ATen.h> #include <ATen/ceil_div.h> #include <ATen/cuda/Atomic.cuh> #include <ATen/cuda/CUDAContext.h> #include <ATen/cuda/DeviceUtils.cuh> #include <ATen/TensorUtils.h> #include <ATen/NativeFunctions.h> #include <ATen/AccumulateType.h> #include <ATen/cuda/cub.cuh> #include <ATen/native/cuda/SortingComm...
48e7aee58abcf7d8fe1425348b72493b7b473472.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Indexing: idx = pixel/voxel index in cartesian coordinates cidx = center index in cartesian coordinates linear_idx = pixel/voxel index in flat array linear_cidx = center index in flat array Center Stride: c_stride = number_of_f...
48e7aee58abcf7d8fe1425348b72493b7b473472.cu
/* Indexing: idx = pixel/voxel index in cartesian coordinates cidx = center index in cartesian coordinates linear_idx = pixel/voxel index in flat array linear_cidx = center index in flat array Center Stride: c_stride = number_of_features + image_dimention center_addr = linear_cidx * c_stride Image Stride: z_stride =...
2cf7582314423d6d72062862d337dc65738054eb.hip
// !!! This is a file automatically generated by hipify!!! #include <ATen/ATen.h> #include <ATen/AccumulateType.h> #include <ATen/NativeFunctions.h> #include <ATen/TensorUtils.h> #include <ATen/Utils.h> #include <ATen/hip/HIPBlas.h> #include <ATen/hip/HIPContext.h> #include <ATen/hip/HIPApplyUtils.cuh> #include <ATen...
2cf7582314423d6d72062862d337dc65738054eb.cu
#include <ATen/ATen.h> #include <ATen/AccumulateType.h> #include <ATen/NativeFunctions.h> #include <ATen/TensorUtils.h> #include <ATen/Utils.h> #include <ATen/cuda/CUDABlas.h> #include <ATen/cuda/CUDAContext.h> #include <ATen/cuda/CUDAApplyUtils.cuh> #include <ATen/native/cuda/vol2col.cuh> namespace at { namespace n...
e2c95a74753ca7822273fde508bc4f5b2d41b70f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <iomanip> #include <hiprand/hiprand_kernel.h> #define RUNS_PER_THREAD 1000000 #include <time.h> #include <sys/time.h> #ifdef __MACH__ #include <mach/clock.h> #include <mach/mach.h> #endif __host__ tim...
e2c95a74753ca7822273fde508bc4f5b2d41b70f.cu
#include <stdio.h> #include <iomanip> #include <curand_kernel.h> #define RUNS_PER_THREAD 1000000 #include <time.h> #include <sys/time.h> #ifdef __MACH__ #include <mach/clock.h> #include <mach/mach.h> #endif __host__ timespec GetTime(); __host__ double InSeconds(const timespec ts); __global__ void ThrowDice(const l...
79e552684c484862085970dff0468fba2a035997.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" //===---- reduction.cu - NVPTX OpenMP reduction implementation ---- CUDA //-*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // ...
79e552684c484862085970dff0468fba2a035997.cu
//===---- reduction.cu - NVPTX OpenMP reduction implementation ---- CUDA //-*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===------------------------...
d7c931e29e27e9554a2b5f760f996015af74b493.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) 2020-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 ...
d7c931e29e27e9554a2b5f760f996015af74b493.cu
/* * Copyright (c) 2020-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...
0e402a40c94c4826c1fee0655baa8ee527b54e49.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> #include <cstdio> __global__ void helloFromGPU(void) { printf("Hello from GPU - block: %d - thread: %d. \n", blockIdx.x, threadIdx.x); } int main() { std::cout << "Hello from CPU. " << std::endl; ...
0e402a40c94c4826c1fee0655baa8ee527b54e49.cu
#include <iostream> #include <cstdio> __global__ void helloFromGPU(void) { printf("Hello from GPU - block: %d - thread: %d. \n", blockIdx.x, threadIdx.x); } int main() { std::cout << "Hello from CPU. " << std::endl; helloFromGPU<<<2, 5>>>(); //cudaDeviceReset(); cudaDeviceSynchronize(); re...
b1389e84e39efc89e957b0acdae7c1d57b8f1b55.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/NumericUtils.h> #include <ATen/core/Tensor.h> #include <ATen/hip/HIPContext.h> #include <ATen/native/Resize.h> #in...
b1389e84e39efc89e957b0acdae7c1d57b8f1b55.cu
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/NumericUtils.h> #include <ATen/core/Tensor.h> #include <ATen/cuda/CUDAContext.h> #include <ATen/native/Resize.h> #include <ATen/cuda/Atomic.cuh> #include <ATen/cuda/CUDAApplyUtils.cuh> #ifndef AT_PER_O...
07f06996dbda1a177ac98b9b98e93af6ccd6884c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" //------------------------------------------------------------------------------ // Solver.cu //------------------------------------------------------------------------------ #include "Solver.h" //----------------------------------...
07f06996dbda1a177ac98b9b98e93af6ccd6884c.cu
//------------------------------------------------------------------------------ // Solver.cu //------------------------------------------------------------------------------ #include "Solver.h" //------------------------------------------------------------------------------ //========================================...
2cd5b2b0eef24104de77f6d6943a3af1c8b8314e.hip
// !!! This is a file automatically generated by hipify!!! #include <bits/stdc++.h> #include <hip/hip_runtime.h> using namespace std; #define CEIL(a,b) ((a-1)/b+1) #define N 1024 __global__ void Sum(float* d_a,float* d_b,float* d_c,int r,int c) { int x=blockIdx.x*blockDim.x + threadIdx.x; int y=blockIdx.y*bl...
2cd5b2b0eef24104de77f6d6943a3af1c8b8314e.cu
#include <bits/stdc++.h> #include <cuda.h> using namespace std; #define CEIL(a,b) ((a-1)/b+1) #define N 1024 __global__ void Sum(float* d_a,float* d_b,float* d_c,int r,int c) { int x=blockIdx.x*blockDim.x + threadIdx.x; int y=blockIdx.y*blockDim.y + threadIdx.y; int index=c*y+x; if(x<c && y<r) ...
c8b0e72ffe6ac4fd4702607a9b296caa289a3869.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include "repeat.h" #define DECLS(N) \ __global__ void kicache_line_##N##_0 (unsigned int *ts, unsigned int* out, int p1, int p2, int its); \ __global__ void kicache_line_##N##_1 (unsigned int *ts, unsigned int*...
c8b0e72ffe6ac4fd4702607a9b296caa289a3869.cu
#include <stdio.h> #include "repeat.h" #define DECLS(N) \ __global__ void kicache_line_##N##_0 (unsigned int *ts, unsigned int* out, int p1, int p2, int its); \ __global__ void kicache_line_##N##_1 (unsigned int *ts, unsigned int* out, int p1, int p2, int its); \ __global__ void kicache_line_##N##_2 (unsigned int *ts...
a8692ce65179e87e6412883db0713b970a906ccd.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Copyright 2019-2020 CERN and copyright holders of ALICE O2. // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. // All rights not expressly granted are reserved. // // This software is distributed ...
a8692ce65179e87e6412883db0713b970a906ccd.cu
// Copyright 2019-2020 CERN and copyright holders of ALICE O2. // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. // All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim...
81f9cf9b2108849a29b77f163ed10d95f85e2fae.hip
// !!! This is a file automatically generated by hipify!!! #include <iostream> #include <hip/hip_runtime.h> #include "matmul.cuh" using namespace std; int main(int argc, char** argv){ float *A, *B, *C; unsigned int n = atoi(argv[1]); unsigned int nthreads_perblock = atoi(argv[2]); hipMallocManaged((void **)&A, n...
81f9cf9b2108849a29b77f163ed10d95f85e2fae.cu
#include <iostream> #include <cuda.h> #include "matmul.cuh" using namespace std; int main(int argc, char** argv){ float *A, *B, *C; unsigned int n = atoi(argv[1]); unsigned int nthreads_perblock = atoi(argv[2]); cudaMallocManaged((void **)&A, n*n*sizeof(float)); cudaMallocManaged((void **)&B, n*n*sizeof(float))...
bfea4784fc762db9c4cc954f7943644f0e0e3de8.hip
// !!! This is a file automatically generated by hipify!!! #include <math.h> #include <stdio.h> #include <stdlib.h> #include "timer.h" #include "check.h" #include <hip/hip_runtime.h> #define SOFTENING 1e-9f #define BLOCK_SIZE 32 #define BLOCK_STRIDE 32 typedef struct { float x, y, z, vx, vy, vz; } Body; void ran...
bfea4784fc762db9c4cc954f7943644f0e0e3de8.cu
#include <math.h> #include <stdio.h> #include <stdlib.h> #include "timer.h" #include "check.h" #include <cuda_runtime.h> #define SOFTENING 1e-9f #define BLOCK_SIZE 32 #define BLOCK_STRIDE 32 typedef struct { float x, y, z, vx, vy, vz; } Body; void randomizeBodies(float *data, int n) { for (int i = 0; i < n; ...
9cf0faa4bc886d47cabfb5410165d8897bc37e15.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /** * thunderstruck/tracker: HaarFeatureCalculatorImpl.cu */ #include "HaarFeatureCalculatorImpl.h" #include "cudaApi.cuh" namespace thunderstruck { //#################### CUDA KERNELS #################### __global__ void ck_c...
9cf0faa4bc886d47cabfb5410165d8897bc37e15.cu
/** * thunderstruck/tracker: HaarFeatureCalculatorImpl.cu */ #include "HaarFeatureCalculatorImpl.h" #include "cudaApi.cuh" namespace thunderstruck { //#################### CUDA KERNELS #################### __global__ void ck_calculate_haar_features(cudaTextureObject_t integralFrame, ...
d53ea21a1d31995d12c7b07df356f4527f48b25c.hip
// !!! This is a file automatically generated by hipify!!! //PND #define X 1 //RN #define Y 10 //membrane potential increase per neurotransmitter #define Z 100 //CD #define C 10 //MPD #define D 5 #include <hip/hip_runtime.h> #include "menu.h" using namespace std; /* void check_preNeuron(){ } */ void gen_neuron(i...
d53ea21a1d31995d12c7b07df356f4527f48b25c.cu
//PND #define X 1 //RN #define Y 10 //membrane potential increase per neurotransmitter #define Z 100 //CD #define C 10 //MPD #define D 5 #include <cuda_runtime.h> #include "menu.h" using namespace std; /* void check_preNeuron(){ } */ void gen_neuron(int i){ neuronTag *collect = NULL; collect = new neuron...
4e0d34c7eecf9ecac7437f0cb9ed2739f65fc429.hip
// !!! This is a file automatically generated by hipify!!! /* * 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/li...
4e0d34c7eecf9ecac7437f0cb9ed2739f65fc429.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 ...
1df403d66921595d36a21a4119c5d7c00cfd3e5d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <math_constants.h> #include "BC.h" /** * Calculates the next finite difference step given a * grid point and step lengths. * * @param curr Pointer to the grid point that should be updated. * @param width Number of g...
1df403d66921595d36a21a4119c5d7c00cfd3e5d.cu
#include <math_constants.h> #include "BC.h" /** * Calculates the next finite difference step given a * grid point and step lengths. * * @param curr Pointer to the grid point that should be updated. * @param width Number of grid points in the x dimension. * @param xcfl Courant number for x dimension. * @param ...
8d61800ba718eeb88852305336a8a024b74ff839.hip
// !!! This is a file automatically generated by hipify!!! extern "C" { #include "../shape/head.h" } //__host__ void copy_par_to_device(struct par_t *hpar) //{ // /* NOTE: The double pointer dev_par_fpntr contains pointers that point to // * host memory. This won't work. Fix later. Though kernel // * debu...
8d61800ba718eeb88852305336a8a024b74ff839.cu
extern "C" { #include "../shape/head.h" } //__host__ void copy_par_to_device(struct par_t *hpar) //{ // /* NOTE: The double pointer dev_par_fpntr contains pointers that point to // * host memory. This won't work. Fix later. Though kernel // * debugging shows dev_par_fpartype = 105.6... // */ // int size_...
d9b8347562da86490e33ce8ecd419bf87d43d8c6.hip
// !!! This is a file automatically generated by hipify!!! #include<iostream> #include"../cuda_note.h" int main(){ int dev_count = 0; hipError_t err = hipGetDeviceCount(&dev_count); if (err == hipSuccess) { platformInfo(&dev_count); } return 0; }
d9b8347562da86490e33ce8ecd419bf87d43d8c6.cu
#include<iostream> #include"../cuda_note.h" int main(){ int dev_count = 0; cudaError_t err = cudaGetDeviceCount(&dev_count); if (err == cudaSuccess) { platformInfo(&dev_count); } return 0; }
38ed3af8664964a1518df78092420f0daac044ef.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 #define ERROR_ONLY_FP_TYPES(func) \ THError("%s for CUDA tensors only supports floating-point types. Try converting the tensors with .float()"...
38ed3af8664964a1518df78092420f0daac044ef.cu
#ifndef THC_GENERIC_FILE #define THC_GENERIC_FILE "generic/THCTensorMathBlas.cu" #else #define ERROR_ONLY_FP_TYPES(func) \ THError("%s for CUDA tensors only supports floating-point types. Try converting the tensors with .float()", func); THC_API accreal THCTensor_(dot)(THCState *state, THCTensor *self, THCTensor *s...
1739495815b747fe202f0b0605684f6011156b7b.hip
// !!! This is a file automatically generated by hipify!!! /************************************************************************* * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the ...
1739495815b747fe202f0b0605684f6011156b7b.cu
/************************************************************************* * Copyright (c) 2015, 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 s...
a9fc7cde0bdf7ec8d158630959e0d6a91808ad81.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> #include <stdio.h> #include <unistd.h> #include <sys/mman.h> #include <sys/types.h> #include <sys/stat.h> #include <assert.h> #include <fcntl.h> #include <errno.h> #include <vector> #include <time.h> #include <sy...
a9fc7cde0bdf7ec8d158630959e0d6a91808ad81.cu
#include <iostream> #include <stdio.h> #include <unistd.h> #include <sys/mman.h> #include <sys/types.h> #include <sys/stat.h> #include <assert.h> #include <fcntl.h> #include <errno.h> #include <vector> #include <time.h> #include <sys/time.h> using std::cout; using std::cerr; using std::endl; using std::cin; using std:...
6263ecfb208dfd3dcb1428261bf6474b3bc6bc19.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <ATen/ATen.h> #include <ATen/hip/HIPContext.h> #include <ATen/TensorUtils.h> #include <ATen/NativeFunctions.h> #include <ATen/WrapDimUtils.h> #include <THH/THHTensorMathReduce.cuh> #include <THH/THHTensorSort.cuh> #include ...
6263ecfb208dfd3dcb1428261bf6474b3bc6bc19.cu
#include <ATen/ATen.h> #include <ATen/cuda/CUDAContext.h> #include <ATen/TensorUtils.h> #include <ATen/NativeFunctions.h> #include <ATen/WrapDimUtils.h> #include <THC/THCTensorMathReduce.cuh> #include <THC/THCTensorSort.cuh> #include <THC/THCThrustAllocator.cuh> #include <ATen/AccumulateType.h> #include <ATen/cuda/Num...
ef6f9cbef82006e8eca7beaf43e9967843c58a6f.hip
// !!! This is a file automatically generated by hipify!!! /******************************************************************************* * 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 availab...
ef6f9cbef82006e8eca7beaf43e9967843c58a6f.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. * *...
0703f0d2eb4c63c32ef109c343673dc5dd5a0d48.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "bvh.h" #include "primitive.h" #include "../watch.h" #include <iostream> #include <fstream> #include <algorithm> #include <bitset> #include <thrust/sort.h> #include <thrust/execution_policy.h> #include "../Utilities.h" #in...
0703f0d2eb4c63c32ef109c343673dc5dd5a0d48.cu
#include "bvh.h" #include "primitive.h" #include "../watch.h" #include <iostream> #include <fstream> #include <algorithm> #include <bitset> #include <thrust/sort.h> #include <thrust/execution_policy.h> #include "../Utilities.h" #include "../common.h" using namespace std; extern inline void copyFromCPUtoGPU(void** dst...
b28dceffb2a5f314dd1c860f55aae09c5dea12c0.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> #include "CNNConvLayer.h" using namespace std; // This is the CPU version, please don't modify it void convLayerCPU() { // declarations for bunch of indexing parameters int fn, sli, fmy, fmx, y, x; int ifmy, ...
b28dceffb2a5f314dd1c860f55aae09c5dea12c0.cu
#include <iostream> #include "CNNConvLayer.h" using namespace std; // This is the CPU version, please don't modify it void convLayerCPU() { // declarations for bunch of indexing parameters int fn, sli, fmy, fmx, y, x; int ifmy, ifmx, ofmy, ofmx; int filtIdx, inNeuIdx, outNeuIdx, outIdx; int filtVol = FMDEPTH * ...
bb639beab12dcc69e7925886d6f73a139e5ea3db.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "CombineLayer.h" #include <vector> #include <helper_functions.h> #include <helper_cuda.h> #include <math.h> #include "../common/Config.h" #include "../common/cuBase.h" /* * dim3 block = dim3(batch, inputsSkip->getLen());...
bb639beab12dcc69e7925886d6f73a139e5ea3db.cu
#include "CombineLayer.h" #include <vector> #include <helper_functions.h> #include <helper_cuda.h> #include <math.h> #include "../common/Config.h" #include "../common/cuBase.h" /* * dim3 block = dim3(batch, inputsSkip->getLen()); * dim3 thread= dim3(min(preDelta[0]->getLen() / batch, 1024)); */ __global__ void g_C...
36578304dc06c3714c758b0d27aa5707110aef9a.hip
// !!! This is a file automatically generated by hipify!!! /** * Copyright 1993-2012 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,...
36578304dc06c3714c758b0d27aa5707110aef9a.cu
/** * Copyright 1993-2012 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 relate...
0fad5be07728c27a81b8adaeaeeb200b4e3023b2.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> // Standard C/C++ Directives #include <iostream> #include <conio.h> // OpenCV directives #include <highgui\highgui.hpp> using namespace std; using namespace cv; hipEr...
0fad5be07728c27a81b8adaeaeeb200b4e3023b2.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> // Standard C/C++ Directives #include <iostream> #include <conio.h> // OpenCV directives #include <highgui\highgui.hpp> using namespace std; using namespace cv; cudaError_t transposeRGBImageOnGPU(Mat *input, Mat *transpose); __...
541f23c087b7d5bf99bab2bd7fa55b75a7330297.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> __global__ void kernel(int* a_d, int* b_d, int* c_d){ *c_d = *a_d + *b_d; return; } int main(){ int a = 1, b = 2; int *a_d, *b_d, *c_d; hipMalloc((void**) &a_d, sizeof(int)); hipMalloc((void**) &b_d,...
541f23c087b7d5bf99bab2bd7fa55b75a7330297.cu
#include <stdio.h> __global__ void kernel(int* a_d, int* b_d, int* c_d){ *c_d = *a_d + *b_d; return; } int main(){ int a = 1, b = 2; int *a_d, *b_d, *c_d; cudaMalloc((void**) &a_d, sizeof(int)); cudaMalloc((void**) &b_d, sizeof(int)); cudaMalloc((void**) &c_d, sizeof(int)); cudaMemcpy(a_d, &a, sizeof...
db2a2e58a28f3e7626ce85fab20056fb0a93ba21.hip
// !!! This is a file automatically generated by hipify!!! //adding two arrays and storing the results in a third array using CUDA #include <stdio.h> #include <stdlib.h> #include <hip/hip_runtime.h> __global__ void add(int *a, int *b, int *c, int Num) { // int idx = threadIdx.x; // for a grid with ...
db2a2e58a28f3e7626ce85fab20056fb0a93ba21.cu
//adding two arrays and storing the results in a third array using CUDA #include <stdio.h> #include <stdlib.h> #include <cuda_runtime.h> __global__ void add(int *a, int *b, int *c, int Num) { // int idx = threadIdx.x; // for a grid with one block of threads int idx = threadIdx.x + blockIdx.x * bl...
5d96fdd6f7cbba92e57b0bc7c96b9e41e1dd1af8.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include "hip/hip_runtime.h" #include "hip/hip_runtime.h" #include "device_launch_parameters.h" __global__ void reduction_unroll_block2(int * arr, int * temp, int l) { int tid = threadIdx.x; ...
5d96fdd6f7cbba92e57b0bc7c96b9e41e1dd1af8.cu
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include "cuda.h" #include "cuda_runtime.h" #include "device_launch_parameters.h" __global__ void reduction_unroll_block2(int * arr, int * temp, int l) { int tid = threadIdx.x; int BLOCK_OFFSET = blockIdx.x * blockDim.x * 2; int index = BLOCK_OF...
2dd2520199df6332e8609a69244e47fe991b4f58.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void kAddDiagonal(float* mat, float* vec, float* tgtMat, unsigned int width) { const unsigned int idx = blockIdx.x * blockDim.x + threadIdx.x; const unsigned int numThreads = blockDim.x * gridDim.x; ...
2dd2520199df6332e8609a69244e47fe991b4f58.cu
#include "includes.h" __global__ void kAddDiagonal(float* mat, float* vec, float* tgtMat, unsigned int width) { const unsigned int idx = blockIdx.x * blockDim.x + threadIdx.x; const unsigned int numThreads = blockDim.x * gridDim.x; for (unsigned int i = idx; i < width; i += numThreads) { tgtMat[width*i + i] = mat[widt...
cf6eb5fa6f933fdcc7ca1ab8d4f89dbca40dda82.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /************************************************************** Lokman A. Abbas-Turki code reused by Ly Yannick and Prugniaud Melchior for GPU Programming course of ENSAE 2020 Those who re-use this code should mention in their cod...
cf6eb5fa6f933fdcc7ca1ab8d4f89dbca40dda82.cu
/************************************************************** Lokman A. Abbas-Turki code reused by Ly Yannick and Prugniaud Melchior for GPU Programming course of ENSAE 2020 Those who re-use this code should mention in their code the name of the author above. *******************************************************...
1c928009ae91c7ca7891dda9610e594789ee40c2.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <ATen/ATen.h> #include <ATen/AccumulateType.h> #include <ATen/hip/HIPApplyUtils.cuh> #include <ATen/hip/detail/IndexUtils.cuh> #include <ATen/hip/detail/TensorInfo.cuh> #include <hiprand/hiprand_kernel.h> #include <THH/THH...
1c928009ae91c7ca7891dda9610e594789ee40c2.cu
#include <ATen/ATen.h> #include <ATen/AccumulateType.h> #include <ATen/cuda/CUDAApplyUtils.cuh> #include <ATen/cuda/detail/IndexUtils.cuh> #include <ATen/cuda/detail/TensorInfo.cuh> #include <curand_kernel.h> #include <THC/THCGeneral.h> #include <THC/THCTensorRandom.h> #include <THC/THCGenerator.hpp> THCGenerator* T...
92f6ff4296e175544791428f1ba4909f710455d3.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <thrust\device_vector.h> #include <thrust\host_vector.h> #include <stdio.h> #include <iostream> using namespace std; const int N = 3; __global__ void add(int *a, int N) { int i...
92f6ff4296e175544791428f1ba4909f710455d3.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <thrust\device_vector.h> #include <thrust\host_vector.h> #include <stdio.h> #include <iostream> using namespace std; const int N = 3; __global__ void add(int *a, int N) { int i = blockDim.x*blockIdx.x + threadIdx.x; if (i < N) { ...