hip_filename stringlengths 5 84 | hip_content stringlengths 79 9.69M | cuda_filename stringlengths 4 83 | cuda_content stringlengths 19 9.69M |
|---|---|---|---|
ac96413d2583cbf119e60a42d062290ef1cfb208.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#define BLOCK_SIZE 512
#define SECTION_SIZE 1024 // define section size (size of subarray to be handled) to be twice the block size
__global__ void work_efficient_inclusive_scan(float *X, float *Y, unsigned in_size) {
__shared__ ... | ac96413d2583cbf119e60a42d062290ef1cfb208.cu | #define BLOCK_SIZE 512
#define SECTION_SIZE 1024 // define section size (size of subarray to be handled) to be twice the block size
__global__ void work_efficient_inclusive_scan(float *X, float *Y, unsigned in_size) {
__shared__ float XY[SECTION_SIZE];
// Load elements from input into in-place array
unsigned int ... |
650cfff15df5bce3f37052765fc5a7d884906c4b.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <sys/time.h>
#include <algorithm>
#define INF 1000000
double t1, t2;
int n, m; // Number of vertices, edges
int *Dist;
int *dev_dist;
double wallclock(void)
{ struct... | 650cfff15df5bce3f37052765fc5a7d884906c4b.cu | #include <cuda_runtime.h>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <sys/time.h>
#include <algorithm>
#define INF 1000000
double t1, t2;
int n, m; // Number of vertices, edges
int *Dist;
int *dev_dist;
double wallclock(void)
{ struct timeval tv;
struct timezone tz;
double t;
gettimeofday(&t... |
efe45181cb752164f7b428aa62b286db9051894f.hip | // !!! This is a file automatically generated by hipify!!!
// ----------------------------------------------------------------
// Gunrock -- Fast and Efficient GPU Graph Library
// ----------------------------------------------------------------
// This source code is distributed under the terms of LICENSE.TXT
// in th... | efe45181cb752164f7b428aa62b286db9051894f.cu | // ----------------------------------------------------------------
// Gunrock -- Fast and Efficient GPU Graph Library
// ----------------------------------------------------------------
// This source code is distributed under the terms of LICENSE.TXT
// in the root directory of this source distribution.
// ----------... |
a0d5ca9314feab74db100156ea7b78b251eb5fdf.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <stdlib.h>
#define NUM 1048576
#define NUM_THREADS 512
#define NUM_BLOCKS 2048
/* Function to sort threads in each block using merge sort */
__global__ void sort_blocks(int *a)
{
int i=2;
__share... | a0d5ca9314feab74db100156ea7b78b251eb5fdf.cu | #include <stdio.h>
#include <stdlib.h>
#define NUM 1048576
#define NUM_THREADS 512
#define NUM_BLOCKS 2048
/* Function to sort threads in each block using merge sort */
__global__ void sort_blocks(int *a)
{
int i=2;
__shared__ int temp [NUM_THREADS];
while (i <= NUM_THREADS)
{
if ((threadIdx.x % i)==0... |
cd89823efd4101707b80cc64820f2600b0ab6718.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* This is a automatically generated test. Do not modify */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, int var_1,float var_2,float var_3,float var_4,float var_5,float var_6,float ... | cd89823efd4101707b80cc64820f2600b0ab6718.cu |
/* This is a automatically generated test. Do not modify */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, int var_1,float var_2,float var_3,float var_4,float var_5,float var_6,float var_7,float var_8,float var_9,float var_10,int var_11,int var_12,float var_13,float var_... |
30f2202ea9f07587053fa99ef6a27bf620ee54b4.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* This is a automatically generated test. Do not modify */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, float var_1,float var_2,float var_3,float var_4,int var_5,float var_6,float ... | 30f2202ea9f07587053fa99ef6a27bf620ee54b4.cu |
/* This is a automatically generated test. Do not modify */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
__global__
void compute(float comp, float var_1,float var_2,float var_3,float var_4,int var_5,float var_6,float var_7,float var_8,float var_9,float var_10,float var_11,float var_12,float var_13,float ... |
54d4ee331776a1e2a4f8b20e0ff85aab4b882238.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void matrixMul_kernel(float * A, float * B, float * C, int N)
{
int ROW = blockIdx.y * blockDim.y + threadIdx.y;
int COL = blockIdx.x * blockDim.x + threadIdx.x;
float tmpSum = 0;
if (ROW < N && CO... | 54d4ee331776a1e2a4f8b20e0ff85aab4b882238.cu | #include "includes.h"
__global__ void matrixMul_kernel(float * A, float * B, float * C, int N)
{
int ROW = blockIdx.y * blockDim.y + threadIdx.y;
int COL = blockIdx.x * blockDim.x + threadIdx.x;
float tmpSum = 0;
if (ROW < N && COL < N)
{
// each thread computes one elem of the block sub-matrix
for (int i = 0; i < N;... |
4c5aebdfba7f956f97b01db336f8122f7365e276.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifdef ENABLE_CURD
#include<curd_lib_host.h>
#endif
/*
* Copyright (c) 2016 University of Cordoba and University of Illinois
* All rights reserved.
*
* Developed by: IMPACT Research Group
* University of Co... | 4c5aebdfba7f956f97b01db336f8122f7365e276.cu | #ifdef ENABLE_CURD
#include<curd_lib_host.h>
#endif
/*
* Copyright (c) 2016 University of Cordoba and University of Illinois
* All rights reserved.
*
* Developed by: IMPACT Research Group
* University of Cordoba and University of Illinois
* http://impact.crhc.illinois.edu/
*... |
599afd5ab83d1508bba54ed47bf25740b390c60f.hip | // !!! This is a file automatically generated by hipify!!!
#include "GPU_Setup.h"
#include <stdio.h>
#include <thrust/host_vector.h>
void initOGL_CUDA()
{
hipError_t cudaStatus;
// Choose which GPU to run on, change this on a multi-GPU system.
cudaStatus = hipGLSetGLDevice(0);
if (cudaStatus != hipSuccess) {
fp... | 599afd5ab83d1508bba54ed47bf25740b390c60f.cu | #include "GPU_Setup.h"
#include <stdio.h>
#include <thrust/host_vector.h>
void initOGL_CUDA()
{
cudaError_t cudaStatus;
// Choose which GPU to run on, change this on a multi-GPU system.
cudaStatus = cudaGLSetGLDevice(0);
if (cudaStatus != cudaSuccess) {
fprintf(stderr, "cudaSetDevice failed! Do you have a CUDA... |
6b1503154630e84016b85a1338b4d81f26143dc0.hip | // !!! This is a file automatically generated by hipify!!!
#include <cstdlib>
#include <thrust/device_vector.h>
#include "matmul_processor.hpp"
using namespace thrust;
using namespace structured;
using namespace std;
int div_ceil(int numerator, int denominator);
template <>
void MatMulProc<float>::gpuMultMat(
co... | 6b1503154630e84016b85a1338b4d81f26143dc0.cu | #include <cstdlib>
#include <thrust/device_vector.h>
#include "matmul_processor.hpp"
using namespace thrust;
using namespace structured;
using namespace std;
int div_ceil(int numerator, int denominator);
template <>
void MatMulProc<float>::gpuMultMat(
const float* A, const float* B,
float* C, int batch, cons... |
2e37d926c73dd1907b45c8c9c20e4ac95f1b0c4e.hip | // !!! This is a file automatically generated by hipify!!!
#include "chainerx/cuda/cuda_device.h"
#include <cstdint>
#include <hip/hip_runtime.h>
#include "chainerx/arithmetic_ops.h"
#include "chainerx/array.h"
#include "chainerx/cuda/cuda_runtime.h"
#include "chainerx/cuda/cuda_set_device_scope.h"
#include "chainer... | 2e37d926c73dd1907b45c8c9c20e4ac95f1b0c4e.cu | #include "chainerx/cuda/cuda_device.h"
#include <cstdint>
#include <cuda_runtime.h>
#include "chainerx/arithmetic_ops.h"
#include "chainerx/array.h"
#include "chainerx/cuda/cuda_runtime.h"
#include "chainerx/cuda/cuda_set_device_scope.h"
#include "chainerx/cuda/elementwise.cuh"
#include "chainerx/cuda/float16.cuh"
#... |
b5cab9f5f4447989f752c34beaade6edc20a8b0d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "helper_cuda.h"
__global__
void jacobi_seq_kernel(double * d_u, double * d_uo, double * d_f, int N, double delta2){
int i,j;
for(i = 1; i < N-1; i++){
for(j = 1; j < N-1; j++){
d_u[i*N + j] = 0.25*(d_uo[(i-1)*N + j]... | b5cab9f5f4447989f752c34beaade6edc20a8b0d.cu | #include "helper_cuda.h"
__global__
void jacobi_seq_kernel(double * d_u, double * d_uo, double * d_f, int N, double delta2){
int i,j;
for(i = 1; i < N-1; i++){
for(j = 1; j < N-1; j++){
d_u[i*N + j] = 0.25*(d_uo[(i-1)*N + j] + d_uo[(i+1)*N + j] + d_uo[i*N + j+1] + d_uo[i*N + j-1] + delta2*d_f[i*N + j]);
}
}
... |
08fa0d0ca66a7d90b28020d39222e4be9d6c0331.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//
// auto-generated by ops.py
//
__constant__ int dims_update_halo_kernel2_zvel_plus_2_top [3][2];
static int dims_update_halo_kernel2_zvel_plus_2_top_h [3][2] = {0};
//user function
__device__
inline void update_halo_kernel2_zve... | 08fa0d0ca66a7d90b28020d39222e4be9d6c0331.cu | //
// auto-generated by ops.py
//
__constant__ int dims_update_halo_kernel2_zvel_plus_2_top [3][2];
static int dims_update_halo_kernel2_zvel_plus_2_top_h [3][2] = {0};
//user function
__device__
inline void update_halo_kernel2_zvel_plus_2_top_gpu(ACC<double> &zvel0,
ACC<double> &zvel1,
const int* fields)
{
if(f... |
6ea77f7e4be818b34f4ea5149eeab2872bea7cb0.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* Copyright (c) 2011-2013 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:
*
* ... | 6ea77f7e4be818b34f4ea5149eeab2872bea7cb0.cu | /*
* Copyright (c) 2011-2013 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 o... |
f2cea905a7d3af9479692ed56cb07be45b0ec82c.hip | // !!! This is a file automatically generated by hipify!!!
// Equihash CUDA solver
// Copyright (c) 2016 John Tromp
#define XINTREE
#define UNROLL
#define htole32(x) (x)
#define HAVE_DECL_HTOLE32 1
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include "device_atomic_functions.h"
#include <functi... | f2cea905a7d3af9479692ed56cb07be45b0ec82c.cu | // Equihash CUDA solver
// Copyright (c) 2016 John Tromp
#define XINTREE
#define UNROLL
#define htole32(x) (x)
#define HAVE_DECL_HTOLE32 1
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "device_atomic_functions.h"
#include <functional>
#include <vector>
#include "equi.h"
#include <stdio.h>
... |
39b6358ebf5110effb1f8d9ce0a6fb9d8495f2e1.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <rocblas.h>
#include "cudamat_kernels.cuh"
#include "cudamat.cuh"
extern "C" {
/* ------------------------------ CUBLAS init/shutdown ---------... | 39b6358ebf5110effb1f8d9ce0a6fb9d8495f2e1.cu | #include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <cublas.h>
#include "cudamat_kernels.cuh"
#include "cudamat.cuh"
extern "C" {
/* ------------------------------ CUBLAS init/shutdown ------------------------------ */
inline bool check_cublas_error() {
cublasStatus status = cu... |
007418aa64ce2e1450ecdd24f676b1ea520b2fbe.hip | // !!! This is a file automatically generated by hipify!!!
/* =========================================================================
Copyright (c) 2010-2015, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
TU Wien.
Portion... | 007418aa64ce2e1450ecdd24f676b1ea520b2fbe.cu | /* =========================================================================
Copyright (c) 2010-2015, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
TU Wien.
Portions of this software are copyright by UChicago Argonne, LLC.
... |
41550181e4e2050de56ede96d255d46faeaaa3e4.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <cudf/column/column_device_view.cuh>
#include <cudf/scalar/scalar.hpp>
#include <cudf/scalar/scalar_device_view.cuh>
#include <cudf/table/table_view.hpp>
#include <cudf/table/table_device_view.cuh>
#include <stack>
#include... | 41550181e4e2050de56ede96d255d46faeaaa3e4.cu | #include <cudf/column/column_device_view.cuh>
#include <cudf/scalar/scalar.hpp>
#include <cudf/scalar/scalar_device_view.cuh>
#include <cudf/table/table_view.hpp>
#include <cudf/table/table_device_view.cuh>
#include <stack>
#include <map>
#include <regex>
#include <random>
#include "interpreter_ops.cuh"
#include "pars... |
0d817c78a044b9bc7bf55823eff55182b23001ba.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*#include<iostream>
#include<cuda.h>
#include<cuda_runtime.h>
#include "device_launch_parameters.h"
#include <hip/device_functions.h>
#define imin(a,b)((a<b)?a:b)
const int N =33 * 1024;
const int threadsPerBlock = 256;
const int... | 0d817c78a044b9bc7bf55823eff55182b23001ba.cu | /*#include<iostream>
#include<cuda.h>
#include<cuda_runtime.h>
#include "device_launch_parameters.h"
#include <device_functions.h>
#define imin(a,b)((a<b)?a:b)
const int N =33 * 1024;
const int threadsPerBlock = 256;
const int blocksPerGrid = imin(32, (N+ threadsPerBlock-1) / threadsPerBlock);
__global__ void kerne... |
a1e04fed298abea1954657588576b185ddd577bd.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 "initialize_cells.cu"
#include<chrono>
#include<iostream>
using n... | a1e04fed298abea1954657588576b185ddd577bd.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 "initialize_cells.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},... |
7c5bf93b123a01f3cc484a803f26957775fe2cd6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// DO NOT MODIFY THIS FILE
#include <ctime>
#include <cstdio>
#include <cstdint>
#include <chrono>
#include "cuda_utils.h"
#include "apsp.h"
namespace
{
constexpr int DATA_RANGE = 10000;
constexpr int TIMER_ROUNDS = 3;
... | 7c5bf93b123a01f3cc484a803f26957775fe2cd6.cu | // DO NOT MODIFY THIS FILE
#include <ctime>
#include <cstdio>
#include <cstdint>
#include <chrono>
#include "cuda_utils.h"
#include "apsp.h"
namespace
{
constexpr int DATA_RANGE = 10000;
constexpr int TIMER_ROUNDS = 3;
constexpr int TIMER_WARMUP = 1;
__global__ void __launch_bounds__(1024) genData... |
602495d6b7874f5bf3600aadf4dccaed5ff385b3.hip | // !!! This is a file automatically generated by hipify!!!
/*
Copyright 2020 - 2021 MONAI Consortium
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
Unl... | 602495d6b7874f5bf3600aadf4dccaed5ff385b3.cu | /*
Copyright 2020 - 2021 MONAI Consortium
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, sof... |
79cf6cbd437ee9318c59f7e972e3e7e986cb96c0.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
__global__ void elementwise_add(const int * array1,
const int * array2, int * result, int size) {
unsigned int idx = threadIdx.x + blockIdx.x * blockDim.x;
unsigned int stride = gridDim.x * blockDim.x;
while (idx < s... | 79cf6cbd437ee9318c59f7e972e3e7e986cb96c0.cu | __global__ void elementwise_add(const int * array1,
const int * array2, int * result, int size) {
unsigned int idx = threadIdx.x + blockIdx.x * blockDim.x;
unsigned int stride = gridDim.x * blockDim.x;
while (idx < size) {
result[idx] = array1[idx] + array2[idx];
idx += stride;
}
}
|
de3fc28d18123a2949f70d7e2d1cf8bb92212fb6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "CAHitNtupletGeneratorKernelsImpl.h"
template <>
void CAHitNtupletGeneratorKernelsGPU::fillHitDetIndices(HitsView const *hv, TkSoA *tracks_d, hipStream_t cudaStream) {
auto blockSize = 128;
auto numberOfBlocks = (HitCo... | de3fc28d18123a2949f70d7e2d1cf8bb92212fb6.cu | #include "CAHitNtupletGeneratorKernelsImpl.h"
template <>
void CAHitNtupletGeneratorKernelsGPU::fillHitDetIndices(HitsView const *hv, TkSoA *tracks_d, cudaStream_t cudaStream) {
auto blockSize = 128;
auto numberOfBlocks = (HitContainer::capacity() + blockSize - 1) / blockSize;
kernel_fillHitDetIndices<<<numberO... |
c081b328f0721c7a71a92e44533d2bdda6c77eb7.hip | // !!! This is a file automatically generated by hipify!!!
/**
-- (C) Copyright 2013 King Abdullah University of Science and Technology
Authors:
Ahmad Abdelfattah (ahmad.ahmad@kaust.edu.sa)
David Keyes (david.keyes@kaust.edu.sa)
Hatem Ltaief (hatem.ltaief@kaust.edu.sa)
Redistribution and use in source a... | c081b328f0721c7a71a92e44533d2bdda6c77eb7.cu | /**
-- (C) Copyright 2013 King Abdullah University of Science and Technology
Authors:
Ahmad Abdelfattah (ahmad.ahmad@kaust.edu.sa)
David Keyes (david.keyes@kaust.edu.sa)
Hatem Ltaief (hatem.ltaief@kaust.edu.sa)
Redistribution and use in source and binary forms, with or without
modification, are perm... |
476b92d8c7bbb3e277b63df57e35366b25d6df5f.hip | // !!! This is a file automatically generated by hipify!!!
#include <cmath>
#include <cstdlib>
#include <hip/hip_runtime.h>
#include <iostream>
#include <boost/thread.hpp>
#include <CUDA/HPP/CalElapsedTime.hpp>
#include <CUDA/HPP/InitData.hpp>
#include <CUDA/HPP/Transpose.hpp>
typedef float value_type;
int X = ::pow(2... | 476b92d8c7bbb3e277b63df57e35366b25d6df5f.cu | #include <cmath>
#include <cstdlib>
#include <cuda_runtime.h>
#include <iostream>
#include <boost/thread.hpp>
#include <CUDA/HPP/CalElapsedTime.hpp>
#include <CUDA/HPP/InitData.hpp>
#include <CUDA/HPP/Transpose.hpp>
typedef float value_type;
int X = std::pow(2, 12);
int Y = std::pow(2, 10);
int x = 16;
int y = 16;
std... |
f0bf16d112119873f2e3a344ae09f23a830fe537.hip | // !!! This is a file automatically generated by hipify!!!
#include "stdio.h"
#include "io.cuh"
#include "fp.cuh"
#include "bp_hip.cuh"
#include "init_hip.cuh"
#include "utils.cuh"
#include "global_hip.cuh"
#include "fp_gpu.cuh"
#include "bp_gpu.cuh"
#include "global_gpu.cuh"
float max_acc;
clock_t t;
int main(int ... | f0bf16d112119873f2e3a344ae09f23a830fe537.cu | #include "stdio.h"
#include "io.cuh"
#include "fp.cuh"
#include "bp.cuh"
#include "init.cuh"
#include "utils.cuh"
#include "global.cuh"
#include "fp_gpu.cuh"
#include "bp_gpu.cuh"
#include "global_gpu.cuh"
float max_acc;
clock_t t;
int main(int argc,char *argv[])
{
printf("====== aininot260 gh@ysucloud.com ====... |
e249d5d29c8d5a1126cc3514cc7b39188ed1ceaf.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <time.h>
using namespace std;
void readInt(int &n, int &m) {
ifstream fin_n("data/nums.txt");
fin_n >> n >> m;
}
void rea... | e249d5d29c8d5a1126cc3514cc7b39188ed1ceaf.cu | #include <iostream>
#include <fstream>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <time.h>
using namespace std;
void readInt(int &n, int &m) {
ifstream fin_n("data/nums.txt");
fin_n >> n >> m;
}
void readGraph(unsigned long long *neib, int n, int m) {
ifstream fin_g("data/graph.txt");
vec... |
c8404b2daa6e2e294aec5bb247844491be294883.hip | // !!! This is a file automatically generated by hipify!!!
/*
-- KBLAS (version 1.0) --
Ahmad Abdelfattah, Center of Extreme Computing
Hatem Ltaief, Supercomputing Laboratory
David Keyes, Center of Extreme Computing
King Abdullah University of Science and Technology (KAUST)
June 2013
K... | c8404b2daa6e2e294aec5bb247844491be294883.cu | /*
-- KBLAS (version 1.0) --
Ahmad Abdelfattah, Center of Extreme Computing
Hatem Ltaief, Supercomputing Laboratory
David Keyes, Center of Extreme Computing
King Abdullah University of Science and Technology (KAUST)
June 2013
KBLAS is a subset of BLAS routines highly optimized for NVID... |
d1904585a9f2e942e8c838d70a5058361c57bf6c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "Linear.h"
#include <hip/hip_cooperative_groups.h>
#include <cooperative_groups/memcpy_async.h>
#include <cooperative_groups/reduce.h>
#include <mma.hpp>
namespace cg = cooperative_groups;
/*
* It returns the pointer of t... | d1904585a9f2e942e8c838d70a5058361c57bf6c.cu | #include "Linear.h"
#include <cooperative_groups.h>
#include <cooperative_groups/memcpy_async.h>
#include <cooperative_groups/reduce.h>
#include <mma.hpp>
namespace cg = cooperative_groups;
/*
* It returns the pointer of the top-left corner of give block in a matrix.
* Assume the matrix is stored in a row-major arra... |
dcdbbc4a2807638d5f8c48f53fb10afa86ad290d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#define SIZE 1024*1024*4
__global__ void reduce0(unsigned int *g_idata, unsigned int *g_odata, long size){
// dynamically allocated shared memory ... | dcdbbc4a2807638d5f8c48f53fb10afa86ad290d.cu | #include <stdio.h>
#define SIZE 1024*1024*4
__global__ void reduce0(unsigned int *g_idata, unsigned int *g_odata, long size){
// dynamically allocated shared memory
extern __shared__ unsigned int sdata[];
// set up thread ids: within a blo... |
271209acd259ce759ec10864380cfe73d434a557.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.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.... | 271209acd259ce759ec10864380cfe73d434a557.cu | #include <math.h>
#include <stdio.h>
#include <stdlib.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 < n)
... |
653fdfa18965ffba3172b5bebe9d5c564ed7a51b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
to compile:
nvcc --gpu-architecture=compute_70 gpu_report_time.cu
requirement for reduction in the device
Hardware: kepler or newer architecture
nvcc: cuda 9 or newer
*/
// Comment out if you excute reduction in the host
#defin... | 653fdfa18965ffba3172b5bebe9d5c564ed7a51b.cu | /*
to compile:
nvcc --gpu-architecture=compute_70 gpu_report_time.cu
requirement for reduction in the device
Hardware: kepler or newer architecture
nvcc: cuda 9 or newer
*/
// Comment out if you excute reduction in the host
#define ACCUMULATE_IN_DEVICE
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
co... |
b4dc197658c806c8045b2fc1d35b8c133af2aaa2.hip | // !!! This is a file automatically generated by hipify!!!
#include <iostream>
#include <stdio.h>
#include "hip/hip_runtime.h"
__global__ void cubic(const float * d_in, float * d_out)
{
int idx = threadIdx.x;
float f = d_in[idx];
d_out[idx] = f * f * f;
}
int main()
{
const int ARRAY_SIZE=10;
con... | b4dc197658c806c8045b2fc1d35b8c133af2aaa2.cu | #include <iostream>
#include <stdio.h>
#include "cuda_runtime.h"
__global__ void cubic(const float * d_in, float * d_out)
{
int idx = threadIdx.x;
float f = d_in[idx];
d_out[idx] = f * f * f;
}
int main()
{
const int ARRAY_SIZE=10;
const int ARRAY_BYTES = ARRAY_SIZE * sizeof(float);
float h_... |
6f0c1aca21926a82c0256105e7e2a7a11edfabda.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "lm.h"
namespace kso {
namespace img {
namespace dspk {
__device__ float sinc(float x){
float y = 3.14 * x;
float A = sin(y);
float B = y;
float C;
if(x != 0.0){
C = A / B;
} else {
C = 1.0;
}
// printf("... | 6f0c1aca21926a82c0256105e7e2a7a11edfabda.cu | #include "lm.h"
namespace kso {
namespace img {
namespace dspk {
__device__ float sinc(float x){
float y = 3.14 * x;
float A = sin(y);
float B = y;
float C;
if(x != 0.0){
C = A / B;
} else {
C = 1.0;
}
// printf("%f\n",C);
return C;
}
__device__ float local_kern_1D(uint X, uint ksz){
// // calc... |
dd3fe83fbeea09dd02211fca8939ece388ac1496.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <vector>
#include "caffe/layer.hpp"
#include "caffe/layers/l1_loss_layer.hpp"
#include "caffe/util/io.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <typename Dtype>
__global__ void ComputeSign(... | dd3fe83fbeea09dd02211fca8939ece388ac1496.cu | #include <vector>
#include "caffe/layer.hpp"
#include "caffe/layers/l1_loss_layer.hpp"
#include "caffe/util/io.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <typename Dtype>
__global__ void ComputeSign(const int n, const Dtype* in, Dtype* out) {
CUDA_KERNEL_LOOP(index, n) {
out[index... |
decc1a429482d792a1fcafe8b05e512c166a3170.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Homework 2
// Image Blurring
//
// In this homework we are blurring an image. To do this, imagine that we have
// a square array of weight values. For each pixel in the image, imagine that we
// overlay this square array of weigh... | decc1a429482d792a1fcafe8b05e512c166a3170.cu | // Homework 2
// Image Blurring
//
// In this homework we are blurring an image. To do this, imagine that we have
// a square array of weight values. For each pixel in the image, imagine that we
// overlay this square array of weights on top of the image such that the center
// of the weight array is aligned with the c... |
1b721f765af21a912404edbdede0db8220831afd.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void printHello() {
printf("The Device says \"Hello World\"\n");
} | 1b721f765af21a912404edbdede0db8220831afd.cu | #include "includes.h"
__global__ void printHello() {
printf("The Device says \"Hello World\"\n");
} |
b8226e782627a51ae0d1198fff74bcadaa7f0e1c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "../cuda_utils.h"
#include "knnquery_cuda_kernel.h"
// input: xyz (b, n, 3) new_xyz (b, m, 3)
// output: idx (b, m, nsample) dist2 (b, m, nsample)
__global__ void knnquery_cuda_kernel(int b, int n, int m, int nsample, cons... | b8226e782627a51ae0d1198fff74bcadaa7f0e1c.cu | #include "../cuda_utils.h"
#include "knnquery_cuda_kernel.h"
// input: xyz (b, n, 3) new_xyz (b, m, 3)
// output: idx (b, m, nsample) dist2 (b, m, nsample)
__global__ void knnquery_cuda_kernel(int b, int n, int m, int nsample, const float *__restrict__ xyz, const float *__restrict__ new_xyz, int *__restrict__ idx, flo... |
09a1d401c40a51e48c9343973635d22703f3b7b3.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#define SEP_LINE_LENGTH 20
typedef struct gridTopology
{
dim3 blockSize;
dim3 gridSize;
} gridTopology;
typedef struct pixelCoords
{
int x, y;
} pixelCoords;
gridTopology initGridTopology2D(int r, int c)... | 09a1d401c40a51e48c9343973635d22703f3b7b3.cu | #include <stdio.h>
#define SEP_LINE_LENGTH 20
typedef struct gridTopology
{
dim3 blockSize;
dim3 gridSize;
} gridTopology;
typedef struct pixelCoords
{
int x, y;
} pixelCoords;
gridTopology initGridTopology2D(int r, int c);
void gridDataReport(gridTopology t, int nRows, int nCols);
void printLineOf(char c);
_... |
ca12720029abbaaf46e7126d6cd233296cfead4b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void fillPartitionLabelKernel(int size, int *coarseAggregate, int *fineAggregateSort, int *partitionLabel)
{
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if(idx < size)
{
partitionLabel[idx] = co... | ca12720029abbaaf46e7126d6cd233296cfead4b.cu | #include "includes.h"
__global__ void fillPartitionLabelKernel(int size, int *coarseAggregate, int *fineAggregateSort, int *partitionLabel)
{
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if(idx < size)
{
partitionLabel[idx] = coarseAggregate[ fineAggregateSort[idx] ];
}
} |
86ea71d91e5a0da64f5f4e16c5c6a110a3088cc1.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <algorithm>
#include <vector>
#include "caffe/layers/pixelwise_similarity_layer.hpp"
namespace caffe {
template <typename Dtype>
__global__ void ReLUForward(const int n, const Dtype* in, Dtype* out,
Dtype negative_sl... | 86ea71d91e5a0da64f5f4e16c5c6a110a3088cc1.cu | #include <algorithm>
#include <vector>
#include "caffe/layers/pixelwise_similarity_layer.hpp"
namespace caffe {
template <typename Dtype>
__global__ void ReLUForward(const int n, const Dtype* in, Dtype* out,
Dtype negative_slope) {
CUDA_KERNEL_LOOP(index, n) {
out[index] = in[index] > 0 ? in[index] : in[in... |
92166cfacaf912fe37cf73b27144829bb04a92b2.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 "histColorsKernel.cu"
#include<chrono>
#include<iostream>
using n... | 92166cfacaf912fe37cf73b27144829bb04a92b2.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 "histColorsKernel.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},... |
7a42cae925f38a6c4a7fa2156bc9d38199aa08c0.hip | // !!! This is a file automatically generated by hipify!!!
#include <opencv2/opencv.hpp>
#include <vector>
#include <cstring>
#include <gpu/gpu_img_transform_stream.cuh>
#include "gpu/gpu_utilities.cuh"
#include "common/utilities.hpp"
#include "gpu/gpu_img_transform.cuh"
int main(int argc, char **argv)
{
std::str... | 7a42cae925f38a6c4a7fa2156bc9d38199aa08c0.cu | #include <opencv2/opencv.hpp>
#include <vector>
#include <cstring>
#include <gpu/gpu_img_transform_stream.cuh>
#include "gpu/gpu_utilities.cuh"
#include "common/utilities.hpp"
#include "gpu/gpu_img_transform.cuh"
int main(int argc, char **argv)
{
std::string img_out; // default values in utilities.hpp
std::s... |
b312293a44302deb0d70243bb32ada91320ae024.hip | // !!! This is a file automatically generated by hipify!!!
#include "stdio.h"
#include "time.h"
#include <iostream>
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include "device_launch_parameters.h"
// Defining number of elements in Array
#define N 10000000
// Defining Kernel function for vector addition... | b312293a44302deb0d70243bb32ada91320ae024.cu | #include "stdio.h"
#include "time.h"
#include <iostream>
#include <cuda.h>
#include <cuda_runtime.h>
#include "device_launch_parameters.h"
// Defining number of elements in Array
#define N 10000000
// Defining Kernel function for vector addition
__global__ void gpuAdd(int *d_a, int *d_b, int *d_c)
{
// Getting block... |
08cbb6d190fe39cb978a8b7097a29186233221d7.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* Copyright (c) 2018, 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
*
... | 08cbb6d190fe39cb978a8b7097a29186233221d7.cu | /*
* Copyright (c) 2018, 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... |
9656cdb2f4d9aa2aacfb227e4e7738164e18c184.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <stdlib.h>
#include <fstream>
#include <string>
#include <cmath>
#include <climits>
#include <iostream>
#include <chrono>
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
using namespace std;
#define MAX_... | 9656cdb2f4d9aa2aacfb227e4e7738164e18c184.cu | #include <cuda.h>
#include <stdlib.h>
#include <fstream>
#include <string>
#include <cmath>
#include <climits>
#include <iostream>
#include <chrono>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
using namespace std;
#define MAX_THREAD_PER_BLOCK 512
#define DEBUG_PRINT
/*
PARALLEL NN - VERSION 2
*/... |
48570493ce1e4f42fd9de18599fee5ee22a4d2c6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "kernel_hip.cuh"
__global__ void raiseImageKernel(float *output, float *input, int width, int height, float factor)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
int j = threadIdx.y + blockIdx.y*blockDim.y;
if (i >= w... | 48570493ce1e4f42fd9de18599fee5ee22a4d2c6.cu | #include "kernel.cuh"
__global__ void raiseImageKernel(float *output, float *input, int width, int height, float factor)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
int j = threadIdx.y + blockIdx.y*blockDim.y;
if (i >= width || j >= height) return;
int idx = j*width + i;
output[idx] = factor * input[idx];
}... |
cc02799a4fd0f527eee0492544181c6a4746df9d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
nclude<stdio.h>
#include <stdlib.h>
#include <math.h>
#include <hiprand/hiprand.h>
#include <hiprand/hiprand_kernel.h>
#include <assert.h>
// Max-min normalization of input data with m samples and d features
void min_max_normaliz... | cc02799a4fd0f527eee0492544181c6a4746df9d.cu | nclude<stdio.h>
#include <stdlib.h>
#include <math.h>
#include <curand.h>
#include <curand_kernel.h>
#include <assert.h>
// Max-min normalization of input data with m samples and d features
void min_max_normalize(double *xs, int m, int d)
{
for (int x = 0; x < d; ++x) {
// calculate std for e... |
6606ebc8776b45eab4eefa08e7901044c7f87dee.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <iostream>
#include <fstream>
#include <cmath>
#include <sys/time.h>
void checkErrors(char *label)
{
// we need to synchronise first to catch errors due to
// asynchroneous operations that would otherwise
// potentially g... | 6606ebc8776b45eab4eefa08e7901044c7f87dee.cu | #include <iostream>
#include <fstream>
#include <cmath>
#include <sys/time.h>
void checkErrors(char *label)
{
// we need to synchronise first to catch errors due to
// asynchroneous operations that would otherwise
// potentially go unnoticed
cudaError_t err;
err = cudaThreadSynchronize();
if (err != cudaSuccess)
{
ch... |
10194087318c0f6e2ac3a08ccca08f2ff5f3194c.hip | // !!! This is a file automatically generated by hipify!!!
// File: mpi.cu
// C/Fortran interface to MPI.
// includes standard headers
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// includes cuda headers
#include <hip/hip_runtime.h>
// includes project headers
#include "cuda_globals.h"
#ifdef GPUDIRECT
... | 10194087318c0f6e2ac3a08ccca08f2ff5f3194c.cu | // File: mpi.cu
// C/Fortran interface to MPI.
// includes standard headers
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// includes cuda headers
#include <cuda_runtime.h>
// includes project headers
#include "cuda_globals.h"
#ifdef GPUDIRECT
// includes mpi headers
#undef SEEK_SET // remove compilation... |
42a219b3e81df18b1f6787e024bd69c6e4911e06.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <dlfcn.h>
#include <map>
#include <stdio.h>
#include <string>
using namespace std;
#ifdef __cplusplus
extern "C" {
#endif
#include "openacc_profiling.h"
#include "../timing.h"
static char* wrapper_funcname = 0;
static l... | 42a219b3e81df18b1f6787e024bd69c6e4911e06.cu | #include <cuda.h>
#include <dlfcn.h>
#include <map>
#include <stdio.h>
#include <string>
using namespace std;
#ifdef __cplusplus
extern "C" {
#endif
#include "openacc_profiling.h"
#include "../timing.h"
static char* wrapper_funcname = 0;
static long wrapper_lineno = 0;
map<string, int> regcounts;
int kernelgen_en... |
5f6d1773a5fa43343c9af9d2268fb4f414d5ddd9.hip | // !!! This is a file automatically generated by hipify!!!
// Copyright (c) 2009-2022 The Regents of the University of Michigan.
// Part of HOOMD-blue, released under the BSD 3-Clause License.
#include "hip/hip_runtime.h"
// Copyright (c) 2009-2021 The Regents of the University of Michigan
// This file is part of the ... | 5f6d1773a5fa43343c9af9d2268fb4f414d5ddd9.cu | // Copyright (c) 2009-2022 The Regents of the University of Michigan.
// Part of HOOMD-blue, released under the BSD 3-Clause License.
#include "hip/hip_runtime.h"
// Copyright (c) 2009-2021 The Regents of the University of Michigan
// This file is part of the HOOMD-blue project, released under the BSD 3-Clause License... |
7227b5cabf90752c2143c127cc9b4bee7dd96e2d.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 "MatrixOp.cu"
#include<chrono>
#include<iostream>
using namespace... | 7227b5cabf90752c2143c127cc9b4bee7dd96e2d.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 "MatrixOp.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},... |
d22c99b415f116b2a93ad9b8c4692844d3299d7d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
__global__ void addKernel_1(int n, float* x, float* y)
{
for (int i = 0; i < n; ++i)
{
y[i] = x[i] + y[i];
}
}
__global__ void addKernel_256(int n, floa... | d22c99b415f116b2a93ad9b8c4692844d3299d7d.cu | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
__global__ void addKernel_1(int n, float* x, float* y)
{
for (int i = 0; i < n; ++i)
{
y[i] = x[i] + y[i];
}
}
__global__ void addKernel_256(int n, float* x, float* y)
{
int index = threadIdx.x;
int stride ... |
741a2bf00f585ee4b37349879717384302b2b1d1.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <device_launch_parameters.h>
#include <iostream>
using namespace std;
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <cstring>
__global__ void mem_transfer_test(int* input) {
int tid = threadIdx.x;
... | 741a2bf00f585ee4b37349879717384302b2b1d1.cu | #include <cuda_runtime.h>
#include <device_launch_parameters.h>
#include <iostream>
using namespace std;
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <cstring>
__global__ void mem_transfer_test(int* input) {
int tid = threadIdx.x;
int offset = blockDim.x * blockIdx.x;
int gid = offset + ti... |
881bedb0e05cc18fc437dc76d6f3dc33fdf28cc9.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... | 881bedb0e05cc18fc437dc76d6f3dc33fdf28cc9.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... |
4861471e2863c4376ecbceac0cf14704e8872353.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Homework 1
// Color to Greyscale Conversion
//A common way to represent color images is known as RGBA - the color
//is specified by how much Red, Grean and Blue is in it.
//The 'A' stands for Alpha and is used for transparency, ... | 4861471e2863c4376ecbceac0cf14704e8872353.cu | // Homework 1
// Color to Greyscale Conversion
//A common way to represent color images is known as RGBA - the color
//is specified by how much Red, Grean and Blue is in it.
//The 'A' stands for Alpha and is used for transparency, it will be
//ignored in this homework.
//Each channel Red, Blue, Green and Alpha is rep... |
c9062b98c5797e135679f1edd2c1cf3e0f80c780.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you... | c9062b98c5797e135679f1edd2c1cf3e0f80c780.cu | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
2afb2bab7add726c9b6a2aa18054ed636619e8b6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licens... | 2afb2bab7add726c9b6a2aa18054ed636619e8b6.cu | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
9c165808bcebea2396d64628d1cfe99ef1492d4c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include "CudaObject.h"
namespace gpu_cuda {
__global__ void calcSigmoidForwardGPU(float *in, float *out, int elements)
{
int id = (blockIdx.x + blockIdx.y*gridDim.x) * blockDim.x + threadIdx.x;
if( id < ele... | 9c165808bcebea2396d64628d1cfe99ef1492d4c.cu | #include <stdio.h>
#include "CudaObject.h"
namespace gpu_cuda {
__global__ void calcSigmoidForwardGPU(float *in, float *out, int elements)
{
int id = (blockIdx.x + blockIdx.y*gridDim.x) * blockDim.x + threadIdx.x;
if( id < elements ){
float v = in[id];
v = 1.0f / (1.0f + exp( -v )); // sigmoid
out[id]... |
bde7b246e0fbfc84e220d1ff5b7eb37340a06972.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <aev.h>
#include <torch/extension.h>
#include <cuaev_cub.cuh>
#include <ATen/Context.h>
#include <ATen/hip/impl/HIPCachingAllocatorMasqueradingAsCUDA.h>
#include <c10/hip/HIPException.h>
#include <ATen/hip/impl/HIPGuardImp... | bde7b246e0fbfc84e220d1ff5b7eb37340a06972.cu | #include <aev.h>
#include <torch/extension.h>
#include <cuaev_cub.cuh>
#include <ATen/Context.h>
#include <c10/cuda/CUDACachingAllocator.h>
#include <c10/cuda/CUDAException.h>
#include <c10/cuda/CUDAGuard.h>
#include <c10/cuda/CUDAStream.h>
#include <vector>
#define PI 3.141592653589793
using torch::Tensor;
// fetch... |
88adebec1ccd20016dc5ca05e48272ff172ac234.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void Naive_Hist(int* d_result, int* d_hist, int n_vertices) {
//each block compares the same row to all others row2
int row = blockIdx.x;
int row2 = threadIdx.x;
bool equal;
//shared count for whol... | 88adebec1ccd20016dc5ca05e48272ff172ac234.cu | #include "includes.h"
__global__ void Naive_Hist(int* d_result, int* d_hist, int n_vertices) {
//each block compares the same row to all others row2
int row = blockIdx.x;
int row2 = threadIdx.x;
bool equal;
//shared count for whole block/same vertice
__shared__ int count;
//one thread sets count to zero and syncsthr... |
a9777e2626b742a6d97d9015f7bb6189d1c0e2d8.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <hip/hip_runtime.h>
#include "cudautils.h"
#include "tensor.h"
#include "matmul.cuh"
#include "sum.cuh"
const int BLOCK_SIZE = 32;
const int BLOCK_SIZE_SUM = 1024;
__global__ void linear(float *a, float *x, float *b, float *c, int ... | a9777e2626b742a6d97d9015f7bb6189d1c0e2d8.cu | #include <stdio.h>
#include <cuda.h>
#include "cudautils.h"
#include "tensor.h"
#include "matmul.cuh"
#include "sum.cuh"
const int BLOCK_SIZE = 32;
const int BLOCK_SIZE_SUM = 1024;
__global__ void linear(float *a, float *x, float *b, float *c, int m, int n, int k)
{
int row = blockIdx.y * blockDim.y + threadIdx.y... |
bc0bf134f29559cdc52bb5e8cde2679fc5234369.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <math_functions.h> // CUDA's, not caffe's, for fabs, signbit
#include <thrust/device_vector.h>
#include <thrust/functional.h> // thrust::plus
#include <thrust/reduce.h>
#include <cmath>
#include "common.hpp"
#include "m... | bc0bf134f29559cdc52bb5e8cde2679fc5234369.cu | #include <math_functions.h> // CUDA's, not caffe's, for fabs, signbit
#include <thrust/device_vector.h>
#include <thrust/functional.h> // thrust::plus
#include <thrust/reduce.h>
#include <cmath>
#include "common.hpp"
#include "math_functions.hpp"
namespace caffe {
template <>
void caffe_gpu_gemm<float>(const CBLA... |
cd79a6e29b1e43af82e06c7f9791d7c72a796015.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include<opencv2\imgproc.hpp>
#include <iostream>
#include<math.h>
__global__ void... | cd79a6e29b1e43af82e06c7f9791d7c72a796015.cu | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include<opencv2\imgproc.hpp>
#include <iostream>
#include<math.h>
__global__ void inclusiveScan(int* input, int * output,int* result,int space,... |
c3777a3b1db52f79061e36ecab218b4bee716e2d.hip | // !!! This is a file automatically generated by hipify!!!
#include "THHBlas.h"
#include "THHGeneral.h"
void THCudaBlas_init(THCState *state, int devices, int device)
{
THCBlasState *blas_state = state->blasState;
blas_state->handles = (hipblasHandle_t *)malloc(devices * sizeof(hipblasHandle_t));
for (int i = 0;... | c3777a3b1db52f79061e36ecab218b4bee716e2d.cu | #include "THCBlas.h"
#include "THCGeneral.h"
void THCudaBlas_init(THCState *state, int devices, int device)
{
THCBlasState *blas_state = state->blasState;
blas_state->handles = (cublasHandle_t *)malloc(devices * sizeof(cublasHandle_t));
for (int i = 0; i < devices; i++) {
// Create handle on each device:
... |
774fa15e724f1eaefb794e7d4dcd491bff602b0b.hip | // !!! This is a file automatically generated by hipify!!!
#include "data_structure/copyable_to_vec.h"
#include "intersect/accel/detail/clipped_triangle_impl.h"
#include "intersect/accel/sbvh/detail/generator.h"
#include "intersect/triangle_impl.h"
#include "lib/assert.h"
#include "lib/eigen_utils.h"
#include "lib/info... | 774fa15e724f1eaefb794e7d4dcd491bff602b0b.cu | #include "data_structure/copyable_to_vec.h"
#include "intersect/accel/detail/clipped_triangle_impl.h"
#include "intersect/accel/sbvh/detail/generator.h"
#include "intersect/triangle_impl.h"
#include "lib/assert.h"
#include "lib/eigen_utils.h"
#include "lib/info/timer.h"
#include <boost/function_output_iterator.hpp>
#... |
bd30981dc52452e8ab795adffea079f971cfb798.hip | // !!! This is a file automatically generated by hipify!!!
/*
* EXAMPLE OF MAPPING THREADS TO MULTIDIMENSIONAL DATA (BLUR IMAGE): CHAPTER 3
*
* WORK IN PROGRES...
*
*/
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include"lodepng.h"
#define CHECK_ERROR(call) { \
hipEr... | bd30981dc52452e8ab795adffea079f971cfb798.cu | /*
* EXAMPLE OF MAPPING THREADS TO MULTIDIMENSIONAL DATA (BLUR IMAGE): CHAPTER 3
*
* WORK IN PROGRES...
*
*/
#include <cuda.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include"lodepng.h"
#define CHECK_ERROR(call) { \
cudaError_t err = call; \
if (err != cudaSuccess) { \
printf("%s in %s a... |
4270bdcb95d79de0198dbe260772438a336b51db.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "util.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define H(a) (-a * log2f(a))
#define H2(a1, a2, p) (H(((float)(a1) + (p)) / ((float)(a1 + a2) + 1.0f)) + \
H(((float)(a2) + (1.0f - ... | 4270bdcb95d79de0198dbe260772438a336b51db.cu | #include "util.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define H(a) (-a * log2f(a))
#define H2(a1, a2, p) (H(((float)(a1) + (p)) / ((float)(a1 + a2) + 1.0f)) + \
H(((float)(a2) + (1.0f - p)) / ((float)(a1 + a2) + 1.0f)))
/* Makra do sumowania tablicy 2 x 3 x 3 */
#define SU... |
01c313c4cb8e7bb092075b32d608bf53bc93069b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifndef _OPTIMISATION_KERNEL_Z_H_
#define _OPTIMISATION_KERNEL_Z_H_
#include "GpGpu/GpGpu_StreamData.cuh"
#include "GpGpu/SData2Optimize.h"
// On pourrait imaginer un buffer des tailles calculer en parallel
// SIZEBUFFER[threadIdx... | 01c313c4cb8e7bb092075b32d608bf53bc93069b.cu | #ifndef _OPTIMISATION_KERNEL_Z_H_
#define _OPTIMISATION_KERNEL_Z_H_
#include "GpGpu/GpGpu_StreamData.cuh"
#include "GpGpu/SData2Optimize.h"
// On pourrait imaginer un buffer des tailles calculer en parallel
// SIZEBUFFER[threadIdx.x] = count(lI[threadIdx.x]);
__device__ void GetConeZ(short2 & aDz, int aZ, int MaxD... |
66828c017f8ee6fc0e8b92e8d2a113cdebee518a.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 "cudaSToOutput_kernel.cu"
#include<chrono>
#include<iostream>
usi... | 66828c017f8ee6fc0e8b92e8d2a113cdebee518a.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 "cudaSToOutput_kernel.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,... |
48dc96cb16d97942bc280bf29f4546180d531e4e.hip | // !!! This is a file automatically generated by hipify!!!
#include "device_atomic_functions.hpp"
#include "device_functions.hpp"
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include "ImgProcess.h"
#include <stdio.h>
#define Pi 3.14159265359
__global__ void general2final_kernel(int iw, int ih, ... | 48dc96cb16d97942bc280bf29f4546180d531e4e.cu | #include "device_atomic_functions.hpp"
#include "device_functions.hpp"
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "ImgProcess.h"
#include <stdio.h>
#define Pi 3.14159265359
__global__ void general2final_kernel(int iw, int ih, float *source, unsigned char *dest)
{
int x = blockDim.x*bloc... |
82d96785fde13da6feb2697d0181817505cc6601.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2018, 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... | 82d96785fde13da6feb2697d0181817505cc6601.cu | /*
* Copyright (c) 2018, 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 ... |
96ecd07a43f77dd751258668ee8f4a67111c33ac.hip | // !!! This is a file automatically generated by hipify!!!
#include <unistd.h>
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <hiprand/hiprand.h>
#include <hiprand/hiprand_kernel.h>
#include <iostream>
__global__ void init(unsigned int seed, hiprandState_t* states) {
/* we have to initialize the state */... | 96ecd07a43f77dd751258668ee8f4a67111c33ac.cu | #include <unistd.h>
#include <stdio.h>
#include <cuda.h>
#include <curand.h>
#include <curand_kernel.h>
#include <iostream>
__global__ void init(unsigned int seed, curandState_t* states) {
/* we have to initialize the state */
curand_init(seed, /* the seed can be the same for each core, here we pass the time in ... |
7b0dcf82cb56a03d3f49abd525924ebd652dd372.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
This program demonstrates the basics of working with cuda. We use
the GPU to add two arrays. We also introduce cuda's approach to
error handling and timing using cuda Events.
This is the main program. You should also loo... | 7b0dcf82cb56a03d3f49abd525924ebd652dd372.cu | /*
This program demonstrates the basics of working with cuda. We use
the GPU to add two arrays. We also introduce cuda's approach to
error handling and timing using cuda Events.
This is the main program. You should also look at the header add.h
for the important declarations, and then look at add.cu to see h... |
c75fecbbf1501e7d93f341f47ce6b721a125e6e1.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <algorithm>
#include <cfloat>
#include <vector>
#include "caffe/layers/focal_loss_layer.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <typename Dtype>
__global__ void LogOpGPU(const int nthrea... | c75fecbbf1501e7d93f341f47ce6b721a125e6e1.cu | #include <algorithm>
#include <cfloat>
#include <vector>
#include "caffe/layers/focal_loss_layer.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <typename Dtype>
__global__ void LogOpGPU(const int nthreads,
const Dtype* in, Dtype* out, const Dtype eps)
{
CUDA_KERNEL_LOOP(index, ... |
c5cd19fa02839e7267951bdf7fdb010e93de1287.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//===--- omptarget-nvptx.cu - NVPTX OpenMP GPU initialization ---- CUDA -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source... | c5cd19fa02839e7267951bdf7fdb010e93de1287.cu | //===--- omptarget-nvptx.cu - NVPTX OpenMP GPU initialization ---- CUDA -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.txt for details.
//
//===----------------------------------------... |
2734b1984823387362b36958772d0ca7d707bc1c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void replaceNaNKernel( int numberEntriesPerInstance, int numberIterations, float* source, float* destination) {
int instanceIndex = blockIdx.x;
int instanceStart = instanceIndex * numberEntriesPerI... | 2734b1984823387362b36958772d0ca7d707bc1c.cu | #include "includes.h"
__global__ void replaceNaNKernel( int numberEntriesPerInstance, int numberIterations, float* source, float* destination) {
int instanceIndex = blockIdx.x;
int instanceStart = instanceIndex * numberEntriesPerInstance;
int startWithinThread = instanceStart + blockIdx.y * blockDim.x * numberIterati... |
42ed3558bf14b4d2460aabdbe3e8f3ef500caa59.hip | // !!! This is a file automatically generated by hipify!!!
/* Compile: make
Execute: ./CNN
This file is the main file of all code and it will call the kernel functions from device.
*/
#define USE_MNIST_LOADER
#define MNIST_DOUBLE
#include "mnist.h"
#include "layer.h"
#include <hip/hip_runtime.h>
#include <cstdio... | 42ed3558bf14b4d2460aabdbe3e8f3ef500caa59.cu | /* Compile: make
Execute: ./CNN
This file is the main file of all code and it will call the kernel functions from device.
*/
#define USE_MNIST_LOADER
#define MNIST_DOUBLE
#include "mnist.h"
#include "layer.h"
#include <cuda.h>
#include <cstdio>
#include <time.h>
#define BLOCKSIZE 64
#define GRIDSIZE 64
static ... |
71f59fb5fc354db1b53b8ec1ef7d189459cb640f.hip | // !!! This is a file automatically generated by hipify!!!
#include <iostream>
#include <cstdio>
#include <hip/hip_runtime.h>
#include <device_launch_parameters.h>
#include <cmath>
using namespace std;
const int TILE_WIDTH = 16;
__global__ void MatrixMulKernel(int *d_M,int *d_N,int *d_P,int m,int n,int k)
{
__shared... | 71f59fb5fc354db1b53b8ec1ef7d189459cb640f.cu | #include <iostream>
#include <cstdio>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
#include <cmath>
using namespace std;
const int TILE_WIDTH = 16;
__global__ void MatrixMulKernel(int *d_M,int *d_N,int *d_P,int m,int n,int k)
{
__shared__ int ds_M[TILE_WIDTH][TILE_WIDTH];
__shared__ int ds_N[TIL... |
c5d4061dc48b748547153bc0ccdcf9068b56c1e2.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include "common.h"
#include "efficient.h"
#define USING_SHARED_MEMORY 1
namespace StreamCompaction {
namespace Efficient {
using StreamCompaction::Common::PerformanceTimer;
Perform... | c5d4061dc48b748547153bc0ccdcf9068b56c1e2.cu | #include <cuda.h>
#include <cuda_runtime.h>
#include "common.h"
#include "efficient.h"
#define USING_SHARED_MEMORY 1
namespace StreamCompaction {
namespace Efficient {
using StreamCompaction::Common::PerformanceTimer;
PerformanceTimer& timer()
{
static PerformanceTimer timer;
... |
fe5d4d54652032bb064f5bd5893e38a101958c36.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Copyright (c) 2020 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 ... | fe5d4d54652032bb064f5bd5893e38a101958c36.cu | /* Copyright (c) 2020 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... |
47bd5764a14b37ce7d63cca370e63eeac8abe6d5.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "rsbench_hip.cuh"
////////////////////////////////////////////////////////////////////////////////////
// BASELINE FUNCTIONS
////////////////////////////////////////////////////////////////////////////////////
// All "base... | 47bd5764a14b37ce7d63cca370e63eeac8abe6d5.cu | #include "rsbench.cuh"
////////////////////////////////////////////////////////////////////////////////////
// BASELINE FUNCTIONS
////////////////////////////////////////////////////////////////////////////////////
// All "baseline" code is at the top of this file. The baseline code is a simple
// implementation of th... |
np_boolean_mask_assign.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you und... | np_boolean_mask_assign.cu | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
c233a4d9aa07f77082a40a5be15c26fb412e1979.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <hip/hip_cooperative_groups.h>
#include <math.h>
#include <hipcub/hipcub.hpp>
#include <hipcub/hipcub.hpp>
#include "block_reduce.h"
#include "kernels.h"
namespace cg = cooperative_groups;
const float EPSILON = 1e-8f;
/... | c233a4d9aa07f77082a40a5be15c26fb412e1979.cu | #include <cooperative_groups.h>
#include <math.h>
#include <cub/block/block_load.cuh>
#include <cub/cub.cuh>
#include "block_reduce.h"
#include "kernels.h"
namespace cg = cooperative_groups;
const float EPSILON = 1e-8f;
/**
@brief: softmax_kernel
Softmax forward kernel for
enc-self-attn, dec-self-attn, encdec-att... |
6a7fc89bad987cb13b2b4491029b383c504c724e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "caffe2/core/context_gpu.h"
#include "upsample_wsl_op.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
namespace {
inline __device__ int idx(
const int n,
const int num_channels,
const int c,
const in... | 6a7fc89bad987cb13b2b4491029b383c504c724e.cu | #include "caffe2/core/context_gpu.h"
#include "upsample_wsl_op.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
namespace {
inline __device__ int idx(
const int n,
const int num_channels,
const int c,
const int height,
const int width,
const int y,
const int x) {
return ((n * num_ch... |
0d2d8073f2e251ca649396b069ca0cfc09acd721.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/********************************************************************
* cuda_2d_fdaco.cu
* This is an example of the CUDA program to calculate 2d acoustic
* wavefield using staggered-grid finite-difference like method with
* PM... | 0d2d8073f2e251ca649396b069ca0cfc09acd721.cu | /********************************************************************
* cuda_2d_fdaco.cu
* This is an example of the CUDA program to calculate 2d acoustic
* wavefield using staggered-grid finite-difference like method with
* PML absorbing boundary condition.
*
* Scripted by: Long Guihua
* Initiated time: ... |
5d1d229add82b776ab834dc46ced71db38b5b73e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "../common/book.h"
#include "../common/cpu_bitmap.h"
#define rnd(x) (x*rand()/RAND_MAX)
#define SPHERES 20
#define DIM 10240
#define INF 2e10f
struct Sphere{
float r, g, b;
float radius;
float x, y, z;
__devi... | 5d1d229add82b776ab834dc46ced71db38b5b73e.cu | #include "../common/book.h"
#include "../common/cpu_bitmap.h"
#define rnd(x) (x*rand()/RAND_MAX)
#define SPHERES 20
#define DIM 10240
#define INF 2e10f
struct Sphere{
float r, g, b;
float radius;
float x, y, z;
__device__ float hit(float ox, float oy, float *n){
float dx = ox - x;
float dy = oy -... |
bc5dc187188bca282226544be21cab190d4496af.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License,... | bc5dc187188bca282226544be21cab190d4496af.cu | /*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
0f54fdc7936218753cc464b52807de332c4cc642.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <algorithm>
#include <vector>
#include "caffe/layers/brelu_layer.hpp"
namespace caffe {
template <typename Dtype>
__global__ void BReLUForward(const int n, const Dtype* in, Dtype* out,
Dtype minval, Dtype maxval) {
... | 0f54fdc7936218753cc464b52807de332c4cc642.cu | #include <algorithm>
#include <vector>
#include "caffe/layers/brelu_layer.hpp"
namespace caffe {
template <typename Dtype>
__global__ void BReLUForward(const int n, const Dtype* in, Dtype* out,
Dtype minval, Dtype maxval) {
CUDA_KERNEL_LOOP(index, n) {
out[index] = in[index] < 1 ? (in[index] > 0 ? in[index... |
85992b75f0763f3d3a849d5339f6a8c085bd53e7.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//
// Copyright (c) 2019, 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:
// * Redi... | 85992b75f0763f3d3a849d5339f6a8c085bd53e7.cu | //
// Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of co... |
90c58ab01bf07796b5329024b3691d2dd2e26a7b.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you und... | 90c58ab01bf07796b5329024b3691d2dd2e26a7b.cu | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
3129e62f61f3551f6c68d9594f46a805ea4bec57.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* Copyright (c) 2018-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
... | 3129e62f61f3551f6c68d9594f46a805ea4bec57.cu | /*
* Copyright (c) 2018-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
52ee3812a4b20cf1c0ed018a73cb0904dd020303.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//
// auto-generated by ops.py
//
__constant__ int xdim0_tea_leaf_ppcg_inner2_kernel;
int xdim0_tea_leaf_ppcg_inner2_kernel_h = -1;
__constant__ int xdim1_tea_leaf_ppcg_inner2_kernel;
int xdim1_tea_leaf_ppcg_inner2_kernel_h = -1;
__... | 52ee3812a4b20cf1c0ed018a73cb0904dd020303.cu | //
// auto-generated by ops.py
//
__constant__ int xdim0_tea_leaf_ppcg_inner2_kernel;
int xdim0_tea_leaf_ppcg_inner2_kernel_h = -1;
__constant__ int xdim1_tea_leaf_ppcg_inner2_kernel;
int xdim1_tea_leaf_ppcg_inner2_kernel_h = -1;
__constant__ int xdim2_tea_leaf_ppcg_inner2_kernel;
int xdim2_tea_leaf_ppcg_inner2_kernel_... |
f3a0bfaf8dc132d56e0c13ee8802892494440811.hip | // !!! This is a file automatically generated by hipify!!!
#ifndef THC_GENERIC_FILE
#define THC_GENERIC_FILE "THH/generic/THHTensorMathMagma.hip"
#else
#include <c10/hip/HIPException.h>
#if defined(THC_REAL_IS_FLOAT) || defined(THC_REAL_IS_DOUBLE)
#ifdef USE_MAGMA
static void THCTensor_(copyArray1d)(THCState *state... | f3a0bfaf8dc132d56e0c13ee8802892494440811.cu | #ifndef THC_GENERIC_FILE
#define THC_GENERIC_FILE "THC/generic/THCTensorMathMagma.cu"
#else
#include <c10/cuda/CUDAException.h>
#if defined(THC_REAL_IS_FLOAT) || defined(THC_REAL_IS_DOUBLE)
#ifdef USE_MAGMA
static void THCTensor_(copyArray1d)(THCState *state, THCTensor *self, scalar_t *src, int k)
{
int64_t size[... |
c28472d933a59ea2ef657d21cc0633203edc76de.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
-- MAGMA (version 2.1.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date August 2016
@generated from sparse-iter/blas/ziteric.cu, normal z -> ... | c28472d933a59ea2ef657d21cc0633203edc76de.cu | /*
-- MAGMA (version 2.1.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date August 2016
@generated from sparse-iter/blas/ziteric.cu, normal z -> d, Tue Aug 30 09:38:46 2016
*/
#include "magmasparse_internal.h"
#define PRECISION_d
... |
78ef955b693710f75521d765be716cfde2b510bd.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "THHTensorMath.h"
#include "THHGeneral.h"
#include "THHBlas.h"
#include "THHTensorCopy.h"
#include "THHApply.cuh"
#include "THHReduce.cuh"
#include <thrust/functional.h>
/* Perform an inclusive scan along an outer dimensi... | 78ef955b693710f75521d765be716cfde2b510bd.cu | #include "THCTensorMath.h"
#include "THCGeneral.h"
#include "THCBlas.h"
#include "THCTensorCopy.h"
#include "THCApply.cuh"
#include "THCReduce.cuh"
#include <thrust/functional.h>
/* Perform an inclusive scan along an outer dimension of a tensor.
*
* - num_orows is the size of the flattened outer dimensions;
* - nu... |
e3ead60641202fc2715569a17fcdb84241606239.hip | // !!! This is a file automatically generated by hipify!!!
#include <ATen/ATen.h>
#include <ATen/TensorAccessor.h>
#include <ATen/hip/HIPContext.h>
#include <THH/THHGeneral.h>
#include <utility>
#include "cub_utils.cuh"
template <typename ScalarT, template<typename> typename PtrTraits, typename IndexT>
struct Scopes... | e3ead60641202fc2715569a17fcdb84241606239.cu | #include <ATen/ATen.h>
#include <ATen/TensorAccessor.h>
#include <ATen/cuda/CUDAContext.h>
#include <THC/THCGeneral.h>
#include <utility>
#include "cub_utils.cuh"
template <typename ScalarT, template<typename> typename PtrTraits, typename IndexT>
struct ScopesToOffsetIterator : std::iterator<std::random_access_itera... |
5484e87362e08c27fe4f8e1d36fb4e8452689b10.hip | // !!! This is a file automatically generated by hipify!!!
/* Copyright 2014. The Regents of the University of California.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2014 Martin Uecker <uecker@eecs.berkeley.edu>
*/
#i... | 5484e87362e08c27fe4f8e1d36fb4e8452689b10.cu | /* Copyright 2014. The Regents of the University of California.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2014 Martin Uecker <uecker@eecs.berkeley.edu>
*/
#include <complex.h>
#include <assert.h>
#include <stdbool.h>... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.