hip_filename stringlengths 5 84 | hip_content stringlengths 79 9.69M | cuda_filename stringlengths 4 83 | cuda_content stringlengths 19 9.69M |
|---|---|---|---|
fcd394853732933cc2ddcf59fa29d561f0263cb1.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <iso646.h>
#include <cstdio>
#include <cstdint>
#include <cstdlib>
#include "SyncedMemory.h"
#include "lab1.h"
using namespace std;
#define CHECK {\
auto e = hip... | fcd394853732933cc2ddcf59fa29d561f0263cb1.cu |
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <iso646.h>
#include <cstdio>
#include <cstdint>
#include <cstdlib>
#include "SyncedMemory.h"
#include "lab1.h"
using namespace std;
#define CHECK {\
auto e = cudaDeviceSynchronize();\
if (e != cudaSuccess) {\
printf("At ... |
d654bdeca448d1a413a7cc87ccc3b4b7f18a965d.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Discrete Cosine/Sine Transform(DCT/DST and IDCT/IDST one to four-all in one)
* DCT/DST and IDCT/IDST I ---> IV
* This CUDA code can handle/work with any type of the input mxArrays,
* GPUarray or standard matlab CPU array as input {prhs[0] := mxGPUAr... | d654bdeca448d1a413a7cc87ccc3b4b7f18a965d.cu |
/*
* Discrete Cosine/Sine Transform(DCT/DST and IDCT/IDST one to four-all in one)
* DCT/DST and IDCT/IDST I ---> IV
* This CUDA code can handle/work with any type of the input mxArrays,
* GPUarray or standard matlab CPU array as input {prhs[0] := mxGPUArray or CPU Array}
* GpuArray/cpuArray output, B=Discrete_T... |
464e3d1584f0013dfda51116d9aaaf21bd91bc13.hip | // !!! This is a file automatically generated by hipify!!!
#include "lab08.cuh"
#include <iostream>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <iterator>
#include <cstdio>
#include "MPI_dummy_helper.hpp"
#include "dummy_helper.cuh"
#include <mpi.h>
#inclu... | 464e3d1584f0013dfda51116d9aaaf21bd91bc13.cu | #include "lab08.cuh"
#include <iostream>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <iterator>
#include <cstdio>
#include "MPI_dummy_helper.hpp"
#include "dummy_helper.cuh"
#include <mpi.h>
#include <cuda_runtime.h>
#include <thrust/device_vector.h>
#inc... |
21a2390523ec5438ddf21ad9d91b04ae044ec944.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2018-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... | 21a2390523ec5438ddf21ad9d91b04ae044ec944.cu | /*
* Copyright (c) 2018-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
2b375ca1064061439fdc87fb32d664cc9434d26e.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include "utils.h"
static void swap_boards(bboard** a, bboard** b) {
bboard* t;
t = *a;
*a = *b;
*b = t;
}
static inline void cudaCheckErrors(const char msg[], con... | 2b375ca1064061439fdc87fb32d664cc9434d26e.cu | #include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <cuda_runtime.h>
#include "utils.h"
static void swap_boards(bboard** a, bboard** b) {
bboard* t;
t = *a;
*a = *b;
*b = t;
}
static inline void cudaCheckErrors(const char msg[], const char file[], int line) {
do {
cudaError_t __err = cud... |
7585ae37db845c3d72867067b861aa6c2cf3e14f.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* ******************************************************************************
*
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
*... | 7585ae37db845c3d72867067b861aa6c2cf3e14f.cu | /* ******************************************************************************
*
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed wit... |
c3188cd3f334ac6d986d1f375d9a8801292d5b80.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "poisson2d.hpp"
#include "timer.hpp"
#include <algorithm>
#include <cmath>
#include <vector>
#include <iostream>
#include <fstream>
#include <stdio.h>
// Block and grid size defines.
// Seperate defines are really just f... | c3188cd3f334ac6d986d1f375d9a8801292d5b80.cu | #include "poisson2d.hpp"
#include "timer.hpp"
#include <algorithm>
#include <cmath>
#include <vector>
#include <iostream>
#include <fstream>
#include <stdio.h>
// Block and grid size defines.
// Seperate defines are really just for future convenience...
#define CSV_NAME "fd_data_ph.csv"
#define BLOCK_SIZE 256
#defin... |
96bb668fecc8b0a34b7650aef53cc31e3a01ee28.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 "ge_fmin.cu"
#include<chrono>
#include<iostream>
using namespace ... | 96bb668fecc8b0a34b7650aef53cc31e3a01ee28.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 "ge_fmin.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{... |
9dc24335940e31d15412f59d6fc8dc41080fd2fa.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Homework 1
// Color to Greyscale Conversion
//A common way to represent color images is known as RGBA - the color
//is specified by how much Red, Green, and Blue is in it.
//The 'A' stands for Alpha and is used for transparency;... | 9dc24335940e31d15412f59d6fc8dc41080fd2fa.cu | // Homework 1
// Color to Greyscale Conversion
//A common way to represent color images is known as RGBA - the color
//is specified by how much Red, Green, and Blue is in it.
//The 'A' stands for Alpha and is used for transparency; it will be
//ignored in this homework.
//Each channel Red, Blue, Green, and Alpha is r... |
fdde141701ec6aef7c1c0271fc242e3b55fa093c.hip | // !!! This is a file automatically generated by hipify!!!
#define TORCH_ASSERT_NO_OPERATORS
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/OpMathType.h>
#include <ATen/native/DispatchStub.h>
#include <ATen/native/TensorIterator.h>
#include <ATen/native/UnaryOps.h>
#include <ATen/native/hip/... | fdde141701ec6aef7c1c0271fc242e3b55fa093c.cu | #define TORCH_ASSERT_NO_OPERATORS
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/OpMathType.h>
#include <ATen/native/DispatchStub.h>
#include <ATen/native/TensorIterator.h>
#include <ATen/native/UnaryOps.h>
#include <ATen/native/cuda/Loops.cuh>
#include <ATen/native/cuda/Math.cuh>
#include <... |
0aabe3737781088e5bd99eb7585f5670858e5ccb.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "hiprand/hiprand.h"
#include "rocblas.h"
extern "C" {
#include "activations.h"
#include "hip/hip_runtime.h"
}
__device__ float lhtan_activate_kernel(float x)
{
if(x < 0) return .001f*x;
if(x > 1) return .001f*(x-... | 0aabe3737781088e5bd99eb7585f5670858e5ccb.cu | #include "cuda_runtime.h"
#include "curand.h"
#include "cublas_v2.h"
extern "C" {
#include "activations.h"
#include "cuda.h"
}
__device__ float lhtan_activate_kernel(float x)
{
if(x < 0) return .001f*x;
if(x > 1) return .001f*(x-1.f) + 1.f;
return x;
}
__device__ float lhtan_gradient_kernel(float x)
{
... |
cea0c13cd26ca3f60b0282fd86998ff9879d87fd.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2018-2020, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... | cea0c13cd26ca3f60b0282fd86998ff9879d87fd.cu | /*
* Copyright (c) 2018-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... |
e7cacdf5b5cf51aec7f2311495798bd46feed089.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/li... | e7cacdf5b5cf51aec7f2311495798bd46feed089.cu | /*
* Copyright (c) 2021, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... |
46f79151561d71aa56d4bbc76da3b4e6567b4772.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifndef ACTIVATION_H
#define ACTIVATION_H
#include <iostream>
#include <string>
#include <stdio.h>
#include "Matrix.hip"
// En cada gradiente agregue el termino d_in[i]
// No se si esta bien
// Se supone que me ahorro un paso con ... | 46f79151561d71aa56d4bbc76da3b4e6567b4772.cu | #ifndef ACTIVATION_H
#define ACTIVATION_H
#include <iostream>
#include <string>
#include <stdio.h>
#include "Matrix.cu"
// En cada gradiente agregue el termino d_in[i]
// No se si esta bien
// Se supone que me ahorro un paso con eso porque es el
// gradiente de la activacion
/* ----------------------------
Activat... |
6e4d8157bb371c5cf3464c3f2eda05194ad2aa1a.hip | // !!! This is a file automatically generated by hipify!!!
#define GLM_FORCE_CUDA
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include "common.h"
#include "naive.h"
namespace StreamCompaction {
namespace Naive {
using StreamCompaction::Common::PerformanceTimer;
PerformanceTimer& time... | 6e4d8157bb371c5cf3464c3f2eda05194ad2aa1a.cu | #define GLM_FORCE_CUDA
#include <cuda.h>
#include <cuda_runtime.h>
#include "common.h"
#include "naive.h"
namespace StreamCompaction {
namespace Naive {
using StreamCompaction::Common::PerformanceTimer;
PerformanceTimer& timer()
{
static PerformanceTimer timer;
retu... |
bb7e3a75c69382aa60c642780998c8c7642f1313.hip | // !!! This is a file automatically generated by hipify!!!
#include "THHUNN.h"
#include "common.h"
#include "TH/THHalf.h"
#include "THHHalfAutoNumerics.cuh"
#include "THHThrustAllocator.cuh"
#include "THHApply.cuh"
#include <thrust/fill.h>
#include <thrust/functional.h>
#include <thrust/device_ptr.h>
#include <thrust/... | bb7e3a75c69382aa60c642780998c8c7642f1313.cu | #include "THCUNN.h"
#include "common.h"
#include "TH/THHalf.h"
#include "THCHalfAutoNumerics.cuh"
#include "THCThrustAllocator.cuh"
#include "THCApply.cuh"
#include <thrust/fill.h>
#include <thrust/functional.h>
#include <thrust/device_ptr.h>
#include <thrust/reduce.h>
#include <thrust/inner_product.h>
#if CUDA_VERSIO... |
d19b8b3d801098062a92308fc17380e642ccf995.hip | // !!! This is a file automatically generated by hipify!!!
#include "FreeImage.h"
#include "stdio.h"
#define DIM 2000
struct hipComplex{
float r;
float i;
hipComplex( float a, float b) : r(a), i(b) {};
float magnitude2(void) { return r*r + i*i; }
hipComplex operator*(const ... | d19b8b3d801098062a92308fc17380e642ccf995.cu | #include "FreeImage.h"
#include "stdio.h"
#define DIM 2000
struct cuComplex{
float r;
float i;
cuComplex( float a, float b) : r(a), i(b) {};
float magnitude2(void) { return r*r + i*i; }
cuComplex operator*(const cuComplex& a) {
return cuComplex( r * a.r - i ... |
8a9b3ae46112fdad40c756757bf31f539f9e6ddb.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "caffe/layers/reorg_layer.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <typename Dtype>
__global__ void reorg_kernel(const Dtype *x, int w, int h, int c, int batch, int stride, int forward, Dtyp... | 8a9b3ae46112fdad40c756757bf31f539f9e6ddb.cu | #include "caffe/layers/reorg_layer.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <typename Dtype>
__global__ void reorg_kernel(const Dtype *x, int w, int h, int c, int batch, int stride, int forward, Dtype *out)
{
int size = batch * c * h * w;
int i = (blockIdx.x + blockIdx.y * gridDim.x... |
19358aff349c4071339e1ca59da9b3302ef50b4a.hip | // !!! This is a file automatically generated by hipify!!!
/* Copyright (c) 2011-2016, Robert Wang, email: robertwgh (at) gmail.com
All rights reserved. https://github.com/robertwgh/cuLDPC
Implementation of LDPC decoding algorithm.
The details of implementation can be found from the following papers:
1. Wang... | 19358aff349c4071339e1ca59da9b3302ef50b4a.cu | /* Copyright (c) 2011-2016, Robert Wang, email: robertwgh (at) gmail.com
All rights reserved. https://github.com/robertwgh/cuLDPC
Implementation of LDPC decoding algorithm.
The details of implementation can be found from the following papers:
1. Wang, G., Wu, M., Sun, Y., & Cavallaro, J. R. (2011, June). A m... |
10f599b48bf70e799a8a3847334b3e8a17cfe6f5.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "main.cuh"
int main(int argc, char** argv){
std::string image_filename("images/Carre.pgm");
int iter = 100;
int size = 1024*1024;
if ( argc > 2 ) {
image_filename = argv[1];
iter = atoi(arg... | 10f599b48bf70e799a8a3847334b3e8a17cfe6f5.cu | #include "main.cuh"
int main(int argc, char** argv){
std::string image_filename("images/Carre.pgm");
int iter = 100;
int size = 1024*1024;
if ( argc > 2 ) {
image_filename = argv[1];
iter = atoi(argv[2]);
}
if( argc > 3 ){
size = atoi(argv[3]);
size = size*size;... |
27991c864b0ff704fa2d3e7436b051d4bf6bba51.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property and
* proprietary rights in and to this software and related documentation.
* Any use, reproduction, disclosure, ... | 27991c864b0ff704fa2d3e7436b051d4bf6bba51.cu | /*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property and
* proprietary rights in and to this software and related documentation.
* Any use, reproduction, disclosure, or distribution of this software
* and related documentat... |
7a0cdad3a9372af98ae2983c03bd9d8f1362b520.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 "stream_compaction/common.h"
#include "stream_compaction/efficient.h"
#include "stream_compaction/radi... | 7a0cdad3a9372af98ae2983c03bd9d8f1362b520.cu |
#include <cuda.h>
#include <cuda_runtime.h>
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <thrust/scan.h>
#include "stream_compaction/common.h"
#include "stream_compaction/efficient.h"
#include "stream_compaction/radix.h"
typedef int var_t;
#define blocksize 128
namespace StreamCompacti... |
ad1794b1818f71fb1ef55f221c52321d5abf4569.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "Copyright.h"
#include "Macro.h"
#include "CUPOT.h"
#ifdef GAMER_DEBUG
#include <stdio.h>
#endif
#if ( defined GRAVITY && defined GPU && POT_SCHEME == MG )
#define POT_NXT_F ( PATCH_SIZE+2*POT_GHOST_SIZE )
#de... | ad1794b1818f71fb1ef55f221c52321d5abf4569.cu | #include "Copyright.h"
#include "Macro.h"
#include "CUPOT.h"
#ifdef GAMER_DEBUG
#include <stdio.h>
#endif
#if ( defined GRAVITY && defined GPU && POT_SCHEME == MG )
#define POT_NXT_F ( PATCH_SIZE+2*POT_GHOST_SIZE )
#define POT_NTHREAD ( POT_BLOCK_SIZE_X )
#define POT_USELESS ( POT_GHOST_SIZE%... |
a7981cc05ae73e607c796e58ca6b9912f4640ea4.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "kernel_hip.cuh"
__device__ float3 body_body_interaction(const CUParticle pi,
const CUParticle pj) {
static const float D = 420;
static const float epsilon = 47.0975;
static co... | a7981cc05ae73e607c796e58ca6b9912f4640ea4.cu | #include "kernel.cuh"
__device__ float3 body_body_interaction(const CUParticle pi,
const CUParticle pj) {
static const float D = 420;
static const float epsilon = 47.0975;
static const float M[4] = {1.9549e20, 7.4161e19};
static const float K[4] = {5.8228e14, 2.29114e14}... |
f9501ba1741a47f7778e2d197c7c0793ef802f2c.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <iostream>
#include <hip/hip_runtime.h>
#include <string.h>
/*
* compile: nvcc .\vecadd.cu -o vecadd
* run: ./vecadd <int: size of the vector> <int: block size>
*/
int *a, *b; // host data... | f9501ba1741a47f7778e2d197c7c0793ef802f2c.cu | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <iostream>
#include <cuda.h>
#include <string.h>
/*
* compile: nvcc .\vecadd.cu -o vecadd
* run: ./vecadd <int: size of the vector> <int: block size>
*/
int *a, *b; // host data
int *c, *c2; // results
int sample_size = 10;
double time_d = 0;
do... |
19752c628a0379e43cb94f6d4a73443337be741f.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
extern "C"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <rocblas.h>
__device__ float merge(float old,float opOutput,float *extraParams) {
return fmaxf(old,opOutput);
}
__device__ float update(float old... | 19752c628a0379e43cb94f6d4a73443337be741f.cu | extern "C"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <cublas_v2.h>
__device__ float merge(float old,float opOutput,float *extraParams) {
return fmaxf(old,opOutput);
}
__device__ float update(float old,float opOutput,float *extraParams) {
return fmaxf(old,opOutput);
}
__device_... |
76b3257d1299e89d5c13477c9ef2f6106fbec719.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
extern "C" {
}
__global__ void axpy_kernel(int N, float ALPHA, float *X, int OFFX, int INCX, float *Y, int OFFY, int INCY)
{
int i = (blockIdx.x + blockIdx.y*gridDim.x) * blockDim.x + threadIdx.x;
if(i < N)... | 76b3257d1299e89d5c13477c9ef2f6106fbec719.cu | #include "includes.h"
extern "C" {
}
__global__ void axpy_kernel(int N, float ALPHA, float *X, int OFFX, int INCX, float *Y, int OFFY, int INCY)
{
int i = (blockIdx.x + blockIdx.y*gridDim.x) * blockDim.x + threadIdx.x;
if(i < N) Y[OFFY+i*INCY] += ALPHA*X[OFFX+i*INCX];
} |
58e824982a4a9471ec765982a11f025455005c33.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include<iostream>
#include<vector>
#include"Geometry.h"
#include"PathTracing.cuh"
//__global__ void KernelInit()
//{
//
//}
void PathTracer::Init()
{
std::cout << "Path Tracer Initialized" << std::endl;
}
| 58e824982a4a9471ec765982a11f025455005c33.cu | #include<iostream>
#include<vector>
#include"Geometry.h"
#include"PathTracing.cuh"
//__global__ void KernelInit()
//{
//
//}
void PathTracer::Init()
{
std::cout << "Path Tracer Initialized" << std::endl;
}
|
17e81836c9277a25e258cad6fb58051a608529f7.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <cstdio>
#include <ctime>
#include <vector>
#include <algorithm>
#include <stdlib.h>
// utilities
#include <helper_cuda.h>
#include <time.h>
///////////per request timing. L1 enabled. P100.
///////////For the second iterat... | 17e81836c9277a25e258cad6fb58051a608529f7.cu | #include <cstdio>
#include <ctime>
#include <vector>
#include <algorithm>
#include <stdlib.h>
// utilities
#include <helper_cuda.h>
#include <time.h>
///////////per request timing. L1 enabled. P100.
///////////For the second iteration, after data size 1gb, L2 tlb misses sparsely appear.
///////////After data size 512M... |
a8e5b517368d2c46cd29c935933639be4a178c14.hip | // !!! This is a file automatically generated by hipify!!!
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org... | a8e5b517368d2c46cd29c935933639be4a178c14.cu | /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
dfc4e29f04b92ee0f06434524029930ce2c0614a.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "myhelpers.h"
#include "d2func.h"
#include "d3func.h"
#include "Globalvars.h"
#include "Enfunc.h"
#include "Gradfunc.h"
#include "ConGradfunc.h"
double unitrand() {... | dfc4e29f04b92ee0f06434524029930ce2c0614a.cu | #include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "myhelpers.h"
#include "d2func.h"
#include "d3func.h"
#include "Globalvars.h"
#include "Enfunc.h"
#include "Gradfunc.h"
#include "ConGradfunc.h"
double unitrand() {
/*
* Arguments: none
* Returns: a "random" number between 0 and 1
*/
return (((... |
66dca0a85858b499cb817e6dcb9df25d240efa04.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <math.h>
#include "for_use_GPU.h"
#include "calc_feature_conf.h"
#include "switch_release.h"
#include "switch_float.h"
/* declaration of texture memory */
//texture<FLOAT> A;
//texture<FLOAT> B;
texture<... | 66dca0a85858b499cb817e6dcb9df25d240efa04.cu | #include <stdio.h>
#include <math.h>
#include "for_use_GPU.h"
#include "calc_feature_conf.h"
#include "switch_release.h"
#include "switch_float.h"
/* declaration of texture memory */
//texture<FLOAT> A;
//texture<FLOAT> B;
texture<float, cudaTextureType1D, cudaReadModeElementType> A;
texture<float, cudaTextureType1D, ... |
98ff8129f90917541da8d354385f0c618c5a2c78.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifndef VIENNACL_LINALG_CUDA_DIRECT_SOLVE_HPP
#define VIENNACL_LINALG_CUDA_DIRECT_SOLVE_HPP
/* =========================================================================
Copyright (c) 2010-2016, Institute for Microelectronics,
... | 98ff8129f90917541da8d354385f0c618c5a2c78.cu | #ifndef VIENNACL_LINALG_CUDA_DIRECT_SOLVE_HPP
#define VIENNACL_LINALG_CUDA_DIRECT_SOLVE_HPP
/* =========================================================================
Copyright (c) 2010-2016, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
... |
69a8bc2974a635b1c9a88b8030021dd9b9902ff4.hip | // !!! This is a file automatically generated by hipify!!!
//pass
//--blockDim=64 --gridDim=64 --no-inline
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <assert.h>
#define DIM 2 //64
#define N 2// DIM*DIM
typedef struct {
float x,y,z,w;
} myfloat4;
__global__ void k(float * i0) {
myfloat4 f4;
f4.x ... | 69a8bc2974a635b1c9a88b8030021dd9b9902ff4.cu | //pass
//--blockDim=64 --gridDim=64 --no-inline
#include <cuda.h>
#include <stdio.h>
#include <assert.h>
#define DIM 2 //64
#define N 2// DIM*DIM
typedef struct {
float x,y,z,w;
} myfloat4;
__global__ void k(float * i0) {
myfloat4 f4;
f4.x = 2;
i0[threadIdx.x + blockDim.x*blockIdx.x] = f4.x;
}
int main(){
... |
matMultGPU.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <cstdlib>
#include <iostream>
using namespace std;
hipEvent_t start, stop;
void startKernelTime (void) {
hipEventCreate(&start);
hipEventCreate(&stop);
hipEventRecord(start);
}
void stopKernelTime (void) {
hipEvent... | matMultGPU.cu | #include <cstdlib>
#include <iostream>
using namespace std;
cudaEvent_t start, stop;
void startKernelTime (void) {
cudaEventCreate(&start);
cudaEventCreate(&stop);
cudaEventRecord(start);
}
void stopKernelTime (void) {
cudaEventRecord(stop);
cudaEventSynchronize(stop);
float milliseconds = 0;
cudaEventElap... |
a52ebe05f730d698cf0db02738b1798ed2612e1c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* Copyright 2015 Netherlands eScience Center, VU University Amsterdam, and Netherlands Forensic Institute
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with t... | a52ebe05f730d698cf0db02738b1798ed2612e1c.cu | /*
* Copyright 2015 Netherlands eScience Center, VU University Amsterdam, and Netherlands Forensic Institute
*
* 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... |
2296d1419fd969c6251ec0fd1c190ab8dfb20121.hip | // !!! This is a file automatically generated by hipify!!!
#include "THHHalf.h"
#include "THHThrustAllocator.cuh"
#include <thrust/transform.h>
#include <thrust/execution_policy.h>
struct __half2floatOp {
__device__ float operator()(half v) { return __half2float(v); }
};
struct __float2halfOp {
__device__ half op... | 2296d1419fd969c6251ec0fd1c190ab8dfb20121.cu | #include "THCHalf.h"
#include "THCThrustAllocator.cuh"
#include <thrust/transform.h>
#include <thrust/execution_policy.h>
struct __half2floatOp {
__device__ float operator()(half v) { return __half2float(v); }
};
struct __float2halfOp {
__device__ half operator()(float v) { return __float2half(v); }
};
void THCF... |
d02a3af50ecca6f0a4164802898a540c1f5d080d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* Copyright 1993-2006 NVIDIA Corporation. All rights reserved.
*
* NOTICE TO USER:
*
* This source code is subject to NVIDIA ownership rights under U.S. and
* international Copyright laws.
*
* This software and the information c... | d02a3af50ecca6f0a4164802898a540c1f5d080d.cu | /*
* Copyright 1993-2006 NVIDIA Corporation. All rights reserved.
*
* NOTICE TO USER:
*
* This source code is subject to NVIDIA ownership rights under U.S. and
* international Copyright laws.
*
* This software and the information contained herein is PROPRIETARY and
* CONFIDENTIAL to NVIDIA and is being provided under ... |
f2995a4977d5bf38be8fce91fb8abd0aaa80e842.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Copyright (c) 2020-2021, NVIDIA CORPORATION & AFFILIATES. 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 o... | f2995a4977d5bf38be8fce91fb8abd0aaa80e842.cu | // Copyright (c) 2020-2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
/... |
db9c88175ae11b4d9633088beb15dde331e805e9.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#pragma once
#include "pcuditas/gpu/gpu_array.cu"
template<class ParticleT, class EnvironmentT>
__global__
void update_forces_shared_kernel(
ParticleT *particles, int n_particles,
EnvironmentT *env_ptr) {
ex... | db9c88175ae11b4d9633088beb15dde331e805e9.cu | #pragma once
#include "pcuditas/gpu/gpu_array.cu"
template<class ParticleT, class EnvironmentT>
__global__
void update_forces_shared_kernel(
ParticleT *particles, int n_particles,
EnvironmentT *env_ptr) {
extern __shared__ ParticleT particles_sh[];
using vector_t = typename ParticleT::vecto... |
300fa87ddade014a602945fa1b50475abebe52c1.hip | // !!! This is a file automatically generated by hipify!!!
#pragma once
#include <stdio.h>
#include <stdexcept>
#include "poollayer.h"
#include "hip/hip_runtime.h"
#include "math.h"
#include "device_launch_parameters.h"
#include <hip/device_functions.h>
#include <hip/hip_runtime.h>
#include <hip/hip_runtime_api.h>
_... | 300fa87ddade014a602945fa1b50475abebe52c1.cu | #pragma once
#include <stdio.h>
#include <stdexcept>
#include "poollayer.h"
#include "cuda_runtime.h"
#include "math.h"
#include "device_launch_parameters.h"
#include <device_functions.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
__global__ void PoolLayer_Forward_cu(double *previousLayerForward, double *out, i... |
93dc6db535920d6349d52128e22262cd45892914.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Re... | 93dc6db535920d6349d52128e22262cd45892914.cu | /* Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of ... |
c149689c227c32449077e27f99bec44d96051186.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "star3d1r-32x32-7-128_kernel.hu"
__device__ float __sbref_wrap(float *sb, size_t index) { return sb[index]; }
__global__ void kernel0_7(float *A, int dimsize, int timestep, int c0)
{
#ifndef AN5D_TYPE
#define AN5D_TYPE uns... | c149689c227c32449077e27f99bec44d96051186.cu | #include "star3d1r-32x32-7-128_kernel.hu"
__device__ float __sbref_wrap(float *sb, size_t index) { return sb[index]; }
__global__ void kernel0_7(float *A, int dimsize, int timestep, int c0)
{
#ifndef AN5D_TYPE
#define AN5D_TYPE unsigned
#endif
const AN5D_TYPE __c0Len = (timestep - 0);
const AN5D_TYPE __c0Pad =... |
cdb4f2302fa934c2746a6eca52580b529eac75a0.hip | // !!! This is a file automatically generated by hipify!!!
#include "deform.cuh"
#include <npp.h>
deform::deform(size_t ntheta, size_t nz, size_t n, size_t ptheta, size_t ngpus) :
ntheta(ntheta), nz(nz), n(n), ptheta(ptheta), ngpus(ngpus)
{
cstreams = new hipStream_t[ptheta*ngpus];
nstreams = new NppStreamContext[p... | cdb4f2302fa934c2746a6eca52580b529eac75a0.cu | #include "deform.cuh"
#include <npp.h>
deform::deform(size_t ntheta, size_t nz, size_t n, size_t ptheta, size_t ngpus) :
ntheta(ntheta), nz(nz), n(n), ptheta(ptheta), ngpus(ngpus)
{
cstreams = new cudaStream_t[ptheta*ngpus];
nstreams = new NppStreamContext[ptheta*ngpus];
for (int igpu=0;igpu<ngpus;igpu++)
{
cud... |
14d14e30a1abadc9c053bbb3d24090da6bbe4f1a.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... | 14d14e30a1abadc9c053bbb3d24090da6bbe4f1a.cu | /*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
0664ae5707a3b3a10a5a0b2215aa370962d27030.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <ATen/ATen.h>
#include <ATen/hip/HIPApplyUtils.cuh>
#include <ATen/hip/HIPContext.h>
#include <ATen/NativeFunctions.h>
#include <ATen/TensorUtils.h>
#include <ATen/Utils.h>
// keeping THC headers for gpuAtomicAdd
#include <... | 0664ae5707a3b3a10a5a0b2215aa370962d27030.cu | #include <ATen/ATen.h>
#include <ATen/cuda/CUDAApplyUtils.cuh>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/NativeFunctions.h>
#include <ATen/TensorUtils.h>
#include <ATen/Utils.h>
// keeping THC headers for gpuAtomicAdd
#include <THC/THCAtomics.cuh>
#include <thrust/pair.h>
namespace at {
namespace native {
nam... |
65ba7c094a0cace7887801925893c114f87b33db.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2019-2020, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... | 65ba7c094a0cace7887801925893c114f87b33db.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... |
e18f8f4d3bf4edad074015c3a992280232696fb6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#define N 512
#define BLOCK_DIM 32
#include<stdio.h>
int a[N][N], b[N][N], c[N][N];
__global__ void add(int *a, int *b, int *c){
int row = threadIdx.x + blockDim.x * blockIdx.x;
int col = threadIdx.y + blockDim.y * blockIdx.... | e18f8f4d3bf4edad074015c3a992280232696fb6.cu | #define N 512
#define BLOCK_DIM 32
#include<stdio.h>
int a[N][N], b[N][N], c[N][N];
__global__ void add(int *a, int *b, int *c){
int row = threadIdx.x + blockDim.x * blockIdx.x;
int col = threadIdx.y + blockDim.y * blockIdx.y;
c[row][col] = a[row][col] + b[row][col];
}
int main(){
int *dev_a, *dev... |
a577ad35cb57b8cdcbb21020d37aa44700f4dad5.hip | // !!! This is a file automatically generated by hipify!!!
#include "object/material/checkerboard_material.hpp"
using namespace px;
BaseCheckerboardMaterial::BaseCheckerboardMaterial(Light const &ambient,
Light const &diffuse,
... | a577ad35cb57b8cdcbb21020d37aa44700f4dad5.cu | #include "object/material/checkerboard_material.hpp"
using namespace px;
BaseCheckerboardMaterial::BaseCheckerboardMaterial(Light const &ambient,
Light const &diffuse,
Light const &specular,
... |
53576fe0ecaf962173ffdca98cd4e0d78b10941b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifndef __LLSGPU_SOLVER_KERNEL_CU__
#define __LLSGPU_SOLVER_KERNEL_CU__
#define THETA_ACCUM_CNT 180
#define DATA_POINTS 6
#define F 100
#include "util.h"
#include "cudautil.h"
typedef struct {
int x;
int y;
} edge_pixel_t;
typ... | 53576fe0ecaf962173ffdca98cd4e0d78b10941b.cu | #ifndef __LLSGPU_SOLVER_KERNEL_CU__
#define __LLSGPU_SOLVER_KERNEL_CU__
#define THETA_ACCUM_CNT 180
#define DATA_POINTS 6
#define F 100
#include "util.h"
#include "cudautil.h"
typedef struct {
int x;
int y;
} edge_pixel_t;
typedef struct {
int x;
int y;
int a;
int b;
int theta;
} ellipse_t;
cuda_... |
2e57499fb27912a5feeee306fbf1cf70d7a5e759.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void saxpy_float4s_shmem_doublebuffer ( float* y, float* x, float a, clock_t * timer_vals)
{
volatile __shared__ float sdata_x0_0 [COMPUTE_THREADS_PER_CTA];
volatile __shared__ float sdata_x1_0 [COMP... | 2e57499fb27912a5feeee306fbf1cf70d7a5e759.cu | #include "includes.h"
__global__ void saxpy_float4s_shmem_doublebuffer ( float* y, float* x, float a, clock_t * timer_vals)
{
volatile __shared__ float sdata_x0_0 [COMPUTE_THREADS_PER_CTA];
volatile __shared__ float sdata_x1_0 [COMPUTE_THREADS_PER_CTA];
volatile __shared__ float sdata_x2_0 [COMPUTE_THREADS_PER_CTA];
vo... |
aaca8e52beaede943d96c8cc02835d47be7e5df7.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <algorithm>
#include <vector>
#include "caffe/layers/relu6_layer.hpp"
namespace caffe {
template <typename Dtype>
__global__ void ReLU6Forward(const int n, const Dtype* in, Dtype* out,
Dtype negative_slope) {
CUDA_... | aaca8e52beaede943d96c8cc02835d47be7e5df7.cu | #include <algorithm>
#include <vector>
#include "caffe/layers/relu6_layer.hpp"
namespace caffe {
template <typename Dtype>
__global__ void ReLU6Forward(const int n, const Dtype* in, Dtype* out,
Dtype negative_slope) {
CUDA_KERNEL_LOOP(index, n) {
out[index] = in[index] > 0 ? in[index] : in[index] * negativ... |
da1db010f289177594ba31f641440155425fb9c6.hip | // !!! This is a file automatically generated by hipify!!!
/*
* University of Illinois Open Source License
* Copyright 2012-2018 Luthey-Schulten Group,
* All rights reserved.
*
* Developed by: Luthey-Schulten Group
* University of Illinois at Urbana-Champaign
* http://www.scs.uiuc.edu/~schulten
... | da1db010f289177594ba31f641440155425fb9c6.cu | /*
* University of Illinois Open Source License
* Copyright 2012-2018 Luthey-Schulten Group,
* All rights reserved.
*
* Developed by: Luthey-Schulten Group
* University of Illinois at Urbana-Champaign
* http://www.scs.uiuc.edu/~schulten
*
* Permission is hereby granted, free of charge, to any... |
eb7080c7b5cadc9e7346276dcd109292a27a7568.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <assert.h>
// #include <./inc/helper_cuda.h> //use on win 10
#include "helper_cuda.h" // use on linux
//#include "Utilities.cuh"
#include <chrono>
using namespace std;
using namespace std::chr... | eb7080c7b5cadc9e7346276dcd109292a27a7568.cu | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <assert.h>
// #include <./inc/helper_cuda.h> //use on win 10
#include "helper_cuda.h" // use on linux
//#include "Utilities.cuh"
#include <chrono>
using namespace std;
using namespace std::chrono;
#include <cuda_runtime.h>
#include <cusparse_v2.h>
#d... |
88894500a133e43c5b4b41a2a857f7083ae7c415.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifdef WITH_CUDA
#include <cmath>
#include "core/context_cuda.h"
#include "utils/cuda_device.h"
#include "utils/math_functions.h"
#include "utils/cast.h"
namespace dragon {
namespace math {
/******************** Level-0 *******... | 88894500a133e43c5b4b41a2a857f7083ae7c415.cu | #ifdef WITH_CUDA
#include <cmath>
#include "core/context_cuda.h"
#include "utils/cuda_device.h"
#include "utils/math_functions.h"
#include "utils/cast.h"
namespace dragon {
namespace math {
/******************** Level-0 ********************/
template <typename T>
__global__ void _Set(
const int ... |
02fdc1f90cd508d2a1a34da00901569dfc9c52e8.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 <sstream>
#include <fstream>
#include <iostream>
#include <stdlib.h>
#include <math.h>
#include <hip/hip_runtime.h>
#include "changeDatatype.cuh"
usi... | 02fdc1f90cd508d2a1a34da00901569dfc9c52e8.cu | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <device_functions.h>
#include <sstream>
#include <fstream>
#include <iostream>
#include <stdlib.h>
#include <math.h>
#include <cuda.h>
#include "changeDatatype.cuh"
using namespace std;
__global__ void changeType(float* srcData, float* dstData,... |
3347be81e98ca232d0651ae45eaee5f5fa0e374b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#define DATA float
#define BOOL int
#define MAX_ERR 1e-5
//Grid features
#define OPTIMUM_BLOCK_NUM 12
#define BLOCK... | 3347be81e98ca232d0651ae45eaee5f5fa0e374b.cu | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#define DATA float
#define BOOL int
#define MAX_ERR 1e-5
//Grid features
#define OPTIMUM_BLOCK_NUM 12
#define BLOCK_SIDE 16
#define OPTIMUM_BLOCK_NUM_FIRST_LAYER 2
#define BLOC... |
1172e3dfbd3e01a5dfe6d1776b562e1bdd8792b6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void sum4(float *A, float *B, float *C, const int N)
{
int j;
int i = blockIdx.x * blockDim.x + threadIdx.x;
#pragma unroll
for (j=0; j < 4; j++)
if (i < N) {
C[i] = A[i] + B[i];
i += blockDim.x * ... | 1172e3dfbd3e01a5dfe6d1776b562e1bdd8792b6.cu | #include "includes.h"
__global__ void sum4(float *A, float *B, float *C, const int N)
{
int j;
int i = blockIdx.x * blockDim.x + threadIdx.x;
#pragma unroll
for (j=0; j < 4; j++)
if (i < N) {
C[i] = A[i] + B[i];
i += blockDim.x * gridDim.x;
}
} |
5122ae746e37ccabcac9d2a48e98f06512c50c26.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <rocblas.h>
#include "cuda_utils.h"
__device__ int get_system_bid(){
return blockIdx.z*gridDim.y + blockIdx.y;
}
__global__ void cudaRoutineFlat(int offset, float * d_arr){
for (int thread_index... | 5122ae746e37ccabcac9d2a48e98f06512c50c26.cu | #include <stdio.h>
#include <cublas_v2.h>
#include "cuda_utils.h"
__device__ int get_system_bid(){
return blockIdx.z*gridDim.y + blockIdx.y;
}
__global__ void cudaRoutineFlat(int offset, float * d_arr){
for (int thread_index = 0; thread_index < blockDim.x; thread_index++){
if (threadIdx.x == thread_in... |
068a878639f3ffd90653d827a7ab1552447883a6.hip | // !!! This is a file automatically generated by hipify!!!
#define TORCH_ASSERT_NO_OPERATORS
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/OpMathType.h>
#include <ATen/native/DispatchStub.h>
#include <ATen/native/TensorIterator.h>
#include <ATen/native/UnaryOps.h>
#include <ATen/native/hip/... | 068a878639f3ffd90653d827a7ab1552447883a6.cu | #define TORCH_ASSERT_NO_OPERATORS
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/OpMathType.h>
#include <ATen/native/DispatchStub.h>
#include <ATen/native/TensorIterator.h>
#include <ATen/native/UnaryOps.h>
#include <ATen/native/cuda/JitLoops.cuh>
#include <ATen/native/cuda/Loops.cuh>
#inclu... |
c73bc00dcaa6ef2b23514b67790bf11347ff9c76.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*********************************************************************************
* contractions.cu
*
* Sat Jul 2 11:19:43 CEST 2011
*
* PURPOSE:
* TODO:
* DONE:
* CHANGES:
************************************************... | c73bc00dcaa6ef2b23514b67790bf11347ff9c76.cu | /*********************************************************************************
* contractions.cu
*
* Sat Jul 2 11:19:43 CEST 2011
*
* PURPOSE:
* TODO:
* DONE:
* CHANGES:
*********************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <str... |
4138ee884d5aaa7f0e932dbd5fdb0bc7bde626c9.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <device_launch_parameters.h>
#include <hip/hip_runtime_api.h>
#include <vector>
#include <stdio.h>
#include <vector_functions.h>
#include <cmath>
#include "isosurfaces_cuda/hdr/common.h"
#include "isosurfaces_cuda/hdr/helpe... | 4138ee884d5aaa7f0e932dbd5fdb0bc7bde626c9.cu | #include <cuda.h>
#include <device_launch_parameters.h>
#include <cuda_runtime_api.h>
#include <vector>
#include <stdio.h>
#include <vector_functions.h>
#include <cmath>
#include "isosurfaces_cuda/hdr/common.h"
#include "isosurfaces_cuda/hdr/helper_cuda.h"
#include <unistd.h>
#include "isosurfaces_cuda/hdr/common.h"
u... |
df430b30a673accec38b47b8cd63401015a1eb8b.hip | // !!! This is a file automatically generated by hipify!!!
// CUDA solver for Rayleigh Plesset
#include "bubbles.h"
#include "bubble_CUDA.h"
#include "bubble_CUDA_kernel.cuh"
using namespace thrust;
host_vector<double2> focalpoint;
host_vector<double2> control;
// Mathematical constants
const double Pi_h = acos... | df430b30a673accec38b47b8cd63401015a1eb8b.cu | // CUDA solver for Rayleigh Plesset
#include "bubbles.h"
#include "bubble_CUDA.h"
#include "bubble_CUDA_kernel.cuh"
using namespace thrust;
host_vector<double2> focalpoint;
host_vector<double2> control;
// Mathematical constants
const double Pi_h = acos(-1.0);
const double Pi4r3_h = Pi_h * 4.0/3.0;
mixture_t m... |
55fc8ec29b11c4c73813f30eddaeb37dd6d564a7.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "affine_2d_cuda_kernel.cuh"
using namespace at;
void Affine2DForwardCUDAKernelLauncher(
const at::Tensor features, const at::Tensor rois, const float spatial_scale,
const int sampling_ratio, const bool aligned, co... | 55fc8ec29b11c4c73813f30eddaeb37dd6d564a7.cu | #include "affine_2d_cuda_kernel.cuh"
using namespace at;
void Affine2DForwardCUDAKernelLauncher(
const at::Tensor features, const at::Tensor rois, const float spatial_scale,
const int sampling_ratio, const bool aligned, const int order,
const int channels,
const int height, const int width,
const ... |
a02dcce59fd59709ed3e0881d3da7a89f684ed2e.hip | // !!! This is a file automatically generated by hipify!!!
#include <iostream>
#include <mpi.h>
#define GPU_DIRECT_MPI
int main(int argc, char *argv[]) {
MPI_Init(&argc, &argv);
int mpiSize = 0;
int mpiRank = 0;
MPI_Status mpiStatus;
MPI_Comm_size(MPI_COMM_WORLD, &mpiSize);
MPI_Comm_rank(MPI_COMM_WORLD... | a02dcce59fd59709ed3e0881d3da7a89f684ed2e.cu | #include <iostream>
#include <mpi.h>
#define GPU_DIRECT_MPI
int main(int argc, char *argv[]) {
MPI_Init(&argc, &argv);
int mpiSize = 0;
int mpiRank = 0;
MPI_Status mpiStatus;
MPI_Comm_size(MPI_COMM_WORLD, &mpiSize);
MPI_Comm_rank(MPI_COMM_WORLD, &mpiRank);
if (mpiRank == 0) {
std::cout << "Runni... |
6542176697d6057f1e2cd0118a7a8ec9f4651bbd.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "ctranslate2/ops/mean.h"
#include <hipcub/hipcub.hpp>
#include "type_dispatch.h"
#include "cuda/helpers.h"
namespace ctranslate2 {
namespace ops {
constexpr dim_t num_threads = 256;
template <typename T, type... | 6542176697d6057f1e2cd0118a7a8ec9f4651bbd.cu | #include "ctranslate2/ops/mean.h"
#include <cub/block/block_reduce.cuh>
#include "type_dispatch.h"
#include "cuda/helpers.h"
namespace ctranslate2 {
namespace ops {
constexpr dim_t num_threads = 256;
template <typename T, typename AccumT>
__global__ void mean_kernel(const T* input,
... |
ad0133c40840820a66fe6c00445f51b111eb96d9.hip | // !!! This is a file automatically generated by hipify!!!
// ATIVIDADE 7 - PROGRAMACAO EM CUDA
// Ana Julia de Oliveira Bellini - RA 111.774
// Willian Dihanster Gomes de Oliveira - RA 112.269
#include <stdio.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <sys/time.h>
#define tam 1.0
#define dx 0.00001... | ad0133c40840820a66fe6c00445f51b111eb96d9.cu | // ATIVIDADE 7 - PROGRAMACAO EM CUDA
// Ana Julia de Oliveira Bellini - RA 111.774
// Willian Dihanster Gomes de Oliveira - RA 112.269
#include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <sys/time.h>
#define tam 1.0
#define dx 0.00001
#define dt 0.000001
#define T 0.01
#define kappa 0.000045
#define THR... |
78dacda874c1f0fcec8256cb86a893a2d03af931.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... | 78dacda874c1f0fcec8256cb86a893a2d03af931.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... |
58628420f685cc9efcb21807cf82761aeb2cdbd1.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 "elementwise_1D_1D_add.cu"
#include<chrono>
#include<iostream>
us... | 58628420f685cc9efcb21807cf82761aeb2cdbd1.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 "elementwise_1D_1D_add.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16... |
0ddf7af762cd5cc2922d8b630f9c605c984d1e15.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <stdlib.h>
//void test(const double *ourplay_x, const double *ourplay_y, const double *ourplay_dir, const double *ourplay_vx, const double *ourplay_vy, const double *... | 0ddf7af762cd5cc2922d8b630f9c605c984d1e15.cu | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <stdlib.h>
//void test(const double *ourplay_x, const double *ourplay_y, const double *ourplay_dir, const double *ourplay_vx, const double *ourplay_vy, const double *ourplay_vr, unsigned int size);
void test(const double *ourpl... |
0bfd59ffab1d9211e88669a61bb7d10c775006b3.hip | // !!! This is a file automatically generated by hipify!!!
// Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http:/... | 0bfd59ffab1d9211e88669a61bb7d10c775006b3.cu | // Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required ... |
55eb522bc7c21b3cf7c6ec0a0ef4f248c52d4e44.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <stdio.h>
#define N 256
__global__ void matrix_vector_multi_gpu_1_1(float *A_d, float *B_d, float *C_d)
{
int i,j;
for(j=0;j<N;j++){
A_d[j] = 0.0F;
for(i=0;i<N;i++) {
A_d[j] = A_d[j]+B_d[j*N+i]*C_d[i];
}
}
}... | 55eb522bc7c21b3cf7c6ec0a0ef4f248c52d4e44.cu | #include <cuda_runtime.h>
#include <stdio.h>
#define N 256
__global__ void matrix_vector_multi_gpu_1_1(float *A_d, float *B_d, float *C_d)
{
int i,j;
for(j=0;j<N;j++){
A_d[j] = 0.0F;
for(i=0;i<N;i++) {
A_d[j] = A_d[j]+B_d[j*N+i]*C_d[i];
}
}
}
__global__ void matrix_vector_multi_gpu_1_1_sh(float *A_d, f... |
cc0bbf7357793e30aa65387faed8de223113f43a.hip | // !!! This is a file automatically generated by hipify!!!
#include "opencvcuda.h"
//opncv resize opencv_cudawarpingresize,
using namespace cv;
using namespace cv::cuda;
using namespace cv::cuda::device;
#define BLOCK_X 32
#define BLOCK_Y 8
const dim3 block = dim3(BLOCK_X, BLOCK_Y);
template <typename T>
void resiz... | cc0bbf7357793e30aa65387faed8de223113f43a.cu | #include "opencvcuda.h"
//opncv resize需要引入 opencv_cudawarping,包含几乎各种类型的resize模板,生成出来太大,在这不需要,单独拉出来
using namespace cv;
using namespace cv::cuda;
using namespace cv::cuda::device;
#define BLOCK_X 32
#define BLOCK_Y 8
const dim3 block = dim3(BLOCK_X, BLOCK_Y);
template <typename T>
void resize_gpu(PtrStepSz<T> source... |
ef7b95c31640f3507bb9d89902cbab9344fbbe40.hip | // !!! This is a file automatically generated by hipify!!!
/*
* L3.cu
*
* Created on: Mar 12, 2015
* Author: mvc
*/
#include "L3.h"
L3::L3() {
// TODO Auto-generated constructor stub
}
L3::~L3() {
// TODO Auto-generated destructor stub
}
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#incl... | ef7b95c31640f3507bb9d89902cbab9344fbbe40.cu | /*
* L3.cu
*
* Created on: Mar 12, 2015
* Author: mvc
*/
#include "L3.h"
L3::L3() {
// TODO Auto-generated constructor stub
}
L3::~L3() {
// TODO Auto-generated destructor stub
}
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <dirent.h>
#incl... |
984043382dcc46931a65bbc5bc12217c4af7a7d6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdlib.h>
#include <stdio.h>
#include "histogram.h"
#include "utils.h"
#include <vector>
#include <random>
#include <chrono>
// #include <PAPIProf.h>
#include <omp.h>
#include <string>
#include <algorithm>
#include <thrus... | 984043382dcc46931a65bbc5bc12217c4af7a7d6.cu | #include <stdlib.h>
#include <stdio.h>
#include "histogram.h"
#include "utils.h"
#include <vector>
#include <random>
#include <chrono>
// #include <PAPIProf.h>
#include <omp.h>
#include <string>
#include <algorithm>
#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/copy.h>
using names... |
9619bcb78009ba6e41e8d2ef0e4b7b7dfb3bce11.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/***************************************************************************
*cr
*cr (C) Copyright 2007 The Board of Trustees of the
*cr University of Illinois
*cr All Ri... | 9619bcb78009ba6e41e8d2ef0e4b7b7dfb3bce11.cu | /***************************************************************************
*cr
*cr (C) Copyright 2007 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
********************************************************************... |
13c00f70c3ec7064fc148137409f9ddec98b9148.hip | // !!! This is a file automatically generated by hipify!!!
////////////////////////////////////////////////////////////////////////////
//
// Copyright 1993-2015 NVIDIA Corporation. All rights reserved.
//
// Please refer to the NVIDIA end user license agreement (EULA) associated
// with this source code for terms and... | 13c00f70c3ec7064fc148137409f9ddec98b9148.cu | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 1993-2015 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 u... |
a7e5e4a94e21acf7fa52bac4eb94b1d90f164445.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* part3.cu */
#include "part3_conf.h"
#include "part3_cpu.h"
#include "part3_kernel.cu"
/* ====================== Main =========================== */
int main(int argc, char* argv[])
{
int *A, *A_device, *A_reverse_device, *A... | a7e5e4a94e21acf7fa52bac4eb94b1d90f164445.cu | /* part3.cu */
#include "part3_conf.h"
#include "part3_cpu.h"
#include "part3_kernel.cu"
/* ====================== Main =========================== */
int main(int argc, char* argv[])
{
int *A, *A_device, *A_reverse_device, *A_aux;
int block_number;
A = (int*) malloc(N*sizeof(int));
A_aux = (int*) malloc(N... |
3e91258dd8ccfa18bee246a6967b70216eee2b03.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// RUN: %run_test hipify "%s" "%t" %cuda_args
#include <iostream>
#define TOKEN_PASTE(X, Y) X ## Y
#define ARG_LIST_AS_MACRO a, device_x, device_y
#define KERNEL_CALL_AS_MACROhipLaunchKernelGGL(( axpy<float>), dim3(1), dim3(kData... | 3e91258dd8ccfa18bee246a6967b70216eee2b03.cu | // RUN: %run_test hipify "%s" "%t" %cuda_args
#include <iostream>
#define TOKEN_PASTE(X, Y) X ## Y
#define ARG_LIST_AS_MACRO a, device_x, device_y
#define KERNEL_CALL_AS_MACRO axpy<float><<<1, kDataLen>>>
#define KERNEL_NAME_MACRO axpy<float>
// CHECK: #define COMPLETE_LAUNCH hipLaunchKernelGGL(axpy, dim3(1), dim3(... |
2b15b6f1093e6b80fb0147826dfa215c30fb0c41.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 "selection_sort_gpu.cu"
#include<chrono>
#include<iostream>
using... | 2b15b6f1093e6b80fb0147826dfa215c30fb0c41.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 "selection_sort_gpu.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16... |
879d28ce4cfe500072233371b326cd18af55de82.hip | // !!! This is a file automatically generated by hipify!!!
#include <algorithm>
#include <iostream>
#include <numeric>
#include <array>
#include <vector>
#include <stdlib.h>
#include <random>
#include <thread>
#include <thrust/reduce.h>
#include <thrust/count.h>
#include <thrust/remove.h>
#include <thrust/host_vector... | 879d28ce4cfe500072233371b326cd18af55de82.cu |
#include <algorithm>
#include <iostream>
#include <numeric>
#include <array>
#include <vector>
#include <stdlib.h>
#include <random>
#include <thread>
#include <thrust/reduce.h>
#include <thrust/count.h>
#include <thrust/remove.h>
#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/iter... |
9b5b1361c4401f3316abcbb5e7619706790fd3db.hip | // !!! This is a file automatically generated by hipify!!!
/*-------------------------------------------------------------------------
*
* CUDA functions for ray-voxel intersection based projection
*
* This file has the necesary fucntiosn to perform X-ray CBCT projection
* operation given a geaometry, angles and i... | 9b5b1361c4401f3316abcbb5e7619706790fd3db.cu | /*-------------------------------------------------------------------------
*
* CUDA functions for ray-voxel intersection based projection
*
* This file has the necesary fucntiosn to perform X-ray CBCT projection
* operation given a geaometry, angles and image. It usesthe so-called
* Jacobs algorithm to compute e... |
1d4348b85687f9326000030028485460b4059962.hip | // !!! This is a file automatically generated by hipify!!!
#define FP double
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <stdlib.h>
#include <math.h>
/* Utility function
* print out matrix
* for debug use only*/
void print(FP *a, int n, int m) {
for(int i=0; i<n; i++) {
for(int j=0; j<m; j++) {
p... | 1d4348b85687f9326000030028485460b4059962.cu | #define FP double
#include <stdio.h>
#include <cuda.h>
#include <stdlib.h>
#include <math.h>
/* Utility function
* print out matrix
* for debug use only*/
void print(FP *a, int n, int m) {
for(int i=0; i<n; i++) {
for(int j=0; j<m; j++) {
printf("%.6e ", a[i*m+j]);
}
printf("\n");
}
}
__global__ void gpu... |
25ec46a2c358e958ab2700b850c271b51917c4e6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
Copyright 2022 The Microsoft DeepSpeed Team
*/
#include "conversion_utils.h"
#include "inference_cuda_layers.h"
#include "memory_access_utils.h"
namespace cg = cooperative_groups;
#define MAX_CAP 4
#define MAX_SEQ 2048
inline ... | 25ec46a2c358e958ab2700b850c271b51917c4e6.cu | /*
Copyright 2022 The Microsoft DeepSpeed Team
*/
#include "conversion_utils.h"
#include "inference_cuda_layers.h"
#include "memory_access_utils.h"
namespace cg = cooperative_groups;
#define MAX_CAP 4
#define MAX_SEQ 2048
inline __device__ float gelu(const float x)
{
const float sqrt_param = 0.797884560802865355... |
47ecd17fdefb04395d323905b58260fadf01d3a8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Author: Ross Bearden
Instructor: Dr. Pettey
Class: CSCI 4330
Date: 05/03/17
Purpose: This program will calculate the sum of two matrices using GPUs and the cuda
language to do the calculations
*/
#inclu... | 47ecd17fdefb04395d323905b58260fadf01d3a8.cu | /* Author: Ross Bearden
Instructor: Dr. Pettey
Class: CSCI 4330
Date: 05/03/17
Purpose: This program will calculate the sum of two matrices using GPUs and the cuda
language to do the calculations
*/
#include <stdio.h>
#include <stdlib.h>
__global__
void vectorAdd(
int* vector1,
int* ve... |
46930d4ff6b9ae99fd613cb3144117356b175dbf.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "../cuda_utils.h"
#include "interpolation_cuda_kernel.h"
__global__ void interpolation_forward_cuda_kernel(int n, int c, int k, const float *input, const int *idx, const float *weight, float *output)
{
// input: input... | 46930d4ff6b9ae99fd613cb3144117356b175dbf.cu | #include "../cuda_utils.h"
#include "interpolation_cuda_kernel.h"
__global__ void interpolation_forward_cuda_kernel(int n, int c, int k, const float *input, const int *idx, const float *weight, float *output)
{
// input: input: (m, c), idx: (n, k), weight: (n, k), output: output (n, c)
int index = blockIdx.x ... |
ec80120a2ae661fd2a6280e39aba09b249891041.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void rmspropKernel ( int numberIterations, int* parameterIndices, int* counts, int dimension, float* parameters, float* gradient, float learningRate, float decay, float oneMinusDecay, float epsilon, ... | ec80120a2ae661fd2a6280e39aba09b249891041.cu | #include "includes.h"
__global__ void rmspropKernel ( int numberIterations, int* parameterIndices, int* counts, int dimension, float* parameters, float* gradient, float learningRate, float decay, float oneMinusDecay, float epsilon, float* accumulation) {
int updateIndex = blockIdx.x;
int parameterIndex = parameterIndi... |
428cebcd017e45a48795fb3acb0973e32fe2d622.hip | // !!! This is a file automatically generated by hipify!!!
//
// cudaGMRES.cu
// Cuda GMRES
//
// Created by Tim Ioannidis on 2/18/12.
// Copyright 2012 Chemeng NTUA. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <hip/hip_runtime.h>
#include "structs.h... | 428cebcd017e45a48795fb3acb0973e32fe2d622.cu | //
// cudaGMRES.cu
// Cuda GMRES
//
// Created by Tim Ioannidis on 2/18/12.
// Copyright 2012 Chemeng NTUA. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <cuda.h>
#include "structs.h"
#include "parameters.h"
#include "extern.h"
#include "cuda_config.h"... |
7a670ca73af28efeef88b1e890826058f858e4c6.hip | // !!! This is a file automatically generated by hipify!!!
// Copyright (c) 2017 Sony Corporation. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://ww... | 7a670ca73af28efeef88b1e890826058f858e4c6.cu | // Copyright (c) 2017 Sony Corporation. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... |
18482529024c36e4e88ac5b755f34e49cbbe08ee.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "dpCudaMatrixTranspose.hpp"
#include "errorCheck.hpp"
#define cudaErrChk(ans) { cudaAssert((ans), __FILE__, __LINE__); }
#define BEGIN hipEventRecord(begin, 0);
#define END hipEventRecord(end, 0); hipEventSynchronize(end); ... | 18482529024c36e4e88ac5b755f34e49cbbe08ee.cu | #include "dpCudaMatrixTranspose.hpp"
#include "errorCheck.hpp"
#define cudaErrChk(ans) { cudaAssert((ans), __FILE__, __LINE__); }
#define BEGIN cudaEventRecord(begin, 0);
#define END cudaEventRecord(end, 0); cudaEventSynchronize(end); cudaEventElapsedTime(&delTime, begin, end);
//source:
//http://code.msdn.microsoft.c... |
2172e4e9d17fba543e8ea49a235b42eee843ff5a.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "common.h"
#include <owl/common/math/random.h>
#include "cudaHelpers.cuh"
#include <thrust/device_vector.h>
#include <thrust/count.h>
#include <thrust/execution_policy.h>
//Brownian motion
#include <ctime>
#include <hipran... | 2172e4e9d17fba543e8ea49a235b42eee843ff5a.cu | #include "common.h"
#include <owl/common/math/random.h>
#include "cudaHelpers.cuh"
#include <thrust/device_vector.h>
#include <thrust/count.h>
#include <thrust/execution_policy.h>
//Brownian motion
#include <ctime>
#include <curand_kernel.h>
//Mesh
#include "cuda/DeviceTetMesh.cuh"
#include "query/RTQuery.h"
name... |
fd129999216f447ef6a5f79e97b79b61f31b8c3d.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <cassert>
#include <cudaTools/diagnostic.h>
__device__ float deviceValue;
int main()
{
// Upload value -> deviceValue.
float value = 3.14f;
CUDA_CHECK( hipMemcpyToSymbol( deviceValue, &value, sizeof( float ) ) );
... | fd129999216f447ef6a5f79e97b79b61f31b8c3d.cu | #include <stdio.h>
#include <cassert>
#include <cudaTools/diagnostic.h>
__device__ float deviceValue;
int main()
{
// Upload value -> deviceValue.
float value = 3.14f;
CUDA_CHECK( cudaMemcpyToSymbol( deviceValue, &value, sizeof( float ) ) );
// Check deviceValue size.
size_t deviceValueSize;
... |
97d4987aa6eacfc092219049994d0349a3b24674.hip | // !!! This is a file automatically generated by hipify!!!
#include "createParticles.hpp"
#include "rk4.hpp"
#include <cmath>
float GetGyroPhase(const C3<float> v_abp)
{
// alp is mostly in the x / r direction
// bet is mostly z direction
float alp = v_abp.c1;
float bet = v_abp.c2;
return atan2(... | 97d4987aa6eacfc092219049994d0349a3b24674.cu | #include "createParticles.hpp"
#include "rk4.hpp"
#include <cmath>
float GetGyroPhase(const C3<float> v_abp)
{
// alp is mostly in the x / r direction
// bet is mostly z direction
float alp = v_abp.c1;
float bet = v_abp.c2;
return atan2(alp, bet);
}
PRAGMA
HOST DEVICE
float maxwellian(float vx,... |
ad27ef9922cf95f3f6c54d6cd8e58f2b18186027.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__device__ void get_largest_value(short *vec, const int vec_length, int *max) {
for (int i = threadIdx.x; i < vec_length; i = i + blockDim.x) {
atomicMax(max, vec[i]);
}
}
__global__ void get_largest_value(in... | ad27ef9922cf95f3f6c54d6cd8e58f2b18186027.cu | #include "includes.h"
__device__ void get_largest_value(short *vec, const int vec_length, int *max) {
for (int i = threadIdx.x; i < vec_length; i = i + blockDim.x) {
atomicMax(max, vec[i]);
}
}
__global__ void get_largest_value(int *vec, const int vec_length, int* max) {
for (int i = threadIdx.x; i < vec_length; i =... |
bdd6aee7c4bd0710fed21fe8b4bab30691915623.hip | // !!! This is a file automatically generated by hipify!!!
#include <cstdio>
#include <string.h>
#include <hip/hip_runtime.h>
#include "hashiru_cuda.cuh"
// A GPU version of the toy hash function from earlier.
// Could be done in a more parallel manner, but at this
// time I just want it to work.
__device__ void cuda_... | bdd6aee7c4bd0710fed21fe8b4bab30691915623.cu | #include <cstdio>
#include <string.h>
#include <cuda_runtime.h>
#include "hashiru_cuda.cuh"
// A GPU version of the toy hash function from earlier.
// Could be done in a more parallel manner, but at this
// time I just want it to work.
__device__ void cuda_hash(const char *in, const int len, char *out)
{
char c = 0... |
3bb5f8dc1dba1ca7aa2441394b9d8a79e19eaafb.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include<time.h>
#define SIZE 10
__global__ void VectorMatrixMult(int a[], int b[], int c[], int n)
{
int i = threadIdx.x;
if(i < n){
//j is used for iterating through columns;---
for(int j=0; j<SIZE; j++)... | 3bb5f8dc1dba1ca7aa2441394b9d8a79e19eaafb.cu | #include <stdio.h>
#include<time.h>
#define SIZE 10
__global__ void VectorMatrixMult(int a[], int b[], int c[], int n)
{
int i = threadIdx.x;
if(i < n){
//j is used for iterating through columns;---
for(int j=0; j<SIZE; j++){
c[i] +=(a[j] * *(b + i*SIZE + j));
}
}
}
int main()
{
int *a, *b, *c;
clock_t... |
f802d8a58e3b8cc99fefb3715c05eec2937feab3.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Copyright 2009, Andrew Corrigan, acorriga@gmu.edu
// This code is from the AIAA-2009-4001 paper
//#include <cutil.h>
//#include <helper_cuda.h>
#include <helper_timer.h>
#include <iostream>
#include <fstream>
/*
* Options ... | f802d8a58e3b8cc99fefb3715c05eec2937feab3.cu | // Copyright 2009, Andrew Corrigan, acorriga@gmu.edu
// This code is from the AIAA-2009-4001 paper
//#include <cutil.h>
//#include <helper_cuda.h>
#include <helper_timer.h>
#include <iostream>
#include <fstream>
/*
* Options
*
*/
#define GAMMA 1.4f
#define iterations 2000
// #ifndef block_length
// #define... |
e3a7440d7d4145934328bba5e2d4245dfa3cbdbc.hip | // !!! This is a file automatically generated by hipify!!!
//#define USE_LPSO
//#define USE_TAPSO
//#define USE_TPSO
#include "LPSO.cu"
#include "TPSO.cu"
#include "TAPSO.cu"
#include <iostream>
int main(int argc, char**argv)
{
PSOBase *psoList[] =
{
#ifdef USE_LPSO
new LPSO<EvalBanana>(400, 2000),
new LPSO<E... | e3a7440d7d4145934328bba5e2d4245dfa3cbdbc.cu | //#define USE_LPSO
//#define USE_TAPSO
//#define USE_TPSO
#include "LPSO.cu"
#include "TPSO.cu"
#include "TAPSO.cu"
#include <iostream>
int main(int argc, char**argv)
{
PSOBase *psoList[] =
{
#ifdef USE_LPSO
new LPSO<EvalBanana>(400, 2000),
new LPSO<EvalBanana>(1200, 2000),
new LPSO<EvalBanana>(2000, 2000),... |
cb0ab0f87ae65f8bbd25083e2df4ad0fd889e6c1.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>
#include <iostream>
#include <typeinfo>
#include <random>
#include <stdint.h>
#include <string>
#include <fstream>
#include <sstream>
// CUBLAS GEMM API
#... | cb0ab0f87ae65f8bbd25083e2df4ad0fd889e6c1.cu | #include <torch/extension.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <vector>
#include <iostream>
#include <typeinfo>
#include <random>
#include <stdint.h>
#include <string>
#include <fstream>
#include <sstream>
// CUBLAS GEMM API
#include <cublas_v2.h>
// Cutlass GEMM API
#include <cutlass/util/util.h>... |
c74547a476486aef445a7482413cbe51bffca5b2.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
__global__ void square(float * d_out , float * d_in){
int idx = threadIdx.x;
float f = d_in[idx];
d_out[idx] = f*f;
}
int main (int argc , char **argv){
const int ARRAY_SIZE = 64;
const int ... | c74547a476486aef445a7482413cbe51bffca5b2.cu | #include <stdio.h>
__global__ void square(float * d_out , float * d_in){
int idx = threadIdx.x;
float f = d_in[idx];
d_out[idx] = f*f;
}
int main (int argc , char **argv){
const int ARRAY_SIZE = 64;
const int ARRAY_BYTES = ARRAY_SIZE * sizeof(float);
//generate the input array on the host
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.