hip_filename stringlengths 5 84 | hip_content stringlengths 79 9.69M | cuda_filename stringlengths 4 83 | cuda_content stringlengths 19 9.69M |
|---|---|---|---|
85a6a66f1232e242956965f26e967fd2ba959e78.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void total(float *input, float *output, int len){
__shared__ float partialSum[2*BLOCK_SIZE];
unsigned int t=threadIdx.x,start=2*blockIdx.x*BLOCK_SIZE;
if(start+t<len) partialSum[t] = input[start+t];... | 85a6a66f1232e242956965f26e967fd2ba959e78.cu | #include "includes.h"
__global__ void total(float *input, float *output, int len){
__shared__ float partialSum[2*BLOCK_SIZE];
unsigned int t=threadIdx.x,start=2*blockIdx.x*BLOCK_SIZE;
if(start+t<len) partialSum[t] = input[start+t];
else partialSum[t]=0;
__syncthreads();
if(start+BLOCK_SIZE+t<len)partialSum[BLOCK_SIZE... |
45977b329f8cb3d1b4c1923c2354a0701510dd65.hip | // !!! This is a file automatically generated by hipify!!!
#include "stdafx.h" //
#include "CUDAdll.cuh" //
#include <math.h>
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <hip/device_functions.h>
//CUDA
extern int count = 0;
bool InitCUDA(void)//CUDA
{
printf("Start to detecte d... | 45977b329f8cb3d1b4c1923c2354a0701510dd65.cu |
#include "stdafx.h" //引入预编译头文件
#include "CUDAdll.cuh" //引入导出函数声明头文件
#include <math.h>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <device_functions.h>
//初始化CUDA
extern int count = 0;
bool InitCUDA(void)//CUDA初始化函数
{
printf("Start to detecte devices.........\n");//显示检测到的设备数
cuda... |
2ec860bfc1d299f44d7319b12c791ecdddca603f.hip | // !!! This is a file automatically generated by hipify!!!
#include <unistd.h>
#include <string.h>
#include <helper_functions.h> // helper functions for string parsing
#include <helper_cuda.h>
#include "elastic_kernel.h"
#include "BS/BS.h"
#include "VA/VA.h"
#include "MM/MM.h"
//#include "RSC/RSC.h"
#include "SPMV... | 2ec860bfc1d299f44d7319b12c791ecdddca603f.cu | #include <unistd.h>
#include <string.h>
#include <helper_functions.h> // helper functions for string parsing
#include <helper_cuda.h>
#include "elastic_kernel.h"
#include "BS/BS.h"
#include "VA/VA.h"
#include "MM/MM.h"
//#include "RSC/RSC.h"
#include "SPMV/SPMV.h"
#include "PF/PF.h"
#include "Reduction/reduction.h... |
050de765558c26b3add4ad766225579b8ef5b316.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 "psamask_collect_backward_cuda.cu"
#include<chrono>
#include<iost... | 050de765558c26b3add4ad766225579b8ef5b316.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 "psamask_collect_backward_cuda.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{... |
7f4ec9475160ffef37b61cc296b738de840e4906.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include<iostream>
#include <hip/hip_runtime.h>
#include <time.h>
#include <sys/time.h>
using namespace std;
//## KERNEL FOR VECTOR ADDITION IN 1 THREAD ##//
extern double mysecond();
void init_array(float *a, const int N);
void init_mat(f... | 7f4ec9475160ffef37b61cc296b738de840e4906.cu | #include <stdio.h>
#include<iostream>
#include <cuda.h>
#include <time.h>
#include <sys/time.h>
using namespace std;
//## KERNEL FOR VECTOR ADDITION IN 1 THREAD ##//
extern double mysecond();
void init_array(float *a, const int N);
void init_mat(float *a, const int N, const int M);
void print_array(float *a, const i... |
b481764df3ca5cdd30e75a7ecb769db82671481b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <iostream>
#include <math.h>
using namespace std;
__global__ void add(int n, float* x, float* y){ //__global__ establishes device to managed by CUDA
for (int i = 0; i < n; i++) {
y[i] = x[i] + y[i];
}
}
i... | b481764df3ca5cdd30e75a7ecb769db82671481b.cu | #include <iostream>
#include <math.h>
using namespace std;
__global__ void add(int n, float* x, float* y){ //__global__ establishes device to managed by CUDA
for (int i = 0; i < n; i++) {
y[i] = x[i] + y[i];
}
}
int main()
{
int N = 1 << 20;
float*x, *y;
cudaMallocManaged(&x, N * sizeof(... |
d0cc7ce5d748205041042f23afe8b3e09dd24238.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#define SIZE (100*1024*1024)
__global__ void histo_kernel( unsigned char *buffer,
long size,
unsigned int *histo ) {
// chaque thread initialise u... | d0cc7ce5d748205041042f23afe8b3e09dd24238.cu | #include <stdio.h>
#define SIZE (100*1024*1024)
__global__ void histo_kernel( unsigned char *buffer,
long size,
unsigned int *histo ) {
// chaque thread initialise une case du tableau
__shared__ unsigned int temp[256];
temp[threadIdx.x] = 0;
... |
517dda175630cdeee1b3097c81963c51d8f0a7d6.hip | // !!! This is a file automatically generated by hipify!!!
#include "device_launch_parameters.h"
#include "hip/device_functions.h"
#include "stdio.h"
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <math.h>
__forceinline__ __device__ float clipp(float in, float low, float high)
{
retur... | 517dda175630cdeee1b3097c81963c51d8f0a7d6.cu | #include "device_launch_parameters.h"
#include "device_functions.h"
#include "stdio.h"
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <math.h>
__forceinline__ __device__ float clipp(float in, float low, float high)
{
return (in < low) ? low : (in > high ? high : in);
}
__global__ void c... |
782b9be9d6e54cfe5f73ee1d5cb9963e3bc85f3e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// /usr/local/cuda/bin/nvcc task1.cu -o task1
// nvcc task1.cu -o task1
//./task1
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__ void solver(double *T_new, const double *T_old, int cols, int rows)
{
int ... | 782b9be9d6e54cfe5f73ee1d5cb9963e3bc85f3e.cu | // /usr/local/cuda/bin/nvcc task1.cu -o task1
// nvcc task1.cu -o task1
//./task1
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__ void solver(double *T_new, const double *T_old, int cols, int rows)
{
int col = blockIdx.x * blockDim.x + threadIdx.x;
int row = blockIdx.y * blockDim.y + thr... |
efa1104d43c22162de93de809432880547ea9f97.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdlib.h>
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <math.h>
#include <time.h>
#include <hiprand/hiprand_kernel.h>
#define TRIALS_PER_THREAD 1024
#define BLOCKS 256
#define THREADS 256
__global__ void gpuPiCalculate(float *estimate, ... | efa1104d43c22162de93de809432880547ea9f97.cu | #include <stdlib.h>
#include <stdio.h>
#include <cuda.h>
#include <math.h>
#include <time.h>
#include <curand_kernel.h>
#define TRIALS_PER_THREAD 1024
#define BLOCKS 256
#define THREADS 256
__global__ void gpuPiCalculate(float *estimate, curandState *states) {
unsigned long id = threadIdx.x + blockDim.x * blockIdx.... |
ee52b32da40fa870988a19de4a34b4772c79e0ed.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/**
Jacob Sword
Parallelized multiplication of matrix and matrix of random values given fixed matrix dimensions
Comparisons in speed between regular block by block mult, using padding to combat unalignment,
and using mtrix t... | ee52b32da40fa870988a19de4a34b4772c79e0ed.cu | /**
Jacob Sword
Parallelized multiplication of matrix and matrix of random values given fixed matrix dimensions
Comparisons in speed between regular block by block mult, using padding to combat unalignment,
and using mtrix transpose to combat strided memory access.
Matrix dimensions are (256 rows by 240 cols)... |
dc93fc9c327cf6364586d2351fcd0115c6129cf0.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <vector>
#include <limits>
#include <tuple>
#include <iostream>
#include <cmath>
#include "libalg/basic_operations.hpp"
#include "libalg/alg.hpp"
#include "libalg/CPUMatrix.hpp"
#include "libalg/CPUView.hpp"
#include "liba... | dc93fc9c327cf6364586d2351fcd0115c6129cf0.cu | #include <vector>
#include <limits>
#include <tuple>
#include <iostream>
#include <cmath>
#include "libalg/basic_operations.hpp"
#include "libalg/alg.hpp"
#include "libalg/CPUMatrix.hpp"
#include "libalg/CPUView.hpp"
#include "libalg/broadcasting.hpp"
#include "error.hpp"
#include "cpu/tuple.hpp"
#include "gpu/icp.cu... |
b789e9b9350ef889a8c3082034009d4e5e6b69fa.hip | // !!! This is a file automatically generated by hipify!!!
// Copyright 2011, Tokyo Institute of Technology.
// All rights reserved.
//
// This file is distributed under the license described in
// LICENSE.txt.
//
// Author: Naoya Maruyama (naoya@matsulab.is.titech.ac.jp)
#include "runtime/buffer_cuda.h"
#include <hi... | b789e9b9350ef889a8c3082034009d4e5e6b69fa.cu | // Copyright 2011, Tokyo Institute of Technology.
// All rights reserved.
//
// This file is distributed under the license described in
// LICENSE.txt.
//
// Author: Naoya Maruyama (naoya@matsulab.is.titech.ac.jp)
#include "runtime/buffer_cuda.h"
#include <cuda_runtime.h>
#include <cutil.h>
#define CUDA_MEMCPY_ASYNC... |
bfa1aa1e502c3f05d7329c1f8847a169fc51c3ed.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*!
* Copyright 2017-2021 by Contributors
*/
#include <thrust/copy.h>
#include <thrust/device_ptr.h>
#include <thrust/device_vector.h>
#include <thrust/fill.h>
#include <thrust/host_vector.h>
#include <GPUTreeShap/gpu_treeshap.h>
... | bfa1aa1e502c3f05d7329c1f8847a169fc51c3ed.cu | /*!
* Copyright 2017-2021 by Contributors
*/
#include <thrust/copy.h>
#include <thrust/device_ptr.h>
#include <thrust/device_vector.h>
#include <thrust/fill.h>
#include <thrust/host_vector.h>
#include <GPUTreeShap/gpu_treeshap.h>
#include <memory>
#include "xgboost/data.h"
#include "xgboost/predictor.h"
#include "xg... |
8e63e907520806d7a9fe3d4bc362f84737a63700.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Copyright (c) 2009-2016 The Regents of the University of Michigan
// This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.
#include "hoomd/VectorMath.h"
#include "hoomd/Index1D.h"
#include "hoomd... | 8e63e907520806d7a9fe3d4bc362f84737a63700.cu | // Copyright (c) 2009-2016 The Regents of the University of Michigan
// This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.
#include "hoomd/VectorMath.h"
#include "hoomd/Index1D.h"
#include "hoomd/ParticleData.cuh"
// Maintainer: jglaser
/*! \file ForceComposite.cu
\brief Defin... |
8d5198ec252abbabcd161bff0ef7982dcdd0d746.hip | // !!! This is a file automatically generated by hipify!!!
#include <time.h>
#include <stdio.h>
#include <hip/hip_runtime_api.h>
__device__ int is_a_match(char *attempt) {
char password1[] = "AB1111";
char password2[] = "AB9999";
char password3[] = "AB6666";
char password4[] = "AB1966";
char *j = attempt;
... | 8d5198ec252abbabcd161bff0ef7982dcdd0d746.cu | #include <time.h>
#include <stdio.h>
#include <cuda_runtime_api.h>
__device__ int is_a_match(char *attempt) {
char password1[] = "AB1111";
char password2[] = "AB9999";
char password3[] = "AB6666";
char password4[] = "AB1966";
char *j = attempt;
char *e = attempt;
char *n = attempt;
char *i = attempt;
... |
d421d7297595b2ce0d18d175f711320088fd7ef6.hip | // !!! This is a file automatically generated by hipify!!!
// ----------------------------------------------------------------------------------------------------------------------------------------
/// @author Toby Gilbert
// ---------------------------------------------------------------------------------------------... | d421d7297595b2ce0d18d175f711320088fd7ef6.cu | // ----------------------------------------------------------------------------------------------------------------------------------------
/// @author Toby Gilbert
// ----------------------------------------------------------------------------------------------------------------------------------------
#include "Ocean... |
581aaca799d36b8827e39086c370be539a7ba072.hip | // !!! This is a file automatically generated by hipify!!!
/************************************************************************************
* Matrix * Matrix Multiplication
*
* The GPU is with an input of n = 512 faster than the GPU
******************************************************************************... | 581aaca799d36b8827e39086c370be539a7ba072.cu | /************************************************************************************
* Matrix * Matrix Multiplication
*
* The GPU is with an input of n = 512 faster than the GPU
************************************************************************************/
#include <cuda.h>
#include <cuda_runtime.h>
#inclu... |
96469d16a77566a0a37bf18a44793a1ada8503f1.hip | // !!! This is a file automatically generated by hipify!!!
// INCLUDES
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <errno.h> /* errno */
#include <string.h> /* strerror */
#include <math.h> // ceil
#include <time.h> // CLOCKS_PER_SEC
// CUDA
#include <hip/hip_runtime.h>
#incl... | 96469d16a77566a0a37bf18a44793a1ada8503f1.cu | // INCLUDES
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <errno.h> /* errno */
#include <string.h> /* strerror */
#include <math.h> // ceil
#include <time.h> // CLOCKS_PER_SEC
// CUDA
#include <cuda.h>
#include <cuda_runtime.h>
// GIS
#include "/home/giuliano/git/cuda/weather... |
af85b4b63016238e9bdc4c904d6e712e3e68353b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "pointwise_hist2.cuh"
#include "split_properties_helpers.cuh"
#include "compute_point_hist2_loop.cuh"
#include "pointwise_hist2_half_byte_template.cuh"
#include <hip/hip_cooperative_groups.h>
#include <library/cuda/wrappers... | af85b4b63016238e9bdc4c904d6e712e3e68353b.cu | #include "pointwise_hist2.cuh"
#include "split_properties_helpers.cuh"
#include "compute_point_hist2_loop.cuh"
#include "pointwise_hist2_half_byte_template.cuh"
#include <cooperative_groups.h>
#include <library/cuda/wrappers/arch.cuh>
#include <catboost/cuda/cuda_util/kernel/instructions.cuh>
#include <catboost/cuda/cu... |
7fd78c0bf25c6ca266c470afc1873ab186b61137.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//Rodolfo Martinez Guevara
// template provided for cuda quizz 3.
// remember to write your own comments in the code below.
#include <stdio.h>
#define N 9 //size of original matrix
#define K N/3 //size of compressed matrrix
#defi... | 7fd78c0bf25c6ca266c470afc1873ab186b61137.cu | //Rodolfo Martinez Guevara
// template provided for cuda quizz 3.
// remember to write your own comments in the code below.
#include <stdio.h>
#define N 9 //size of original matrix
#define K N/3 //size of compressed matrrix
#define ThreadsPerBlock 1 // choose wisely
#define NumBlocks N // choose wisely
__glob... |
72aa6184629ccbd4165a4523c2c732411216fe31.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void kernelFormBinStart ( int* devOutputBinStart, unsigned int* devInputBinCirPairBin, unsigned int bcPairLen)
{
__shared__ int cache[257]; //256 bcpair + the last bc pair in the previous block
in... | 72aa6184629ccbd4165a4523c2c732411216fe31.cu | #include "includes.h"
__global__ void kernelFormBinStart ( int* devOutputBinStart, unsigned int* devInputBinCirPairBin, unsigned int bcPairLen)
{
__shared__ int cache[257]; //256 bcpair + the last bc pair in the previous block
int bcPairIdx = blockDim.x * blockIdx.x + threadIdx.x;
if (bcPairIdx >= bcPairLen)
{
retu... |
7ab0638bd752910c4ba9a2eb6ef9d6e4b5e1cfb3.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
/*
* Refactor `loop` to be a CUDA Kernel. The new kernel should
* only do the work of 1 iteration of the original loop.
*/
__global__ void loop()
{
printf("This is iteration number %d\n", threadIdx.x);
}
i... | 7ab0638bd752910c4ba9a2eb6ef9d6e4b5e1cfb3.cu | #include <stdio.h>
/*
* Refactor `loop` to be a CUDA Kernel. The new kernel should
* only do the work of 1 iteration of the original loop.
*/
__global__ void loop()
{
printf("This is iteration number %d\n", threadIdx.x);
}
int main()
{
/*
* When refactoring `loop` to launch as a kernel, be sure
* to use... |
fb893774ac6398c23cfe487273a6c9432b160337.hip | // !!! This is a file automatically generated by hipify!!!
#include "funset.hpp"
#include <iostream>
#include <hip/hip_runtime.h> // For the CUDA runtime routines (prefixed with "cuda_")
#include <device_launch_parameters.h>
#include "common.hpp"
/* __global__: ;;,3.2
;void;,
;,
gridblock,(<<< >>>);
a kernel,(GPUCUD... | fb893774ac6398c23cfe487273a6c9432b160337.cu | #include "funset.hpp"
#include <iostream>
#include <cuda_runtime.h> // For the CUDA runtime routines (prefixed with "cuda_")
#include <device_launch_parameters.h>
#include "common.hpp"
/* __global__: 函数类型限定符;在设备上运行;在主机端调用,计算能力3.2及以上可以在
设备端调用;声明的函数的返回值必须是void类型;对此类型函数的调用是异步的,即在
设备完全完成它的运行之前就返回了;对此类型函数的调用必须指定执行配置,即用于在
设... |
c2efb3936d7a71ec8fc673b0c176114d9d098fb2.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <omp.h>
#include <math.h>
#include "jacobi_gpu.h"
#define u(i,j) U[(i)*N + (j)]
#define u_old(i,j) U_old[(i)*N + (j)]
#define u_old_e(i,j) U_old_e[(i)*N + (j)]
#define f(i,j) F[(i)*N + (j)]
__global__ ... | c2efb3936d7a71ec8fc673b0c176114d9d098fb2.cu | #include <stdio.h>
#include <omp.h>
#include <math.h>
#include "jacobi_gpu.h"
#define u(i,j) U[(i)*N + (j)]
#define u_old(i,j) U_old[(i)*N + (j)]
#define u_old_e(i,j) U_old_e[(i)*N + (j)]
#define f(i,j) F[(i)*N + (j)]
__global__ void jacobi_1(int N, double *U, double *U_old, int *F, double h, double delta_sq) {
... |
82fb95fc67e5350679af791f52d660b8cc6920af.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <assert.h>
#include <stdio.h>
#include "sru_kernel.h"
typedef float* __restrict__ cu_float;
__forceinline__ __device__ float sigmoidf(float x)
{
return 1.f / (1.f + expf(-x));
};
__forceinline__ __device__ float relu... | 82fb95fc67e5350679af791f52d660b8cc6920af.cu | #include <assert.h>
#include <stdio.h>
#include "sru_kernel.h"
typedef float* __restrict__ cu_float;
__forceinline__ __device__ float sigmoidf(float x)
{
return 1.f / (1.f + expf(-x));
};
__forceinline__ __device__ float reluf(float x)
{
return (x > 0.f) ? x : 0.f;
};
__global__ void sru_fwd_kernel(const cu... |
8eae302df648c6b8afd74ef48d346a4975244971.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <iostream>
__device__ int compute_layer(float tx, float ty, float radius) {
int x = int(std::abs(tx) / radius + 0.5);
int y = int(std::abs(ty) / radius + 0.5);
if (x == 1 && y == 1)
return 2;
int c ... | 8eae302df648c6b8afd74ef48d346a4975244971.cu | #include <iostream>
__device__ int compute_layer(float tx, float ty, float radius) {
int x = int(std::abs(tx) / radius + 0.5);
int y = int(std::abs(ty) / radius + 0.5);
if (x == 1 && y == 1)
return 2;
int c = 0;
if (x + y < 2)
c = x + y;
else
c = x + y + 1;
if (c > 5... |
070140c53b19e84d62ded635b150bea92cfbc3e3.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <type_traits>
#include <ATen/ATen.h>
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/native/DispatchStub.h>
#include <ATen/NestedTensorImpl.h>
#include <ATen/TensorAccessor.h>
#include <c10/util/... | 070140c53b19e84d62ded635b150bea92cfbc3e3.cu | #include <type_traits>
#include <ATen/ATen.h>
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/native/DispatchStub.h>
#include <ATen/NestedTensorImpl.h>
#include <ATen/TensorAccessor.h>
#include <c10/util/Logging.h>
#include <c10/util/bit_cast.h>
#include <ATen/cuda/CUDAContext.h>
#include <... |
1abe4adbfd4e615348ae194c5944cb48574f4ce5.hip | // !!! This is a file automatically generated by hipify!!!
// ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (M... | 1abe4adbfd4e615348ae194c5944cb48574f4ce5.cu | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018-2021 www.open3d.org
//
// Perm... |
a13446c04c445fa2db5e255a12d84cb9fd5189ff.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// GPU version of Matrix addition
#include <stdio.h>
#include <math.h>
const int N = 1024;
const int blocksize = (N>32)?32:N; //MAX threads per block = 1024 Sqrt(1024)=32
__global__
void add_matrix(float *a, float *b, f... | a13446c04c445fa2db5e255a12d84cb9fd5189ff.cu | // GPU version of Matrix addition
#include <stdio.h>
#include <math.h>
const int N = 1024;
const int blocksize = (N>32)?32:N; //MAX threads per block = 1024 Sqrt(1024)=32
__global__
void add_matrix(float *a, float *b, float *c, int N, int gridsize)
{
int idx = blockIdx.x * blockDim.x + threadIdx.x;
int... |
88543d317b9084df71ab30784041d4e33787db81.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <ATen/ATen.h>
#include <ATen/NumericUtils.h>
#include <ATen/native/Resize.h>
#include <ATen/hip/Atomic.cuh>
#include <ATen/hip/HIPContext.h>
#include <ATen/hip/HIPApplyUtils.cuh>
namespace at {
namespace cuda {
#define THR... | 88543d317b9084df71ab30784041d4e33787db81.cu | #include <ATen/ATen.h>
#include <ATen/NumericUtils.h>
#include <ATen/native/Resize.h>
#include <ATen/cuda/Atomic.cuh>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/CUDAApplyUtils.cuh>
namespace at {
namespace cuda {
#define THRESH_NUMBER_BINS_FOR_MULTI_BLOCK_MEM 100
#define THRESH_NUMBER_BINS_FOR_GLOBAL_MEM 1... |
abe2d0b262bb9a8410b19410f8eb48ff742a354e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/***********************************************************/
/** \file
\brief update voxel block (integrate)
\details
\author Yizhong Zhang
\date 12/9/2013
*/
/***********************************************************/
#i... | abe2d0b262bb9a8410b19410f8eb48ff742a354e.cu | /***********************************************************/
/** \file
\brief update voxel block (integrate)
\details
\author Yizhong Zhang
\date 12/9/2013
*/
/***********************************************************/
#include "device_utils.h"
#include "voxel_hashing_device.h"
#include "voxel_hashing_intern... |
b7aa35060550d3c8f63b13942f6386b2a80ca244.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
// CUDA kernel. Each thread takes care of one element of c
__global__ void vecAdd(double *a, double *b, double *c, int n)
{
// Get our global thread ID
int id = bloc... | b7aa35060550d3c8f63b13942f6386b2a80ca244.cu | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
// CUDA kernel. Each thread takes care of one element of c
__global__ void vecAdd(double *a, double *b, double *c, int n)
{
// Get our global thread ID
int id = blockIdx.x*blockDim.x+threadIdx.x;
// Make sure we do not go out of bounds
if (id ... |
a226c381b555235ee1101bd9209ed686b2c12e83.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <hip/hip_fp16.h>
#include <hip/hip_runtime.h>
#include <hip/device_functions.h>
#include <device_launch_parameters.h>
#include <torch/extension.h>
#include "sparse_kernels.h"
#include "sparse_layout.cuh"
#define USE_VERY... | a226c381b555235ee1101bd9209ed686b2c12e83.cu | #include <cuda.h>
#include <cuda_fp16.h>
#include <cuda_runtime.h>
#include <device_functions.h>
#include <device_launch_parameters.h>
#include <torch/extension.h>
#include "sparse_kernels.h"
#include "sparse_layout.cuh"
#define USE_VERY_OPTIMIZED_KERNEL
/**
* Compute sparse matrix multiplication with SDD mode.
*... |
f2482b7ed8d3e213601444183cf33af356604dd2.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void NN_DownSampling( float *target, const float *source, const int wt, const int ht, const int ws, const int hs )
{
int y = blockIdx.y * blockDim.y + threadIdx.y;
int x = blockIdx.x * blockDim.x + t... | f2482b7ed8d3e213601444183cf33af356604dd2.cu | #include "includes.h"
__global__ void NN_DownSampling( float *target, const float *source, const int wt, const int ht, const int ws, const int hs )
{
int y = blockIdx.y * blockDim.y + threadIdx.y;
int x = blockIdx.x * blockDim.x + threadIdx.x;
const int curt = y*wt+x;
const int curs = (y*2)*ws+x*2;
if(y < ht and x < wt... |
f71fc1810de1893570b00df69396d98c52c106cb.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <hip/hip_runtime.h>
#include "device_launch_parameters.h"
#define _USE_MATH_DEFINES
#include <math.h>
#include <stdio.h>
#include <memory.h>
#include <time.h>
#include "lodepng.h"
//kernel dimentions x and y
const int ker... | f71fc1810de1893570b00df69396d98c52c106cb.cu | #include "cuda_runtime.h"
#include <cuda.h>
#include "device_launch_parameters.h"
#define _USE_MATH_DEFINES
#include <math.h>
#include <stdio.h>
#include <memory.h>
#include <time.h>
#include "lodepng.h"
//kernel dimentions x and y
const int ker_x_dim = 5;
const int ker_y_dim = 5;
const double sigma = 3.0;
float ... |
a52b4664dc4759bb9fbf850d4f9fb14ab718fb46.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
__global__ void foo(float *A, int sz) {
__requires(sz == blockDim.x);
for(int i = 0; i < 100; i++) {
A[sz*i + threadIdx.x] *= 2.0f;
}
} | a52b4664dc4759bb9fbf850d4f9fb14ab718fb46.cu | #include <cuda.h>
__global__ void foo(float *A, int sz) {
__requires(sz == blockDim.x);
for(int i = 0; i < 100; i++) {
A[sz*i + threadIdx.x] *= 2.0f;
}
} |
3e2bd8be3546031a062c347bcb5dfd21123d7e34.hip | // !!! This is a file automatically generated by hipify!!!
// User: g103@157.88.139.133
// ExecutionRequest[P:'extinguishing.cu',P:1,T:1,args:'',q:'cudalb']
// May 16 2019 19:51:26
#include "cputils.h" // Added by tablon
/*
* Simplified simulation of fire extinguishing
*
* Computacion Paralela, Grado en Informatic... | 3e2bd8be3546031a062c347bcb5dfd21123d7e34.cu | // User: g103@157.88.139.133
// ExecutionRequest[P:'extinguishing.cu',P:1,T:1,args:'',q:'cudalb']
// May 16 2019 19:51:26
#include "cputils.h" // Added by tablon
/*
* Simplified simulation of fire extinguishing
*
* Computacion Paralela, Grado en Informatica (Universidad de Valladolid)
* 2018/2019
*
* v1.4
*
*... |
a6ec82dd3142dc0e04096913f16eb2c7cdeeb6ed.hip | // !!! This is a file automatically generated by hipify!!!
#include"cuda_runtime.h"
#include"device_launch_parameters.h"
#include<stdio.h>
#include<stdlib.h>
#include "hip/hip_texture_types.h"
#include<math.h>
#include "hip/hip_runtime.h"
//#include "cpu_anim.h" //texture
#define size 256
texture<float, hipTextureTyp... | a6ec82dd3142dc0e04096913f16eb2c7cdeeb6ed.cu | #include"cuda_runtime.h"
#include"device_launch_parameters.h"
#include<stdio.h>
#include<stdlib.h>
#include "cuda_texture_types.h"
#include<math.h>
#include "cuda.h"
//#include "cpu_anim.h" //调用texture的时候必须加上这个头文件
#define size 256
texture<float, cudaTextureType2D, cudaReadModeElementType> texRef;
__global__ void tra... |
6599a9e97594f1836f7ce779ac8d3d220dfd713d.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
@precisions normal z -> c d s
@author Hartwig Anzt... | 6599a9e97594f1836f7ce779ac8d3d220dfd713d.cu | /*
-- MAGMA (version 2.1.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date August 2016
@precisions normal z -> c d s
@author Hartwig Anzt
*/
#include "magmasparse_internal.h"
#define BLOCK_SIZE 512
#define PRECISION_z
//... |
3bc57b4ef3249f96e55f37ba213231b48a938c35.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* Copyright 2015 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
*
* ... | 3bc57b4ef3249f96e55f37ba213231b48a938c35.cu | /*
* Copyright 2015 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 ... |
54cb4ab9ef36feaff3a830b57930941ee969ea16.hip | // !!! This is a file automatically generated by hipify!!!
#pragma once
#include"cuda_helper.cuh"
#include<thrust/host_vector.h>
#include<thrust/device_vector.h>
#include<thrust/generate.h>
#include<thrust/sort.h>
#include<thrust/copy.h>
#include<thrust/sequence.h>
#define NUM_ELEM (1024*1024)
#define NUM_ELEM_START (1... | 54cb4ab9ef36feaff3a830b57930941ee969ea16.cu | #pragma once
#include"cuda_helper.cuh"
#include<thrust/host_vector.h>
#include<thrust/device_vector.h>
#include<thrust/generate.h>
#include<thrust/sort.h>
#include<thrust/copy.h>
#include<thrust/sequence.h>
#define NUM_ELEM (1024*1024)
#define NUM_ELEM_START (1024*1024)
#define NUM_ELEM_END (1024*1024*10)
void _sortThr... |
76193c9c2d58b2f6953a282ca6c41410cd10b185.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 "relax.cu"
#include<chrono>
#include<iostream>
using namespace st... | 76193c9c2d58b2f6953a282ca6c41410cd10b185.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 "relax.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{32... |
cc0b286de2b072e208628de7fe742a6ba8a6d595.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <Python.h>
#include <iostream>
#include "theano_mod_helper.h"
#include "cuda_ndarray.cuh"
//////////////////////
//// Support Code
//////////////////////
#define INTDIV_POW2(a, b) (a >> b)
#define INTMOD_POW2(a, b) (a & ... | cc0b286de2b072e208628de7fe742a6ba8a6d595.cu | #include <Python.h>
#include <iostream>
#include "theano_mod_helper.h"
#include "cuda_ndarray.cuh"
//////////////////////
//// Support Code
//////////////////////
#define INTDIV_POW2(a, b) (a >> b)
#define INTMOD_POW2(a, b) (a & ((1<<b)-1))
// GpuElemwise{Composite{tanh((i0 + i1))}}[(0, 1)]
// node.op.destro... |
fb0e0409e64399f616e5e6b4681162287cdc3cef.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <hip/device_functions.h>
#include <device_launch_parameters.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <hip/hip_runtime.h>
hipCtx_t hContext = 0;
#de... | fb0e0409e64399f616e5e6b4681162287cdc3cef.cu |
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <device_functions.h>
#include <device_launch_parameters.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <cuda.h>
CUcontext hContext = 0;
#define CUDA_CHECK( fn ) do { \
CUresult status = (fn); \
if ( CUDA_SUCCESS... |
62130391e6580ed9fee977d20db3cbb6012e3395.hip | // !!! This is a file automatically generated by hipify!!!
// ----------------------------------------------------------------------------
// Gunrock -- High-Performance Graph Primitives on GPU
// ----------------------------------------------------------------------------
// This source code is distributed under the t... | 62130391e6580ed9fee977d20db3cbb6012e3395.cu | // ----------------------------------------------------------------------------
// Gunrock -- High-Performance Graph Primitives on GPU
// ----------------------------------------------------------------------------
// This source code is distributed under the terms of LICENSE.TXT
// in the root directory of this source... |
e7298c47dc42fab6870e0d5985623b0f482fc974.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/**********HEADERS**********/
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <string>
#include <limits>
#include <stdlib.h>
#include <fstream>
#include <math.h>
#include <time.h>
#include "cuda_ptr.cuh"
#incl... | e7298c47dc42fab6870e0d5985623b0f482fc974.cu | /**********HEADERS**********/
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <string>
#include <limits>
#include <stdlib.h>
#include <fstream>
#include <math.h>
#include <time.h>
#include "cuda_ptr.cuh"
#include "mimo-io.cuh"
using namespace std;
/**********DEFINING CONSTANTS***********/
#defi... |
eba2ac0c57905a70ae1cab4fe9064b288aadaa2f.hip | // !!! This is a file automatically generated by hipify!!!
#include <assert.h>
#include "cuZFP.h"
#include "encode1.cuh"
#include "encode2.cuh"
#include "encode3.cuh"
#include "decode1.cuh"
#include "decode2.cuh"
#include "decode3.cuh"
#include "ErrorCheck.h"
#include "pointers.cuh"
#include "type_info.cuh"
#inclu... | eba2ac0c57905a70ae1cab4fe9064b288aadaa2f.cu | #include <assert.h>
#include "cuZFP.h"
#include "encode1.cuh"
#include "encode2.cuh"
#include "encode3.cuh"
#include "decode1.cuh"
#include "decode2.cuh"
#include "decode3.cuh"
#include "ErrorCheck.h"
#include "pointers.cuh"
#include "type_info.cuh"
#include <iostream>
#include <assert.h>
// we need to know about... |
048218497102aeb1df13d8cba0b6a6603d2fe447.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Rectangular matrix multiplication
* A[M][K] * B[k][N] = C[M][N]
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <sys/timeb.h>
#include <string.h>
/* read timer in second */
double read_timer() {
struct timeb tm;
ftime(&t... | 048218497102aeb1df13d8cba0b6a6603d2fe447.cu | /*
* Rectangular matrix multiplication
* A[M][K] * B[k][N] = C[M][N]
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <sys/timeb.h>
#include <string.h>
/* read timer in second */
double read_timer() {
struct timeb tm;
ftime(&tm);
return (double) tm.time + (double) tm.millitm / 100... |
850ceb8cca9268a14a374711ab57495413ceffd7.hip | // !!! This is a file automatically generated by hipify!!!
/**
* Copyright 2020 Xiaomi Corporation (authors: Fangjun Kuang)
*
* See LICENSE for clarification regarding multiple authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with t... | 850ceb8cca9268a14a374711ab57495413ceffd7.cu | /**
* Copyright 2020 Xiaomi Corporation (authors: Fangjun Kuang)
*
* See LICENSE for clarification regarding multiple authors
*
* 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
*
... |
473407504a3b07d17dbc7e018b12b3e99c550aed.hip | // !!! This is a file automatically generated by hipify!!!
#include "src/randomCudaScripts/DeleteFromArray.h"
#include <cmath>
#include <hip/hip_runtime.h>
#include <iostream>
#include "device_launch_parameters.h"
__global__ void gpu_add_block_sums(unsigned int* const d_out,
const unsigned int* const d_in,
unsig... | 473407504a3b07d17dbc7e018b12b3e99c550aed.cu |
#include "src/randomCudaScripts/DeleteFromArray.h"
#include <cmath>
#include <cuda.h>
#include <iostream>
#include "device_launch_parameters.h"
__global__ void gpu_add_block_sums(unsigned int* const d_out,
const unsigned int* const d_in,
unsigned int* const d_block_sums,
const size_t numElems)
{
//unsigned int... |
3fc2a643b6fbec8a1ae2f32c2318cc7cddd79bab.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*$Id: MarsLib.cu 755 2009-11-18 13:22:54Z wenbinor $*/
/**
*This is the source code for Mars, a MapReduce framework on graphics
*processors.
*Developers: Wenbin Fang (HKUST), Bingsheng He (Microsoft Research Asia)
*Naga K. Govi... | 3fc2a643b6fbec8a1ae2f32c2318cc7cddd79bab.cu | /*$Id: MarsLib.cu 755 2009-11-18 13:22:54Z wenbinor $*/
/**
*This is the source code for Mars, a MapReduce framework on graphics
*processors.
*Developers: Wenbin Fang (HKUST), Bingsheng He (Microsoft Research Asia)
*Naga K. Govindaraju (Microsoft Corp.), Qiong Luo (HKUST), Tuyong Wang (Sina.com).
*If you have any ... |
e972f56b6dae9e346b429dd2c6c9379d9e1c6ad4.hip | // !!! This is a file automatically generated by hipify!!!
/* memManager_gpu.cu
Moises Hernandez-Fernandez - FMRIB Image Analysis Group
Copyright (C) 2015 University of Oxford */
/* Part of FSL - FMRIB's Software Library
http://www.fmrib.ox.ac.uk/fsl
fsl@fmrib.ox.ac.uk
Developed at FMRIB (Ox... | e972f56b6dae9e346b429dd2c6c9379d9e1c6ad4.cu | /* memManager_gpu.cu
Moises Hernandez-Fernandez - FMRIB Image Analysis Group
Copyright (C) 2015 University of Oxford */
/* Part of FSL - FMRIB's Software Library
http://www.fmrib.ox.ac.uk/fsl
fsl@fmrib.ox.ac.uk
Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
Imaging o... |
2c93614707edb976e24731af3165d41ffb627269.hip | // !!! This is a file automatically generated by hipify!!!
/**
* @file gr_scaling.cpp
* @brief BSSN_GR scaling tests.
* @version 0.1
* @date 2021-07-25
*
* @copyright Copyright (c) 2021
*
*/
#include "gr.h"
#include "grUtils.h"
#include "mpi.h"
#include "TreeNode.h"
#include "mesh.h"
#include <vector>
#incl... | 2c93614707edb976e24731af3165d41ffb627269.cu | /**
* @file gr_scaling.cpp
* @brief BSSN_GR scaling tests.
* @version 0.1
* @date 2021-07-25
*
* @copyright Copyright (c) 2021
*
*/
#include "gr.h"
#include "grUtils.h"
#include "mpi.h"
#include "TreeNode.h"
#include "mesh.h"
#include <vector>
#include <iostream>
#include "rkBSSN.h"
#include "octUtils.h"
#i... |
3d2a963d04cfdf85708081320838587fc13a783d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void saxpy(int n, float a, float *x, float *y, char *ad, char *bd)
{
int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n){ y[i] = a*x[i] + y[i];
ad[0] = 'C';
}
} | 3d2a963d04cfdf85708081320838587fc13a783d.cu | #include "includes.h"
__global__ void saxpy(int n, float a, float *x, float *y, char *ad, char *bd)
{
int i = blockIdx.x*blockDim.x + threadIdx.x;
if (i < n){ y[i] = a*x[i] + y[i];
ad[0] = 'C';
}
} |
8a5c51526d34b2ebdaca3c7261bf2800fec48e8d.hip | // !!! This is a file automatically generated by hipify!!!
#include <h2opusconf.h>
/* skip compilation of this .cu file if H2OPUS is CPU only while PETSc has GPU support */
#if !defined(__HIPCC__) || defined(H2OPUS_USE_GPU)
#include <h2opus.h>
#if defined(H2OPUS_USE_MPI)
#include <h2opus/distributed/distributed_h2opus_... | 8a5c51526d34b2ebdaca3c7261bf2800fec48e8d.cu | #include <h2opusconf.h>
/* skip compilation of this .cu file if H2OPUS is CPU only while PETSc has GPU support */
#if !defined(__CUDACC__) || defined(H2OPUS_USE_GPU)
#include <h2opus.h>
#if defined(H2OPUS_USE_MPI)
#include <h2opus/distributed/distributed_h2opus_handle.h>
#include <h2opus/distributed/distributed_geometr... |
073f7a19169c87bfaadc583d40e6c499d248ad03.hip | // !!! This is a file automatically generated by hipify!!!
#include <ATen/ATen.h>
#include <ATen/CUDAGeneratorImpl.h>
#include <ATen/hip/detail/IndexUtils.cuh>
#include <ATen/hip/detail/TensorInfo.cuh>
#include <c10/hip/HIPMathCompat.h>
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include <hip/hip_fp16.h>... | 073f7a19169c87bfaadc583d40e6c499d248ad03.cu | #include <ATen/ATen.h>
#include <ATen/CUDAGeneratorImpl.h>
#include <ATen/cuda/detail/IndexUtils.cuh>
#include <ATen/cuda/detail/TensorInfo.cuh>
#include <c10/cuda/CUDAMathCompat.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <cuda_fp16.h>
#include <cuda_bf16.h>
#include <cuda_profiler_api.h>
#include "THC/THC... |
4e17d3bd0b77f8485f3727bf3adfd37b515bef47.hip | // !!! This is a file automatically generated by hipify!!!
/*!
* Copyright (c) by Contributors 2020
*/
#include <gtest/gtest.h>
#include <cmath>
#include "xgboost/metric.h"
#include "../helpers.h"
#include "../../../src/common/survival_util.h"
/** Tests for Survival metrics that should run both on CPU and GPU **/
n... | 4e17d3bd0b77f8485f3727bf3adfd37b515bef47.cu | /*!
* Copyright (c) by Contributors 2020
*/
#include <gtest/gtest.h>
#include <cmath>
#include "xgboost/metric.h"
#include "../helpers.h"
#include "../../../src/common/survival_util.h"
/** Tests for Survival metrics that should run both on CPU and GPU **/
namespace xgboost {
namespace common {
TEST(Metric, Declare... |
c53781f114462cc44be8987b6aa87d74a5cea25a.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2016, 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 ret... | c53781f114462cc44be8987b6aa87d74a5cea25a.cu | /*
* Copyright (c) 2016, 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 condition... |
3518277fad5ca5831910fdb3c9f1ad6f3e74a5b3.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void CalcMass(double *Mass_d, double *GlobalMass_d, double *Rho_d, double A, double *Altitudeh_d, double *lonlat_d, double *areasT, int num, bool DeepModel) {
int id = blockIdx.x * blockDim... | 3518277fad5ca5831910fdb3c9f1ad6f3e74a5b3.cu | #include "includes.h"
__global__ void CalcMass(double *Mass_d, double *GlobalMass_d, double *Rho_d, double A, double *Altitudeh_d, double *lonlat_d, double *areasT, int num, bool DeepModel) {
int id = blockIdx.x * blockDim.x + threadIdx.x;
int nv = gridDim.y;
int lev = blockIdx.y;
if (id < num) {
//calculat... |
c82bf139507b7a0d982211a8b6aa2b3417f107b9.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main(int argc,char* argv[]){
// class1M1 class1M2 class2M1 class2M2
if(argc!=5){
cout<<"\nThere should be 4 file class1TestWM1 - class1... | c82bf139507b7a0d982211a8b6aa2b3417f107b9.cu | #include <cuda.h>
#include <stdio.h>
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main(int argc,char* argv[]){
// class1M1 class1M2 class2M1 class2M2
if(argc!=5){
cout<<"\nThere should be 4 file class1TestWM1 - class1TestWM2 - class2TestWM1 - class2TestWM2\n";
exit(23);
}
// Retriv... |
8f31b399f7ba8dc249db063046e198bff4beae46.hip | // !!! This is a file automatically generated by hipify!!!
#include "psrdada_cpp/meerkat/fbfuse/test/CoherentBeamformerTester.cuh"
#include "psrdada_cpp/meerkat/fbfuse/fbfuse_constants.hpp"
#include "psrdada_cpp/common.hpp"
#include "psrdada_cpp/cuda_utils.hpp"
#include <random>
#include <cmath>
#include <complex>
nam... | 8f31b399f7ba8dc249db063046e198bff4beae46.cu | #include "psrdada_cpp/meerkat/fbfuse/test/CoherentBeamformerTester.cuh"
#include "psrdada_cpp/meerkat/fbfuse/fbfuse_constants.hpp"
#include "psrdada_cpp/common.hpp"
#include "psrdada_cpp/cuda_utils.hpp"
#include <random>
#include <cmath>
#include <complex>
namespace psrdada_cpp {
namespace meerkat {
namespace fbfuse {... |
75e5cf617d19bf283938c0bf7249542343f009fe.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdlib.h>
#include <stdio.h>
#include "timer.h"
#include "cuda_utils.h"
typedef float dtype;
#define N_ (8 * 1024 * 1024)
#define MAX_THREADS 256
#define MAX_BLOCKS 64
#define MIN(x,y) ((x < y) ? x : y)
/* return the... | 75e5cf617d19bf283938c0bf7249542343f009fe.cu | #include <stdlib.h>
#include <stdio.h>
#include "timer.h"
#include "cuda_utils.h"
typedef float dtype;
#define N_ (8 * 1024 * 1024)
#define MAX_THREADS 256
#define MAX_BLOCKS 64
#define MIN(x,y) ((x < y) ? x : y)
/* return the next power of 2 number that is larger than x */
unsigned int nextPow2( unsigned int x )... |
d7e771f5b0afd2f0a0f6fc8ed3590ff2c2178495.hip | // !!! This is a file automatically generated by hipify!!!
#include "io_network.h"
void save(const std::string &path, const Mat* m){
if(NULL == m || NULL == m -> Data){
std::cout<<"invalid matrix..."<<std::endl;
exit(0);
}
ofstream outfile(path.c_str(), ios::out);
outfile.precision(16);
if (outfile.is_open())... | d7e771f5b0afd2f0a0f6fc8ed3590ff2c2178495.cu | #include "io_network.h"
void save(const std::string &path, const Mat* m){
if(NULL == m || NULL == m -> Data){
std::cout<<"invalid matrix..."<<std::endl;
exit(0);
}
ofstream outfile(path.c_str(), ios::out);
outfile.precision(16);
if (outfile.is_open()){
outfile<<"path = "<<path<<"\n";
outfile<<"rows = "<<m... |
864036b5832a349a91b684e1d4065e9150c5028e.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdint.h>
#include <vector>
#include <string.h>
#include <hip/hip_runtime.h>
#include <sys/mman.h>
#include <unistd.h>
/* Comanche Common */
#include <common/dump_utils.h>
#include "caffe/layers/gpu_direct_data_layer.hpp"
namespace caffe {
templ... | 864036b5832a349a91b684e1d4065e9150c5028e.cu | #include <stdint.h>
#include <vector>
#include <string.h>
#include <cuda.h>
#include <sys/mman.h>
#include <unistd.h>
/* Comanche Common */
#include <common/dump_utils.h>
#include "caffe/layers/gpu_direct_data_layer.hpp"
namespace caffe {
template <typename Dtype>
void GPUDirectDataLayer<Dtype>::Forward_gpu(const... |
37c352066952ad0ad3e06bc97851f008477b71d5.hip | // !!! This is a file automatically generated by hipify!!!
/*
* This is the jacobi relaxation method in gpu
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <hip/hip_runtime.h>
#define SIZE 2048
#define BLOCK_SIZE 32
#define NITER 1000
float ratio(float*u, float ant, int iter){
float tmp=0... | 37c352066952ad0ad3e06bc97851f008477b71d5.cu |
/*
* This is the jacobi relaxation method in gpu
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <cuda.h>
#define SIZE 2048
#define BLOCK_SIZE 32
#define NITER 1000
float ratio(float*u, float ant, int iter){
float tmp=0.0;
int i,j;
for(i=0;i<SIZE;i++)
{
for(j=0;j<SIZE;j++)
{
if(... |
356c8767daad39a92f156f171c8b3dd356a2bba4.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <iostream>
#include "timer.h"
using namespace std;
/* Utility function, use to do error checking.
Use this function like this:
checkCudaCall(hipMalloc((void... | 356c8767daad39a92f156f171c8b3dd356a2bba4.cu | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <iostream>
#include "timer.h"
using namespace std;
/* Utility function, use to do error checking.
Use this function like this:
checkCudaCall(cudaMalloc((void **) &deviceRGB, imgS * sizeof(color_t)));
And to check the result of a kernel invo... |
b5115fa10264e674de894a7a18d36766b51a4ca4.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Copyright (c) 2016 Paddle
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/licens... | b5115fa10264e674de894a7a18d36766b51a4ca4.cu | /* Copyright (c) 2016 Paddle
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... |
303b8505c4a40f3ff62e69000bd5ffa018f515f2.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void CalcInput(float* screen, float* weight, float* d_Votes, int stride){
//Current implementation, idk if it works. Probably doesn't, but it is worth a try, I think.
int id = threadIdx.x + blockDim... | 303b8505c4a40f3ff62e69000bd5ffa018f515f2.cu | #include "includes.h"
__global__ void CalcInput(float* screen, float* weight, float* d_Votes, int stride){
//Current implementation, idk if it works. Probably doesn't, but it is worth a try, I think.
int id = threadIdx.x + blockDim.x * blockIdx.x;
d_Votes[id] = 0;
d_Votes[id] += screen[id] * weight[id];
d_Votes[id] ... |
635134fc3305205dedb13ff38290e58a9c114da7.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <ATen/ATen.h>
#include <ATen/NativeFunctions.h>
#include <ATen/hip/HIPApplyUtils.cuh>
#include <ATen/native/hip/Loops.cuh>
#include <ATen/hip/impl/HIPGuardImplMasqueradingAsCUDA.h>
#include <cmath>
namespace at {
namespac... | 635134fc3305205dedb13ff38290e58a9c114da7.cu | #include <ATen/ATen.h>
#include <ATen/NativeFunctions.h>
#include <ATen/cuda/CUDAApplyUtils.cuh>
#include <ATen/native/cuda/Loops.cuh>
#include <c10/cuda/CUDAGuard.h>
#include <cmath>
namespace at {
namespace native {
namespace {
__global__ void ChooseQuantizationParamsKernelImpl(
const int64_t* fake_quant_on,
... |
07bbdbd9bb20c632eee8a82df0151082414759e6.hip | // !!! This is a file automatically generated by hipify!!!
/*-----------
*
* atomics.cu
*
* This is the source file of antomic operations.
*
* This kernel is based on CUDA samples. simpleAtomicIntrinsics.cuh
*
* streamsOptBenchmark/atomics.cu
*
* By Hao Li
*
*------------
*/
#include <time.h>
#include <hi... | 07bbdbd9bb20c632eee8a82df0151082414759e6.cu | /*-----------
*
* atomics.cu
*
* This is the source file of antomic operations.
*
* This kernel is based on CUDA samples. simpleAtomicIntrinsics.cuh
*
* streamsOptBenchmark/atomics.cu
*
* By Hao Li
*
*------------
*/
#include <time.h>
#include <cuda_runtime.h>
// #include "functions.cuh"
__global__ voi... |
88fa5f677ee0adf2fe5b56817f09747533c2c69e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <iostream>
#include <string>
#include <numeric>
#include "../../comm/csr.cuh"
#include "pr_cta_discrete.cuh"
#include "validation.cuh"
#include "../../util/time.cuh"
#define FETCH_SIZE (FETCHSIZE)
#define BLOCK_SIZE (512... | 88fa5f677ee0adf2fe5b56817f09747533c2c69e.cu | #include <iostream>
#include <string>
#include <numeric>
#include "../../comm/csr.cuh"
#include "pr_cta_discrete.cuh"
#include "validation.cuh"
#include "../../util/time.cuh"
#define FETCH_SIZE (FETCHSIZE)
#define BLOCK_SIZE (512)
using namespace std;
__global__ void print(float *array, int size)
{
if(TID ==0)
... |
441141556d4db0435070d8042250fb6c572cef8c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <cstdio>
__global__ void print_threadIds() {
printf("blockIdx.x : %d, blockIdx.y : %d, blockIdx.z : %d , blockDim.x : %d, blockDim.y : %d, gridDim.x : %d, gridDim.y : %d \n",
... | 441141556d4db0435070d8042250fb6c572cef8c.cu | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <cstdio>
__global__ void print_threadIds() {
printf("blockIdx.x : %d, blockIdx.y : %d, blockIdx.z : %d , blockDim.x : %d, blockDim.y : %d, gridDim.x : %d, gridDim.y : %d \n",
blockIdx.x, blockIdx.y, blockIdx.z, blockDim.x, block... |
b9474ae8af41be7c11d79e21022be17e86f1e84f.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
//double* x, * devx, * val, * gra, * r, * graMax;
//double* hes_value;
////int size;
//int* pos_x, * pos_y;
//int* csr;
double* x;
//thrust::pair<int, int> *device_pos;
//typedef double (*fp)(double);
//typedef... | b9474ae8af41be7c11d79e21022be17e86f1e84f.cu | #include "includes.h"
//double* x, * devx, * val, * gra, * r, * graMax;
//double* hes_value;
////int size;
//int* pos_x, * pos_y;
//int* csr;
double* x;
//thrust::pair<int, int> *device_pos;
//typedef double (*fp)(double);
//typedef void (*val_fp)(double*, double*, int);
//typedef void (*valsum_fp)(double*, double*,int... |
b21f24be680539c220cb2247a5780498d0de4ffb.hip | // !!! This is a file automatically generated by hipify!!!
/// LSU EE 7722 GPU Microarchitecture
//
/// Simple, Self-Contained, One-File CUDA Example
/// How to Compile from the Command Line
//
// nvcc -o addr-space addr-space.cu -O3 -Xcompiler -Wall
/// Documentation
//
// CUDA: http://docs.nvidia.com/cuda/cu... | b21f24be680539c220cb2247a5780498d0de4ffb.cu | /// LSU EE 7722 GPU Microarchitecture
//
/// Simple, Self-Contained, One-File CUDA Example
/// How to Compile from the Command Line
//
// nvcc -o addr-space addr-space.cu -O3 -Xcompiler -Wall
/// Documentation
//
// CUDA: http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html
// C++: http://en.cppr... |
581c85c1555edb7e7fb509b86194be4607120238.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <string>
#include <hip/hip_fp16.h>
#include "caffe/util/gpu_math_functions.cuh"
#include "caffe/util/math_functions.hpp"
namespace caffe {
#pragma clang diagnostic push
#pragma ide diagnostic ignored "CannotResolve"
tem... | 581c85c1555edb7e7fb509b86194be4607120238.cu | #include <string>
#include <cuda_fp16.h>
#include "caffe/util/gpu_math_functions.cuh"
#include "caffe/util/math_functions.hpp"
namespace caffe {
#pragma clang diagnostic push
#pragma ide diagnostic ignored "CannotResolve"
template<typename Gtype, typename Wtype>
__global__ void NesterovRegUpdateAllAndClear(int N,
... |
8c27e98dc53dfd361cb230c6756052ae2b52a5ce.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <helper_math.h>
#include <cuda_gl_interop.h>
#include <helper_cuda.h>
#include <helper_cuda_gl.h>
#include <helper_functions.h>
#include <cstdlib>
#include "new_kern.h"
#include "nlist.h"
#include "thrust/reduce.h"
#inclu... | 8c27e98dc53dfd361cb230c6756052ae2b52a5ce.cu | #include <cuda_runtime.h>
#include <helper_math.h>
#include <cuda_gl_interop.h>
#include <helper_cuda.h>
#include <helper_cuda_gl.h>
#include <helper_functions.h>
#include <cstdlib>
#include "new_kern.h"
#include "nlist.h"
#include "thrust/reduce.h"
#include "thrust/device_ptr.h"
#include "thrust/functional.h"
exter... |
a89a1066f6753c64b9c8aabc672f5c513f7681f0.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void update_old( float4 *__restrict__ newPos, float4 *__restrict__ oldPos )
{
int index = blockIdx.x * blockDim.x + threadIdx.x;
oldPos[index] = newPos[index];
} | a89a1066f6753c64b9c8aabc672f5c513f7681f0.cu | #include "includes.h"
__global__ void update_old( float4 *__restrict__ newPos, float4 *__restrict__ oldPos )
{
int index = blockIdx.x * blockDim.x + threadIdx.x;
oldPos[index] = newPos[index];
} |
b725894836ea174b49fb6086c638f20eed784a8e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "../common/book.h"
#include "../common/gpu_anim.h"
#define DIM 1024
__global__ void kernel( uchar4 *ptr, int ticks ) {
// map from threadIdx/blockIdx to pixel position
int x = threadIdx.x + blockIdx.x * blockDim.x;
int... | b725894836ea174b49fb6086c638f20eed784a8e.cu | #include "../common/book.h"
#include "../common/gpu_anim.h"
#define DIM 1024
__global__ void kernel( uchar4 *ptr, int ticks ) {
// map from threadIdx/blockIdx to pixel position
int x = threadIdx.x + blockIdx.x * blockDim.x;
int y = threadIdx.y + blockIdx.y * blockDim.y;
int offset = x + y * blockDim.x * gridDim.x... |
02983aa5096d92e751c299330aec61c3c2c35e88.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "kernel.h"
#include "device_funcs.cuh"
#include <helper_math.h>
#define TX_2D 32
#define TY_2D 32
#define TX 8
#define TY 8
#define TZ 8
#define NUMSTEPS 20
__global__ void renderKernel(uchar4 *d_out, float *d_vol, int w, ... | 02983aa5096d92e751c299330aec61c3c2c35e88.cu | #include "kernel.h"
#include "device_funcs.cuh"
#include <helper_math.h>
#define TX_2D 32
#define TY_2D 32
#define TX 8
#define TY 8
#define TZ 8
#define NUMSTEPS 20
__global__ void renderKernel(uchar4 *d_out, float *d_vol, int w, int h,
int3 volSize, int method, float zs, float theta, float threshold, float dist) {
... |
434dfccd306bfbdd1d115d5198b9c23538f28f1d.hip | // !!! This is a file automatically generated by hipify!!!
/*------------------------------------------------------------------------
CUDA C extension for Python
Provides functionality for forward and back projection in PET image
reconstruction.
author: Pawel Markiewicz
Copyrights: 2018
-------------------------------... | 434dfccd306bfbdd1d115d5198b9c23538f28f1d.cu | /*------------------------------------------------------------------------
CUDA C extension for Python
Provides functionality for forward and back projection in PET image
reconstruction.
author: Pawel Markiewicz
Copyrights: 2018
------------------------------------------------------------------------*/
#include <Pytho... |
945cb5eccc26a1c15cca01872bdefbf26106e554.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "traffic.h"
static const int kNumBlockSize = 256;
static const char kCellTypeNormal = 1;
static const char kCellTypeProducer = 2;
using IndexT = int;
using CellPointerT = IndexT;
#include "../dataset.h"
__managed__ Cell... | 945cb5eccc26a1c15cca01872bdefbf26106e554.cu | #include "traffic.h"
static const int kNumBlockSize = 256;
static const char kCellTypeNormal = 1;
static const char kCellTypeProducer = 2;
using IndexT = int;
using CellPointerT = IndexT;
#include "../dataset.h"
__managed__ CellBase **dev_cells;
// Need 2 arrays of both, so we can swap.
__device__ int *d_Car_activ... |
3259d43520082e11615c42be3fdc6c42db1189ab.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <algorithm>
#include <cfloat>
#include <vector>
#include "thrust/device_vector.h"
#include "layer.hpp"
#include "math_functions.hpp"
#include "channel_scale_layer.hpp"
namespace caffe {
template <typename Dtype>
__globa... | 3259d43520082e11615c42be3fdc6c42db1189ab.cu | #include <algorithm>
#include <cfloat>
#include <vector>
#include "thrust/device_vector.h"
#include "layer.hpp"
#include "math_functions.hpp"
#include "channel_scale_layer.hpp"
namespace caffe {
template <typename Dtype>
__global__ void kernel_channel_scale(const int num, const int channels, const int spatial_dim,
... |
c3535a41702b742a0ad023f71e91539cbb11b95c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//xfail:NOT_ALL_VERIFIED
//--blockDim=1024 --gridDim=1 --no-inline
//error: possible null pointer access
__device__ float multiplyByTwo(float *v, unsigned int tid)
{
return v[tid] * 2.0f;
}
__device__ float divideByTwo(float *... | c3535a41702b742a0ad023f71e91539cbb11b95c.cu | //xfail:NOT_ALL_VERIFIED
//--blockDim=1024 --gridDim=1 --no-inline
//error: possible null pointer access
__device__ float multiplyByTwo(float *v, unsigned int tid)
{
return v[tid] * 2.0f;
}
__device__ float divideByTwo(float *v, unsigned int tid)
{
return v[tid] * 0.5f;
}
typedef float(*funcType)(float*, uns... |
87653125e941921e3510ab18b81cfca2d5a4f9a2.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 "sum.cu"
#include<chrono>
#include<iostream>
using namespace std;... | 87653125e941921e3510ab18b81cfca2d5a4f9a2.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 "sum.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{32,3... |
bd7d6c0a10bd4c34c70fbb32fe45f73eee19df4f.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 "matmulKernel.cu"
#include<chrono>
#include<iostream>
using names... | bd7d6c0a10bd4c34c70fbb32fe45f73eee19df4f.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 "matmulKernel.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,... |
fb69ed9f2ed73873bd946d3d8b0776d8119938c0.hip | // !!! This is a file automatically generated by hipify!!!
#define LIMIT -999
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <needle.h>
#include <hip/hip_runtime.h>
#include <sys/time.h>
// includes, kernels
#include <needle_kernel.cu>
///////////////////////////////////////////... | fb69ed9f2ed73873bd946d3d8b0776d8119938c0.cu | #define LIMIT -999
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <needle.h>
#include <cuda.h>
#include <sys/time.h>
// includes, kernels
#include <needle_kernel.cu>
////////////////////////////////////////////////////////////////////////////////
// declaration, forward
void run... |
a20d1f867d7829cfc7f2501d068ce9aef496afba.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 "fhn_mod.h"
extern "C" SET_ODE_INITIAL_CONDITIONS_GPU(set_model_initial_conditions_gpu) {
print_to_stdout_and_file("Using modified FHN 1961 GPU mod... | a20d1f867d7829cfc7f2501d068ce9aef496afba.cu | #include <stddef.h>
#include <stdint.h>
#include "model_gpu_utils.h"
#include "fhn_mod.h"
extern "C" SET_ODE_INITIAL_CONDITIONS_GPU(set_model_initial_conditions_gpu) {
print_to_stdout_and_file("Using modified FHN 1961 GPU model\n");
// execution configuration
const int GRID = (num_volumes + BLOCK_SIZE ... |
7115336a6462755c4a24710c5113aa77fcd9151d.hip | // !!! This is a file automatically generated by hipify!!!
#include <iostream>
#include <algorithm>
#include <chrono>
#include <hip/hip_runtime.h>
using namespace std;
__global__
void saxpy(size_t n, float alpha, float *a, float *b)
{
}
int main(int argc, char **argv)
{
size_t N = 1024;
float *a, *b, *res, *da, ... | 7115336a6462755c4a24710c5113aa77fcd9151d.cu | #include <iostream>
#include <algorithm>
#include <chrono>
#include <cuda.h>
using namespace std;
__global__
void saxpy(size_t n, float alpha, float *a, float *b)
{
}
int main(int argc, char **argv)
{
size_t N = 1024;
float *a, *b, *res, *da, *db;
float alpha = 2.0f;
// Allocate and initialize vectors a and... |
cd704ad027be97470c1301e1eb768e3de95be37f.hip | // !!! This is a file automatically generated by hipify!!!
#define CHECK(call) \
{ \
const hipError_t error = call; \
if( error != hipSucce... | cd704ad027be97470c1301e1eb768e3de95be37f.cu | #define CHECK(call) \
{ \
const cudaError_t error = call; \
if( error != cudaSuccess ) \
... |
97a6d9877851dd656ee61555b3344d016daf5a5f.hip | // !!! This is a file automatically generated by hipify!!!
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a co... | 97a6d9877851dd656ee61555b3344d016daf5a5f.cu | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You ca... |
79c0833deb1601574eb97c33ab12d1e2112be1e5.hip | // !!! This is a file automatically generated by hipify!!!
/*
* CUDA blur
* Kevin Yuh, 2014
* Revised by Nailen Matschke, 2016
*/
#include <cstdio>
#include <hip/hip_runtime.h>
#include "blur_device.cuh"
__global__
void cudaBlurKernel(const float *raw_data, const float *blur_v, float *out_data,
const uns... | 79c0833deb1601574eb97c33ab12d1e2112be1e5.cu | /*
* CUDA blur
* Kevin Yuh, 2014
* Revised by Nailen Matschke, 2016
*/
#include <cstdio>
#include <cuda_runtime.h>
#include "blur_device.cuh"
__global__
void cudaBlurKernel(const float *raw_data, const float *blur_v, float *out_data,
const unsigned int n_frames, const unsigned int blur_v_size) {
// ... |
363d0f9df5c0499f39869e859b69483a3ce44b24.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <wb.h>
#define wbCheck(stmt) \
do { \
hipError_t err = stmt; ... | 363d0f9df5c0499f39869e859b69483a3ce44b24.cu | #include <wb.h>
#define wbCheck(stmt) \
do { \
cudaError_t err = stmt; \
if (err != cudaSuccess) { ... |
62fdb19cdde10ff147e7a5c0bb4700060b216435.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <assert.h>
#include <stdio.h>
#include "box2d2r-512-8-512_kernel.hu"
#define BENCH_DIM 2
#define BENCH_FPP 49
#define BENCH_RAD 2
#include "common.h"
double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool sco... | 62fdb19cdde10ff147e7a5c0bb4700060b216435.cu | #include <assert.h>
#include <stdio.h>
#include "box2d2r-512-8-512_kernel.hu"
#define BENCH_DIM 2
#define BENCH_FPP 49
#define BENCH_RAD 2
#include "common.h"
double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool scop)
{
double start_time = sb_time(), end_time = 0.0;
int dimsize = compsize + BENCH_R... |
7758074f25ad2c161405e0800d10d90605f1e1be.hip | // !!! This is a file automatically generated by hipify!!!
#include <fstream>
#include <iostream>
#include <vector>
#include <hip/hip_runtime.h>
#include <mpi.h>
#include "util.hpp"
#include "cuda_stream.hpp"
// 2D diffusion example with mpi
// the grid has a fixed width of nx=128
// the use specifies the height, n... | 7758074f25ad2c161405e0800d10d90605f1e1be.cu | #include <fstream>
#include <iostream>
#include <vector>
#include <cuda.h>
#include <mpi.h>
#include "util.hpp"
#include "cuda_stream.hpp"
// 2D diffusion example with mpi
// the grid has a fixed width of nx=128
// the use specifies the height, ny, as a power of two
// note that nx and ny have 2 added to them to ac... |
d051a672b18a3455fdc314fb7592260763f7059e.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... | d051a672b18a3455fdc314fb7592260763f7059e.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... |
00d7fc5013d2bec4912aeefbda4ee08fb2bafa66.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Write GPU kernels to compete the functionality of estimating the integral via the trapezoidal rule. */
#include <stdio.h>
#include <math.h>
#define LEFT_ENDPOINT 10
#define RIGHT_ENDPOINT 1005
#define NUM_TRAPEZOIDS 1000000000... | 00d7fc5013d2bec4912aeefbda4ee08fb2bafa66.cu | /* Write GPU kernels to compete the functionality of estimating the integral via the trapezoidal rule. */
#include <stdio.h>
#include <math.h>
#define LEFT_ENDPOINT 10
#define RIGHT_ENDPOINT 1005
#define NUM_TRAPEZOIDS 1000000000
#define THREAD_BLOCK_SIZE 256
/* This function uses a compare and swap technique to ac... |
d8696fe1755ac63ee24d6483cd97ff6cfec0be26.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifdef _TIMER_
#include "hip/hip_runtime_api.h"
#endif
#include "stdio.h"
#define FORMA_MAX(a,b) ( (a) > (b) ? (a) : (b) )
#define max(a,b) FORMA_MAX(a,b)
#define FORMA_MIN(a,b) ( (a) < (b) ? (a) : (b) )
#define min(a,b) FORMA_MIN(... | d8696fe1755ac63ee24d6483cd97ff6cfec0be26.cu | #include "cuda.h"
#ifdef _TIMER_
#include "cuda_profiler_api.h"
#endif
#include "stdio.h"
#define FORMA_MAX(a,b) ( (a) > (b) ? (a) : (b) )
#define max(a,b) FORMA_MAX(a,b)
#define FORMA_MIN(a,b) ( (a) < (b) ? (a) : (b) )
#define min(a,b) FORMA_MIN(a,b)
#define FORMA_CEIL(a,b) ( (a) % (b) == 0 ? (a) / (b) : ((a) / (b)) ... |
9ae96885cec4f9801d5418e277321f21399ec5b8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <chrono>
#include <cmath>
#include <string>
#include <omp.h>
#include <thread>
#include "diff1d.h"
#include "cuda_helper.h"
#define value_t float
#define index_t int
// constants
__constant__ value_t c_zero, c_one, c_two;... | 9ae96885cec4f9801d5418e277321f21399ec5b8.cu | #include <chrono>
#include <cmath>
#include <string>
#include <omp.h>
#include <thread>
#include "diff1d.h"
#include "cuda_helper.h"
#define value_t float
#define index_t int
// constants
__constant__ value_t c_zero, c_one, c_two;
__global__ void kernel(index_t n, value_t r, value_t *u, value_t *u_new)
{
index_t l... |
3681c095a145f63f194c2cb1470afc05ef65fc2a.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <stdlib.h>
bool verify(int data[], int length)
{
for (int i = 1 ; i < length; ++i)
{
if (data[i] - data [i - 1] != i )
{ printf("error %d\n", i); return false; }
}
return true;
}
#define DUMP(x)... | 3681c095a145f63f194c2cb1470afc05ef65fc2a.cu | #include <stdio.h>
#include <stdlib.h>
bool verify(int data[], int length)
{
for (int i = 1 ; i < length; ++i)
{
if (data[i] - data [i - 1] != i )
{ printf("error %d\n", i); return false; }
}
return true;
}
#define DUMP(x) printf("%s %d\n", #x, (int) props.x)
void dumpCUDAProps(cudaDeviceProp & props)
{
DUM... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.