hip_filename stringlengths 5 84 | hip_content stringlengths 79 9.69M | cuda_filename stringlengths 4 83 | cuda_content stringlengths 19 9.69M |
|---|---|---|---|
21740db472db1187edbd0b327f10a048c61259a2.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <THHUNN/THHUNN.h>
#include <TH/THHalf.h>
#include <THHUNN/THHHalfAutoNumerics.cuh>
#include <THH/THHAtomics.cuh>
#include <THHUNN/common.h>
#include <THH/THHDeviceTensor.cuh>
#include <THH/THHDeviceTensorUtils.cuh>
#include... | 21740db472db1187edbd0b327f10a048c61259a2.cu | #include <THCUNN/THCUNN.h>
#include <TH/THHalf.h>
#include <THCUNN/THCHalfAutoNumerics.cuh>
#include <THC/THCAtomics.cuh>
#include <THCUNN/common.h>
#include <THC/THCDeviceTensor.cuh>
#include <THC/THCDeviceTensorUtils.cuh>
#include <THC/THCDeviceUtils.cuh>
#include <THC/THCApply.cuh>
#include <c10/macros/Macros.h>
#i... |
066acdeb4bbcbdd76451f68ab887ab7b8cda30ee.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 "sd_t_s1_5_kernel.cu"
#include<chrono>
#include<iostream>
using n... | 066acdeb4bbcbdd76451f68ab887ab7b8cda30ee.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 "sd_t_s1_5_kernel.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},... |
3183ad40f09c398a71a717c323b314871cb85ab3.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest.h>
#include <taskflow/taskflow.hpp>
#define L2(x1, y1, x2, y2) ((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2))
// Each point (thread) computes its distance to each centroid
// and... | 3183ad40f09c398a71a717c323b314871cb85ab3.cu | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest.h>
#include <taskflow/taskflow.hpp>
#define L2(x1, y1, x2, y2) ((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2))
// Each point (thread) computes its distance to each centroid
// and adds its x and y values to the sum of its closest
// centroid, as well as incrementing ... |
b20ae5c3f5f2b75c5c529ca8247d8415c1065b2e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <iostream>
#define INDEX_NUM 3
#define INDEX_SUM 0
#define INDEX_MAX 1
#define INDEX_MIN 2
#define NUM_MAX 1024
#define ITEMS_NUM (1 << 20)
#define BLOCK_SIZE 256
using namespace std;
// TODO-1 => ./task_no_atomic
//... | b20ae5c3f5f2b75c5c529ca8247d8415c1065b2e.cu | #include <iostream>
#define INDEX_NUM 3
#define INDEX_SUM 0
#define INDEX_MAX 1
#define INDEX_MIN 2
#define NUM_MAX 1024
#define ITEMS_NUM (1 << 20)
#define BLOCK_SIZE 256
using namespace std;
// TODO-1 => ./task_no_atomic
// 1 thread does all compute, no atomic/sync
// thread.0 of block.0 computes everything
__... |
245a601d14da80996338564e4cb788e196752668.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdlib.h>
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <iostream>
#include <stddef.h>
#include <limits.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct ... | 245a601d14da80996338564e4cb788e196752668.cu | #include <stdlib.h>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <iostream>
#include <stddef.h>
#include <limits.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct test_struct {
void * r;
int ... |
33631e01fdd7a72c145f162b552e1d85a83e6f63.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>
hipError_t addWithCuda(int *c, const int *a, const int *b, unsigned int size);
__global__ void addKernel(int *c, const int *a, const int *b){
int i = th... | 33631e01fdd7a72c145f162b552e1d85a83e6f63.cu |
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <stdlib.h>
cudaError_t addWithCuda(int *c, const int *a, const int *b, unsigned int size);
__global__ void addKernel(int *c, const int *a, const int *b){
int i = threadIdx.x;
c[i] = a[i] + b[i];
}
int main(){
const int arr... |
82e9cb360f0c3563d12f4be26e3d308248ebd050.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (C) 2020 ByteDance Inc
*
* 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... | 82e9cb360f0c3563d12f4be26e3d308248ebd050.cu | /*
* Copyright (C) 2020 ByteDance Inc
*
* 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 agr... |
4b8ddb42f7a4ed568bd25c4c85dfde9519ea0d64.hip | // !!! This is a file automatically generated by hipify!!!
//
// Created by Francisco Jos Gonzlez Garca.
// Copyright (c) 2020 Universidad de Granada. All rights reserved.
//
#include <iostream>
#include <vector>
#include "matrices_test.h"
#include "tests.h"
#include <omp.h>
#include <CSR.h>
#include "readers.h"
int m... | 4b8ddb42f7a4ed568bd25c4c85dfde9519ea0d64.cu | //
// Created by Francisco José González García.
// Copyright (c) 2020 Universidad de Granada. All rights reserved.
//
#include <iostream>
#include <vector>
#include "matrices_test.h"
#include "tests.h"
#include <omp.h>
#include <CSR.h>
#include "readers.h"
int main(int argc, char **argv) {
if (argc < 5) {
... |
6fdd3e0b9fff46ba5d180ae50c0486336481face.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
extern "C"
__global__ void vec_set (size_t n, double *result, double value)
{
int id = threadIdx.x + blockIdx.x * blockDim.x;
if (id < n)
{
result[id] = value;
}
}
//=== Vector arithmetic ================... | 6fdd3e0b9fff46ba5d180ae50c0486336481face.cu |
extern "C"
__global__ void vec_set (size_t n, double *result, double value)
{
int id = threadIdx.x + blockIdx.x * blockDim.x;
if (id < n)
{
result[id] = value;
}
}
//=== Vector arithmetic ======================================================
extern "C"
__global__ void vec_add (size_t n, do... |
09e0bf25b3ee77d677ecc3154ff7f4c64e1674b8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#define CUDPP_STATIC_LIB
#include <stdio.h>
// #include <cutil_inline.h>
#include "/Volumes/Macintosh HD/Developer/NVIDIA/CUDA-7.5/samples/common/inc/helper_cuda.h"
#include <stdi... | 09e0bf25b3ee77d677ecc3154ff7f4c64e1674b8.cu | #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#define CUDPP_STATIC_LIB
#include <stdio.h>
// #include <cutil_inline.h>
#include "/Volumes/Macintosh HD/Developer/NVIDIA/CUDA-7.5/samples/common/inc/helper_cuda.h"
#include <stdio.h> /* defines printf for tests */
#include <time.h> /* defines time_t for t... |
ea25d93e134ac188d796917d44794db0fb28286e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
Copyright (c) 2021-2022, The Neko Authors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistribut... | ea25d93e134ac188d796917d44794db0fb28286e.cu | /*
Copyright (c) 2021-2022, The Neko Authors
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 conditions... |
5a0a713f7736e1de750ef29ba8d7dfbac6f8492b.hip | // !!! This is a file automatically generated by hipify!!!
/*
multiply.cu -- Matrix multiplication testbench - by Cody Rivera
*/
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include "hip/hip_runtime.h"
#include "rocblas.h"
#include "multiply.cuh"
#include "kernels_hip.cuh"
#define EPS 10e-3
#define MAX... | 5a0a713f7736e1de750ef29ba8d7dfbac6f8492b.cu | /*
multiply.cu -- Matrix multiplication testbench - by Cody Rivera
*/
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include "cuda_runtime.h"
#include "cublas_v2.h"
#include "multiply.cuh"
#include "kernels.cuh"
#define EPS 10e-3
#define MAX_TILES 255
/*
Helper functions
*/
#include "parameters.cuh... |
b1a993eb1929220167c3c9174654b5162878dfb7.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Based on CUDA SDK template from NVIDIA
// sgm algorithm adapted from http://lunokhod.org/?p=1403
// includes, system
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <unistd.h>
#include <ass... | b1a993eb1929220167c3c9174654b5162878dfb7.cu |
// Based on CUDA SDK template from NVIDIA
// sgm algorithm adapted from http://lunokhod.org/?p=1403
// includes, system
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <unistd.h>
#include <assert.h>
#include <float.h>
#include <stdlib.h>
#include <limits.h>
#include <limits>
#in... |
b26e1d0a092c62a28675609e82dbc8efe5458b5e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "common.h"
void checkCUDAErrorFn(const char *msg, const char *file, int line) {
hipError_t err = hipGetLastError();
if (hipSuccess == err) {
return;
}
fprintf(stderr, "CUDA error");
if (file) {... | b26e1d0a092c62a28675609e82dbc8efe5458b5e.cu | #include "common.h"
void checkCUDAErrorFn(const char *msg, const char *file, int line) {
cudaError_t err = cudaGetLastError();
if (cudaSuccess == err) {
return;
}
fprintf(stderr, "CUDA error");
if (file) {
fprintf(stderr, " (%s:%d)", file, line);
}
fprintf(stderr, ": %s: %s... |
402346c4a2c17ae69325598af4f453a09208fc9d.hip | // !!! This is a file automatically generated by hipify!!!
/*
Jueguito:
1) Sea h[i] el numero de granitos en el sitio i, 0<i<N-1.
2) Si h[i]>1 el sitio i esta "activo".
3) Al tiempo t, un sitio "activo" se "descarga" completamente tirando cada uno de sus granitos aleatoriamente y con igual probabilidad a la izquierd... | 402346c4a2c17ae69325598af4f453a09208fc9d.cu | /*
Jueguito:
1) Sea h[i] el numero de granitos en el sitio i, 0<i<N-1.
2) Si h[i]>1 el sitio i esta "activo".
3) Al tiempo t, un sitio "activo" se "descarga" completamente tirando cada uno de sus granitos aleatoriamente y con igual probabilidad a la izquierda o a la derecha (el numero total de granitos entonces se c... |
6ebea078332d3cb9e5fb47624da6e2dea4f9b053.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "GPUGDScheduler.h"
#include <fstream>
#include <ctime>
extern char* LOG_DIRECTORY;
extern idx_t SERVER_RANK;
GPUGDSchedulerImp::GPUGDSchedulerImp() : sparse_data(NULL), sparse_testdata(NULL), model(NULL), para(NULL), gpuE... | 6ebea078332d3cb9e5fb47624da6e2dea4f9b053.cu | #include "GPUGDScheduler.h"
#include <fstream>
#include <ctime>
extern char* LOG_DIRECTORY;
extern idx_t SERVER_RANK;
GPUGDSchedulerImp::GPUGDSchedulerImp() : sparse_data(NULL), sparse_testdata(NULL), model(NULL), para(NULL), gpuEV(NULL){
//idx_t n_gpus = 4;
idx_t n_gpus = 2;
gpuEV.resize(n_gpus);
fo... |
b5094616b5b7b9d00ae23314d4cfa5dfc4cee5bb.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "layer_params.h"
void ConvLayerParams::initializeValues(cudnnHandle_t cudnn_handle, ConvDescriptor *user_params, cudnnDataType_t data_type,
int batch_size, cudnnTensorFormat_t tensor_format, size_t data_type_size... | b5094616b5b7b9d00ae23314d4cfa5dfc4cee5bb.cu | #include "layer_params.h"
void ConvLayerParams::initializeValues(cudnnHandle_t cudnn_handle, ConvDescriptor *user_params, cudnnDataType_t data_type,
int batch_size, cudnnTensorFormat_t tensor_format, size_t data_type_size, LayerDimension &output_size,
UpdateRule update_rule) {
// create tensor, fi... |
5734e597381ea664b6d3caa904e22bdd8f65758d.hip | // !!! This is a file automatically generated by hipify!!!
#include "G4HepEmMaterialData.hh"
#include <hip/hip_runtime.h>
#include "G4HepEmCuUtils.hh"
#include <iostream>
void CopyMaterialDataToGPU(struct G4HepEmMaterialData* onCPU, struct G4HepEmMaterialData** onGPU) {
// clean away previous (if any)
FreeMate... | 5734e597381ea664b6d3caa904e22bdd8f65758d.cu |
#include "G4HepEmMaterialData.hh"
#include <cuda_runtime.h>
#include "G4HepEmCuUtils.hh"
#include <iostream>
void CopyMaterialDataToGPU(struct G4HepEmMaterialData* onCPU, struct G4HepEmMaterialData** onGPU) {
// clean away previous (if any)
FreeMaterialDataOnGPU ( onGPU );
//
int numMatData = onCPU->fNumM... |
4072733f8bd9e9f4e88c02b6471e27115db593d8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void Fprop2(const float* layer1, const float* syn2, float* out)
{
int i = blockDim.y*blockIdx.y + threadIdx.y; //10
int j = blockIdx.x; //Data.count
//int k = threadIdx.x; //256
float x = 0.0;
for (... | 4072733f8bd9e9f4e88c02b6471e27115db593d8.cu | #include "includes.h"
__global__ void Fprop2(const float* layer1, const float* syn2, float* out)
{
int i = blockDim.y*blockIdx.y + threadIdx.y; //10
int j = blockIdx.x; //Data.count
//int k = threadIdx.x; //256
float x = 0.0;
for (int k=0; k < 256; ++k)
x += layer1[j*256 + k] * syn2[k*10 + i];
out[j*10 + i] = x;
} |
282c56978be712946778d5f66148c25e8b86743d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//pass
//--gridDim=[256,1,1] --blockDim=[128,1,1]
#include "common.h"
__global__ void
classifyVoxel(uint *voxelVerts, uint *voxelOccupied, uchar *volume,
uint3 gridSize, uint3 gridSizeShift, uint3 gridSizeMask, uint ... | 282c56978be712946778d5f66148c25e8b86743d.cu | //pass
//--gridDim=[256,1,1] --blockDim=[128,1,1]
#include "common.h"
__global__ void
classifyVoxel(uint *voxelVerts, uint *voxelOccupied, uchar *volume,
uint3 gridSize, uint3 gridSizeShift, uint3 gridSizeMask, uint numVoxels,
float3 voxelSize, float isoValue)
{
uint blockId = __mul24(... |
d81f57b8c2dd087124208a4b324e7d839deb29f1.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h> // API de CUDA
#include <cutil_inline.h> // macros para verificar llamadas
#include <stdio.h>
#include <stdlib.h>
#include "../../common/colorstuff.h" // conversin de [0,1] a color
#include "../../common/sdlstuff.h... | d81f57b8c2dd087124208a4b324e7d839deb29f1.cu | #include <cuda.h> // API de CUDA
#include <cutil_inline.h> // macros para verificar llamadas
#include <stdio.h>
#include <stdlib.h>
#include "../../common/colorstuff.h" // conversión de [0,1] a color
#include "../../common/sdlstuff.h" // gráficos
// Longitud de la escala de colores en pixels
//... |
4b3d5bb27ca5b3eb8ba48510d084ef4789dd2063.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <hip/hip_fp16.h>
#include "PoolExecution.hpp"
#include <float.h>
#include "MNNCUDADefine.hpp"
namespace MNN {
namespace CUDA {
#define HALF_MIN half(-65504)
#define HALF2_MIN half2(-65504, -65504)
#define MNN_CUDA_HALF2_MA... | 4b3d5bb27ca5b3eb8ba48510d084ef4789dd2063.cu | #include <cuda_fp16.h>
#include "PoolExecution.hpp"
#include <float.h>
#include "MNNCUDADefine.hpp"
namespace MNN {
namespace CUDA {
#define HALF_MIN half(-65504)
#define HALF2_MIN half2(-65504, -65504)
#define MNN_CUDA_HALF2_MAX(a, b) \
do { \
... |
fa9b41f26bfd847f028d0736faf18cdb16d4d511.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
*... | fa9b41f26bfd847f028d0736faf18cdb16d4d511.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... |
f29010e7e41597ec565b6a4b1a843a720c88b434.hip | // !!! This is a file automatically generated by hipify!!!
#include <iostream>
#include <stdlib.h>
#include <ctime>
#include <vector>
#include <hiprand/hiprand.h>
#include <hip/hip_runtime.h>
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <thrust/sort.h>
#include <thrust/execution_policy.h>
... | f29010e7e41597ec565b6a4b1a843a720c88b434.cu | #include <iostream>
#include <stdlib.h>
#include <ctime>
#include <vector>
#include <curand.h>
#include <cuda.h>
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <thrust/sort.h>
#include <thrust/execution_policy.h>
#define MIN(a, b) (((a)<(b)?(a):(b)))
__device__
float source(float rand_b) ... |
8c52969c0b6709b1de865c155aa6cfb2f0863f33.hip | // !!! This is a file automatically generated by hipify!!!
extern "C" {
#include "../shape/head.h"
}
#define GOLD 1.618034
#define GLIMIT 100.0
#define TINY 1.0e-20
//#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define SIGN(a,b) ((b) > 0.0 ? fabs(a) : -fabs(a))
#define SHFT(a,b,c,d) (a)=(b);(b)=(c);(c)=(d);
__host__ voi... | 8c52969c0b6709b1de865c155aa6cfb2f0863f33.cu | extern "C" {
#include "../shape/head.h"
}
#define GOLD 1.618034
#define GLIMIT 100.0
#define TINY 1.0e-20
//#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define SIGN(a,b) ((b) > 0.0 ? fabs(a) : -fabs(a))
#define SHFT(a,b,c,d) (a)=(b);(b)=(c);(c)=(d);
__host__ void mnbrak_gpu(
double *ax,
double *bx,
double *cx,
d... |
02b81fb4715af02cff4be19902da6b783722d58e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include<stdio.h>
#include<cuda.h>
#include<hiprand/hiprand.h>
#include<iostream>
#include<stdlib.h>
#include<time.h>
#include<cstdio>
#include <assert.h>
#define M 500
#define N 500
#define K 400
#define C 100
using namespace st... | 02b81fb4715af02cff4be19902da6b783722d58e.cu |
#include<stdio.h>
#include<cuda.h>
#include<curand.h>
#include<iostream>
#include<stdlib.h>
#include<time.h>
#include<cstdio>
#include <assert.h>
#define M 500
#define N 500
#define K 400
#define C 100
using namespace std;
__global__ void multi_kernel(int *mn,int *m, int *n){
int xbidx = blockIdx.x;
int ybidx =... |
755b8527ea691103ff0a9f717cdad702876dcfe8.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 "nodiag_normalize.cu"
#include<chrono>
#include<iostream>
using n... | 755b8527ea691103ff0a9f717cdad702876dcfe8.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 "nodiag_normalize.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},... |
03ee057180efe31fb7ab9da534d8ef5e681f5259.hip | // !!! This is a file automatically generated by hipify!!!
//
// SkyNet Project
// Copyright (C) 2018 by Contributors <https://github.com/Tyill/skynet>
//
// This code is licensed under the MIT License.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated... | 03ee057180efe31fb7ab9da534d8ef5e681f5259.cu | //
// SkyNet Project
// Copyright (C) 2018 by Contributors <https://github.com/Tyill/skynet>
//
// This code is licensed under the MIT License.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Sof... |
569f15ae8628b01194b8a2d6bdec00dc28981899.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <wb.h>
#define wbCheck(stmt) \
do { \
hipError_t err = stmt; ... | 569f15ae8628b01194b8a2d6bdec00dc28981899.cu | #include <wb.h>
#define wbCheck(stmt) \
do { \
cudaError_t err = stmt; \
if (err != cudaSuccess) { \... |
203271b22c9b6ef9b87d0532d03546c77771727d.hip | // !!! This is a file automatically generated by hipify!!!
#include <iostream>
#include <hip/hip_runtime.h>
#include "Graph.h"
#define MAX_THREAD_COUNT 1024
#define CEIL(a, b) ((a - 1) / b + 1)
#define catchCudaError(error) { gpuAssert((error), __FILE__, __LINE__); }
using namespace std;
float device_time_taken;
vo... | 203271b22c9b6ef9b87d0532d03546c77771727d.cu | #include <iostream>
#include <cuda.h>
#include "Graph.h"
#define MAX_THREAD_COUNT 1024
#define CEIL(a, b) ((a - 1) / b + 1)
#define catchCudaError(error) { gpuAssert((error), __FILE__, __LINE__); }
using namespace std;
float device_time_taken;
void printTime(float ms) {
printf("%d,", (int)ms);
}
inline void gpuA... |
bff7e1cca02c1733e5a4c28dc1462d7790323544.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include<stdio.h>
#include<math.h>
#define N 512
__global__ void inclusive_scan(int *d_in)
{
__shared__ int temp_in[N];
int i = threadIdx.x;
temp_in[i] = d_in[i];
__syncthreads();
for(uns... | bff7e1cca02c1733e5a4c28dc1462d7790323544.cu | #include<stdio.h>
#include<math.h>
#define N 512
__global__ void inclusive_scan(int *d_in)
{
__shared__ int temp_in[N];
int i = threadIdx.x;
temp_in[i] = d_in[i];
__syncthreads();
for(unsigned int s = 1; s <= N-1; s <<= 1)
{
if((i >= s) && (i < N)) {
... |
e569a13e9aab857bb5d55248e8afcba79d4dbe87.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... | e569a13e9aab857bb5d55248e8afcba79d4dbe87.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... |
f4e84ea5db2f40eb7ace02772ccfd38cdc176eea.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Author: Ulises Olivares
// uolivares@unam.mx
// Oct 22, 2020
#include<iostream>
#include<stdio.h>
#include<time.h>
#include<cstdlib>
#include<math.h>
#include <unistd.h>
#define n 99999999 // input/output 1D array size
#defi... | f4e84ea5db2f40eb7ace02772ccfd38cdc176eea.cu | // Author: Ulises Olivares
// uolivares@unam.mx
// Oct 22, 2020
#include<iostream>
#include<stdio.h>
#include<time.h>
#include<cstdlib>
#include<math.h>
#include <unistd.h>
#define n 99999999 // input/output 1D array size
#define m 9999 //assume mask size as odd
#define TILE_SIZE 1024
#define MAX_MASK_WIDTH 256... |
2497e73c643f6dbcefb7a8c9a4241ca6c79cd797.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// 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
/... | 2497e73c643f6dbcefb7a8c9a4241ca6c79cd797.cu | // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed ... |
7f7c2e78686f5b23da3617e01fc21b4e44bee80d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#pragma once
#include "kernel.cu.h"
Timer timer1;
int main(){
//test();
//DLCode();
//testRand();
DL_encapsulated();
hipDeviceReset();
}
__global__ void uniformTest_kernel(double* d_samples, hiprandState_t* d_localstates)
{
... | 7f7c2e78686f5b23da3617e01fc21b4e44bee80d.cu | #pragma once
#include "kernel.cu.h"
Timer timer1;
int main(){
//test();
//DLCode();
//testRand();
DL_encapsulated();
cudaDeviceReset();
}
__global__ void uniformTest_kernel(double* d_samples, curandState_t* d_localstates)
{
int length = 16;
int sid = threadIdx.x * length;
curandState_t localState = d_localst... |
03eea4c453ae7cf9444dfaf8d39eeb2c60befc3f.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void squareMatrixMult(float *d_a, float *d_b, float *d_result, int n)
{
__shared__ float tile_a[BLOCK_SIZE][BLOCK_SIZE];
__shared__ float tile_b[BLOCK_SIZE][BLOCK_SIZE];
int row = blockIdx.y * BLOCK... | 03eea4c453ae7cf9444dfaf8d39eeb2c60befc3f.cu | #include "includes.h"
__global__ void squareMatrixMult(float *d_a, float *d_b, float *d_result, int n)
{
__shared__ float tile_a[BLOCK_SIZE][BLOCK_SIZE];
__shared__ float tile_b[BLOCK_SIZE][BLOCK_SIZE];
int row = blockIdx.y * BLOCK_SIZE + threadIdx.y;
int col = blockIdx.x * BLOCK_SIZE + threadIdx.x;
float tmp = 0;
int... |
46613d5551ac2addecd20bfeba655b343e460bc1.hip | // !!! This is a file automatically generated by hipify!!!
#include "cuseful.h"
#include "R.h"
#include "kendall.h"
#include "hip/hiprtc.h"
#include "hip/hip_runtime.h"
#define NUMTHREADS 16
#define NVRTC_SAFE_CALL(x) \
do { ... | 46613d5551ac2addecd20bfeba655b343e460bc1.cu | #include "cuseful.h"
#include "R.h"
#include "kendall.h"
#include "nvrtc.h"
#include "cuda.h"
#define NUMTHREADS 16
#define NVRTC_SAFE_CALL(x) \
do { \
nvrtcResult result = x; ... |
8201adabffbc7474b2c4618ea7bff16b2d5af243.hip | // !!! This is a file automatically generated by hipify!!!
#include <cuwrap/kernels/mul.hpp>
#include <initializer_list>
#include <tuple>
namespace cuwrap {
template <typename T>
__global__ void kmul(T* lhs, T* rhs, T* out, std::size_t maxn)
{
int index = (blockDim.x * blockIdx.x) + threadIdx.x; // Thread id in o... | 8201adabffbc7474b2c4618ea7bff16b2d5af243.cu | #include <cuwrap/kernels/mul.hpp>
#include <initializer_list>
#include <tuple>
namespace cuwrap {
template <typename T>
__global__ void kmul(T* lhs, T* rhs, T* out, std::size_t maxn)
{
int index = (blockDim.x * blockIdx.x) + threadIdx.x; // Thread id in one grid.
int stride = gridDim.x * blockDim.x; // Thread... |
a71a9be804a2ffb8c39bf9bd1ce34297422a1613.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "pointwise_hist2.cuh"
#include "split_properties_helpers.cuh"
#include <catboost/cuda/cuda_lib/kernel/arch.cuh>
#include <catboost/cuda/cuda_util/kernel/instructions.cuh>
#include <catboost/cuda/cuda_util/kernel/kernel_hel... | a71a9be804a2ffb8c39bf9bd1ce34297422a1613.cu | #include "pointwise_hist2.cuh"
#include "split_properties_helpers.cuh"
#include <catboost/cuda/cuda_lib/kernel/arch.cuh>
#include <catboost/cuda/cuda_util/kernel/instructions.cuh>
#include <catboost/cuda/cuda_util/kernel/kernel_helpers.cuh>
#include <catboost/cuda/cuda_lib/kernel/arch.cuh>
namespace NKernel
{
t... |
8cd1cbb5f5a667e99ebff245cdbe02ae0037eebd.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "caffe2/operators/atan_op.h"
#include <algorithm>
#include <functional>
#include "caffe2/core/context_gpu.h"
namespace caffe2 {
namespace {
template <typename T>
__global__ void
AtanGradientCUDAKernel(const int N, cons... | 8cd1cbb5f5a667e99ebff245cdbe02ae0037eebd.cu | #include "caffe2/operators/atan_op.h"
#include <algorithm>
#include <functional>
#include "caffe2/core/context_gpu.h"
namespace caffe2 {
namespace {
template <typename T>
__global__ void
AtanGradientCUDAKernel(const int N, const T* dY, const T* X, T* dX) {
CUDA_1D_KERNEL_LOOP(i, N) {
#if __CUDA_ARCH__ >= 350
... |
47715cda5e593d423d5ecb504257f33907937733.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 "scan_x.cu"
#include<chrono>
#include<iostream>
using namespace s... | 47715cda5e593d423d5ecb504257f33907937733.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 "scan_x.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{3... |
sparse_maxpool.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Copyright 2019 Yan Yan
//
// 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.apac... | sparse_maxpool.cu | // Copyright 2019 Yan Yan
//
// 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 writ... |
cf6da7a2ae33969a76a984fc7621e88869bb78c6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
-- MAGMA (version 1.5.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date September 2014
@generated from zlacpy_batched.cu normal z -> s, Wed S... | cf6da7a2ae33969a76a984fc7621e88869bb78c6.cu | /*
-- MAGMA (version 1.5.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date September 2014
@generated from zlacpy_batched.cu normal z -> s, Wed Sep 17 15:08:23 2014
@author Mark Gates
*/
#include "common_magma.h"
#define NB 6... |
c6f921a39af091acdb763c8fbc57fa8c9de5caee.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* 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
... | c6f921a39af091acdb763c8fbc57fa8c9de5caee.cu | /**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* 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... |
9b482f602dd1a750d98d8e74739c5ff497d52b9d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void set_chunk_data( int x, int y, double dx, double dy, double* cell_x, double* cell_y, double* cell_dx, double* cell_dy, double* vertex_x, double* vertex_y, double* volume, double* x_area, double* ... | 9b482f602dd1a750d98d8e74739c5ff497d52b9d.cu | #include "includes.h"
__global__ void set_chunk_data( int x, int y, double dx, double dy, double* cell_x, double* cell_y, double* cell_dx, double* cell_dy, double* vertex_x, double* vertex_y, double* volume, double* x_area, double* y_area)
{
const int gid = blockIdx.x*blockDim.x+threadIdx.x;
if(gid < x)
{
cell_x[gid] ... |
5a73404523f760305cb2bd44def911dddbe98530.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include "../common/book.h"
#include "../common/cpu_bitmap.h"
#define DIM 1000
struct hipComplex {
float r;
float i;
__device__ hipComplex(float a, float b) : r(a), i(b){}
__device__ float magnitude2(void) ... | 5a73404523f760305cb2bd44def911dddbe98530.cu | #include <stdio.h>
#include "../common/book.h"
#include "../common/cpu_bitmap.h"
#define DIM 1000
struct cuComplex {
float r;
float i;
__device__ cuComplex(float a, float b) : r(a), i(b){}
__device__ float magnitude2(void) {
return r * r + i * i;
}
__device__ cuComplex operator*(const cuComplex& a){
retur... |
1e57f39bb124c14fc552c99a4744c8fe8e2e60a9.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2019, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/li... | 1e57f39bb124c14fc552c99a4744c8fe8e2e60a9.cu | /*
* Copyright (c) 2019, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... |
ff031c33c7080b37d2f68cbe2614ea54bee29f4c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "Bandwidth.h"
#include <iostream>
#include <assert.h>
#include "Device.h"
#include "Chrono.h"
using std::cout;
using std::endl;
/*---------------------------------------------------------------------*\
|* Declaration... | ff031c33c7080b37d2f68cbe2614ea54bee29f4c.cu | #include "Bandwidth.h"
#include <iostream>
#include <assert.h>
#include "Device.h"
#include "Chrono.h"
using std::cout;
using std::endl;
/*---------------------------------------------------------------------*\
|* Declaration *|
\*---------------------------------------------------------------------*/
/*-... |
54fc49d7c44617d5fd0bfb27e7bc1e6b931bcd64.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <stdio.h>
#include "common.h"
#define LOG 0
/*
* An implementation of parallel reduction using nested kernel launches from
* CUDA kernels.
*/
// Recursive Implementation of Interleaved Pair Approach
int cpuRecursiveRed... | 54fc49d7c44617d5fd0bfb27e7bc1e6b931bcd64.cu | #include <cuda_runtime.h>
#include <stdio.h>
#include "common.h"
#define LOG 0
/*
* An implementation of parallel reduction using nested kernel launches from
* CUDA kernels.
*/
// Recursive Implementation of Interleaved Pair Approach
int cpuRecursiveReduce(int *data, int const size) {
// stop condition
if (siz... |
a54b95c530e21a7983cca77f7bb9eaaeaa2fac37.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifndef THC_GENERIC_FILE
#define THC_GENERIC_FILE "generic/THCTensorTopK.cu"
#else
THC_API void THCTensor_(topk)(THCState* state,
THCTensor *topK,
THCudaLongTensor *indi... | a54b95c530e21a7983cca77f7bb9eaaeaa2fac37.cu | #ifndef THC_GENERIC_FILE
#define THC_GENERIC_FILE "generic/THCTensorTopK.cu"
#else
THC_API void THCTensor_(topk)(THCState* state,
THCTensor *topK,
THCudaLongTensor *indices,
THCTensor *input_,
in... |
eb77606e6e6d45fa79b10c88485ea66c83e01375.hip | // !!! This is a file automatically generated by hipify!!!
/*
* gpu_util.cu -- GPU utility functions
*
* Copyright (C) 2010-2013, Computing Systems Laboratory (CSLab)
* Copyright (C) 2010-2013, Vasileios Karakasis
*/
#include <hip/hip_runtime.h>
#include "gpu_util.h"
void *gpu_alloc(size_t count)
{
void ... | eb77606e6e6d45fa79b10c88485ea66c83e01375.cu | /*
* gpu_util.cu -- GPU utility functions
*
* Copyright (C) 2010-2013, Computing Systems Laboratory (CSLab)
* Copyright (C) 2010-2013, Vasileios Karakasis
*/
#include <cuda.h>
#include "gpu_util.h"
void *gpu_alloc(size_t count)
{
void *ret;
if (cudaMalloc(&ret, count) != cudaSuccess) {
ret = ... |
1b5e9864b3979063ca27184456c4226097682846.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 "axpy_kernel.hip"
#include<chrono>
#include<iostream>
using names... | 1b5e9864b3979063ca27184456c4226097682846.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 "axpy_kernel.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,2... |
d462e4bde1c1fa0eee7bae847636485ae201c213.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
-- MAGMA (version 2.5.4) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date October 2020
@precisions mixed zc -> ds
*/
#include "magmasparse_int... | d462e4bde1c1fa0eee7bae847636485ae201c213.cu | /*
-- MAGMA (version 2.5.4) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date October 2020
@precisions mixed zc -> ds
*/
#include "magmasparse_internal.h"
#define BLOCK_SIZE 256
// CSR-SpMV kernel
__global__ void
zcgecsrmv_mixed_p... |
fb0a39294713267c999ee914883baf481c8b6f83.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
__device__ void mul(float a, float b, float *res)
{
*res = a * b;
// almost underflow
*res = (*res) * 1e-35f;
}
__global__ void dot_prod(float *x, float *y, int size)
{
float d;
for (int i=0; i < siz... | fb0a39294713267c999ee914883baf481c8b6f83.cu |
#include <stdio.h>
__device__ void mul(float a, float b, float *res)
{
*res = a * b;
// almost underflow
*res = (*res) * 1e-35f;
}
__global__ void dot_prod(float *x, float *y, int size)
{
float d;
for (int i=0; i < size; ++i)
{
float tmp;
mul(x[i], y[i], &tmp);
d += tmp;
}
int tid = blo... |
dfbd65a826c9f6790f4d9ae84699f467e7880c61.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <cfloat>
#include <vector>
#include "caffe/layers/channel_reduce_layer.hpp"
namespace caffe {
template <typename Dtype>
__global__ void MaxChannelReduceForward(const int n, const Dtype* bot_data,
const int height, co... | dfbd65a826c9f6790f4d9ae84699f467e7880c61.cu | #include <cfloat>
#include <vector>
#include "caffe/layers/channel_reduce_layer.hpp"
namespace caffe {
template <typename Dtype>
__global__ void MaxChannelReduceForward(const int n, const Dtype* bot_data,
const int height, const int width, const int channels, const int num_channels,
Dtype* top_data, int* ma... |
2fc0af885194685f55257d4057640240594e3d29.hip | // !!! This is a file automatically generated by hipify!!!
#include <iostream>
#include <cstdint>
#include <memory>
#include <random>
#include <functional>
#include <hip/hip_runtime.h>
#include <device_launch_parameters.h>
#include "cuda_helper.h"
const size_t BLOCK_SIZE = 128u;
struct SparseMat_CSR
{
uint32_t ... | 2fc0af885194685f55257d4057640240594e3d29.cu | #include <iostream>
#include <cstdint>
#include <memory>
#include <random>
#include <functional>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
#include "cuda_helper.h"
const size_t BLOCK_SIZE = 128u;
struct SparseMat_CSR
{
uint32_t n_row = 0u;
uint32_t n_col = 0u;
uint32_t n_elem = 0u;... |
fed520c00426152458e53db79d6221bb6ac0adbd.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifndef MD_HOST_CUH
#define MD_HOST_CUH
#include "../thrust_all.cuh"
#include "./../utility/random.cuh"
#include "./particle.cuh"
#include "./list.cuh"
#include "./setting.cuh"
void h_create_list_full_search(Atoms &atoms,List &lis... | fed520c00426152458e53db79d6221bb6ac0adbd.cu | #ifndef MD_HOST_CUH
#define MD_HOST_CUH
#include "../thrust_all.cuh"
#include "./../utility/random.cuh"
#include "./particle.cuh"
#include "./list.cuh"
#include "./setting.cuh"
void h_create_list_full_search(Atoms &atoms,List &list,Setting &setting){
list.refresh(atoms.N);
create_list<<<setting.numBlocks,setting.... |
16aadcf660e3aeb8c49c7b8d5ed87709dddb665c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#define NUM_THREADS SCAN_NUM_THREADS
#define VALUES_PER_THREAD SCAN_VALUES_PER_THREAD
#define BLOCKS_PER_SM SCAN_BLOCKS_PER_SM
#define NUM_WARPS (NUM_THREADS / WARP_SIZE)
#define LOG_NUM_WARPS LOG_BASE_2(NUM_WARPS)
#define VALUES_... | 16aadcf660e3aeb8c49c7b8d5ed87709dddb665c.cu | #define NUM_THREADS SCAN_NUM_THREADS
#define VALUES_PER_THREAD SCAN_VALUES_PER_THREAD
#define BLOCKS_PER_SM SCAN_BLOCKS_PER_SM
#define NUM_WARPS (NUM_THREADS / WARP_SIZE)
#define LOG_NUM_WARPS LOG_BASE_2(NUM_WARPS)
#define VALUES_PER_WARP (WARP_SIZE * VALUES_PER_THREAD)
#define NUM_VALUES (NUM_THREADS * VALUES_PER_TH... |
d7d98de377c9ac8a813f139256770e12f1fcd526.hip | // !!! This is a file automatically generated by hipify!!!
/**
* @file rasterize.cu
* @brief CUDA-accelerated rasterization pipeline.
* @authors Skeleton code: Yining Karl Li, Kai Ninomiya, Shuai Shao (Shrek)
* @date 2012-2016
* @copyright University of Pennsylvania & STUDENT
*/
#include <cmath>
... | d7d98de377c9ac8a813f139256770e12f1fcd526.cu | /**
* @file rasterize.cu
* @brief CUDA-accelerated rasterization pipeline.
* @authors Skeleton code: Yining Karl Li, Kai Ninomiya, Shuai Shao (Shrek)
* @date 2012-2016
* @copyright University of Pennsylvania & STUDENT
*/
#include <cmath>
#include <cstdio>
#include <cuda.h>
#include <cuda_runtime.... |
d09883bc75c1c4b249f5fc5b559a52c40f594ebe.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void kernelMarkDeadTriangles(int *cmarker, short *cnewtri, int nTris) {
int x = (blockIdx.y * gridDim.x + blockIdx.x) * blockDim.x + threadIdx.x;
if (x >= nTris)
return ;
cmarker[x] = (cnewtri[x] >... | d09883bc75c1c4b249f5fc5b559a52c40f594ebe.cu | #include "includes.h"
__global__ void kernelMarkDeadTriangles(int *cmarker, short *cnewtri, int nTris) {
int x = (blockIdx.y * gridDim.x + blockIdx.x) * blockDim.x + threadIdx.x;
if (x >= nTris)
return ;
cmarker[x] = (cnewtri[x] >= 0 ? 0 : 1);
} |
2e464338be2ac6e01298f741d65b10939f841cf0.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
using namespace std;
int threads;
__global__ void gcd_vector(int * d_out, int integer_m){
int idx = threadIdx.x;
for(int i = idx; i<integer_m; i+=blockDim.x){
int u = i, v = integer_m;
while ( v != 0) {
int ... | 2e464338be2ac6e01298f741d65b10939f841cf0.cu | #include "includes.h"
using namespace std;
int threads;
__global__ void gcd_vector(int * d_out, int integer_m){
int idx = threadIdx.x;
for(int i = idx; i<integer_m; i+=blockDim.x){
int u = i, v = integer_m;
while ( v != 0) {
int r = u % v;
u = v;
v = r;
}
if(u == 1){
d_out[idx]++;
}
}
} |
0a33197cec3786c4b5ede5adaf5e6a4e39c872ce.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "utils.h"
#include <cassert>
#include <algorithm>
/// Returns the sum of all values `a` within a warp,
/// with the correct answer returned only by the 0th thread of a warp.
__device__ double sumWarp(double a) {
// TO... | 0a33197cec3786c4b5ede5adaf5e6a4e39c872ce.cu | #include "utils.h"
#include <cassert>
#include <algorithm>
/// Returns the sum of all values `a` within a warp,
/// with the correct answer returned only by the 0th thread of a warp.
__device__ double sumWarp(double a) {
// TODO: 1.a) Compute sum of all values within a warp.
// Only the threads wit... |
cabbfe08252c47c7912e97008631cfa51caca724.hip | // !!! This is a file automatically generated by hipify!!!
/***************
CS-426-Project-4
ERKAN NAL
21302017
CUDA programming
***************/
#define NOMINMAX
#define PI 3.14159265
#include "hip/hip_runtime.h"
#include <iostream>
#include <string>
#include <sstream>
#include "device_launch_parameters.h"
#include ... | cabbfe08252c47c7912e97008631cfa51caca724.cu | /***************
CS-426-Project-4
ERKAN ÍNAL
21302017
CUDA programming
***************/
#define NOMINMAX
#define PI 3.14159265
#include "cuda_runtime.h"
#include <iostream>
#include <string>
#include <sstream>
#include "device_launch_parameters.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <cu... |
5ce608ad2132e17ed2fd309a675f30b0bc4c3680.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,... | 5ce608ad2132e17ed2fd309a675f30b0bc4c3680.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.
*
*... |
45f77b77e5b3448d78c7e1d5e694c2638253da30.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include <iostream>
#include "main.h"
#include "NBody.cuh"
#include <algorithm>
#include <math.h>
#include <iostream>
#define BLOCKSIZE (128)
using namespace std;
/*cuda shared memory*/
template<clas... | 45f77b77e5b3448d78c7e1d5e694c2638253da30.cu | #include <cuda.h>
#include <cuda_runtime.h>
#include <iostream>
#include "main.h"
#include "NBody.cuh"
#include <algorithm>
#include <math.h>
#include <iostream>
#define BLOCKSIZE (128)
using namespace std;
/*cuda shared memory*/
template<class T>
struct SharedMemory
{
__device__ inline operator T *()
{
e... |
02831d82ced79ffa2dd4a854171d0331e8733a13.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define BLOCK_SIZE 512
#define _check(stmt) \
do { \
hipError_t err = stmt; ... | 02831d82ced79ffa2dd4a854171d0331e8733a13.cu | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define BLOCK_SIZE 512
#define _check(stmt) \
do { \
cudaError_t err = stmt; \
if (er... |
fde0b297125d71ffdcdbd8fcfc8a5ae008ef4f0a.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include "rocblas.h"
#define IDX2C(i,j,ld) (((j)*(ld))+(i))
#define m 4
#define n 4
#define k 4
extern "C" void mat_mul_func(int size, float *a, float *b, float *c){
hipError_t cudaS... | fde0b297125d71ffdcdbd8fcfc8a5ae008ef4f0a.cu | #include <stdio.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include "cublas_v2.h"
#define IDX2C(i,j,ld) (((j)*(ld))+(i))
#define m 4
#define n 4
#define k 4
extern "C" void mat_mul_func(int size, float *a, float *b, float *c){
cudaError_t cudaStat; //cudaMalloc status
cublasStatus_t stat; //CUBLAS functions stat... |
3fe11f7729aa16c7f41f461ae9c3c3fe1836d781.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <malloc.h>
#include <hip/hip_runtime.h>
#define SIZE 1024
__global__ void VectorAdd(int *a, int *b, int *c)
{
int i=threadIdx.x;
if(i<SIZE)
c[i]=a[i]+b[i];
}
int main()
{
clock_t start = clock();
int *a, *b, *c;
int *d_a, ... | 3fe11f7729aa16c7f41f461ae9c3c3fe1836d781.cu | #include <stdio.h>
#include <malloc.h>
#include <cuda.h>
#define SIZE 1024
__global__ void VectorAdd(int *a, int *b, int *c)
{
int i=threadIdx.x;
if(i<SIZE)
c[i]=a[i]+b[i];
}
int main()
{
clock_t start = clock();
int *a, *b, *c;
int *d_a, *d_b, *d_c;
a = (int *)malloc(SIZE*sizeof(int));
b = (int *)malloc... |
68d759c221729610b3100c83912fe8518062e77b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | 68d759c221729610b3100c83912fe8518062e77b.cu | /*
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... |
506116a15a8a812843b5dbd084a6b20f38d54d97.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//
// auto-generated by op2.py
//
//user function
__device__ void computeFluxes_gpu( const float *cellLeft, const float *cellRight,
const float *alphaleft, const float *alpharight,
... | 506116a15a8a812843b5dbd084a6b20f38d54d97.cu | //
// auto-generated by op2.py
//
//user function
__device__ void computeFluxes_gpu( const float *cellLeft, const float *cellRight,
const float *alphaleft, const float *alpharight,
const float *edgeLength, const float *edgeNormals,
... |
c60cf0263ef619e4b143f64146bf3bb7db4de6fb.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//Example 3.2.2
#include <stdio.h>
__global__ void kernel(void) {
}
int main(void) {
kernel <<< 1, 1 >> > ();
printf("Hello World");
return 0;
} | c60cf0263ef619e4b143f64146bf3bb7db4de6fb.cu | //Example 3.2.2
#include <stdio.h>
__global__ void kernel(void) {
}
int main(void) {
kernel <<< 1, 1 >> > ();
printf("Hello World");
return 0;
} |
6e31b5fe505d79862ac7d69fc355580ed0c79d4c.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 "dscores_kernel_init.cu"
#include<chrono>
#include<iostream>
usin... | 6e31b5fe505d79862ac7d69fc355580ed0c79d4c.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 "dscores_kernel_init.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,1... |
961dead1edb8d874ab5a0fd6953ca1fd9ebb722d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "kernel.h"
#include "structs.h"
#include <math.h>
#include <thrust/execution_policy.h>
#include <thrust/binary_search.h>
#include <hip/hip_cooperative_groups.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include ... | 961dead1edb8d874ab5a0fd6953ca1fd9ebb722d.cu | #include "kernel.h"
#include "structs.h"
#include <math.h>
#include <thrust/execution_policy.h>
#include <thrust/binary_search.h>
#include <cooperative_groups.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "params.h"
//namespace cg = cooperative_groups;
using namespace cooperative_groups;
__devic... |
82e438bdeddf9af9a2ec0a7adbd3e673be2ea783.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <hip/hip_runtime_api.h>
#include <device_launch_parameters.h>
#include <iostream>
#include "common.h"
const int TILE_SIZE = 256; //Max no of threads in Block.
const int MAX_GRID_SIZE = 65535; //Max no of Blocks... | 82e438bdeddf9af9a2ec0a7adbd3e673be2ea783.cu | #include <cuda.h>
#include <cuda_runtime_api.h>
#include <device_launch_parameters.h>
#include <iostream>
#include "common.h"
const int TILE_SIZE = 256; //Max no of threads in Block.
const int MAX_GRID_SIZE = 65535; //Max no of Blocks in a Grid.
// GPU Kernel-1 to perform row scaling.
__global__ void Gau... |
150574022fa91f671d0d4bae5436e92e3bc0c312.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <math.h>
#include "hip/hip_runtime.h"
#include "parameter.h"
#include "array_definition.h"
#include "cuda_funclist.h"
//extern void checkCUDAError(const char *msg);
__global__ void cfl_kernel(float *cfl_u, float *cfl_b, int *cfl_nx... | 150574022fa91f671d0d4bae5436e92e3bc0c312.cu | #include <stdio.h>
#include <math.h>
#include "cuda.h"
#include "parameter.h"
#include "array_definition.h"
#include "cuda_funclist.h"
//extern void checkCUDAError(const char *msg);
__global__ void cfl_kernel(float *cfl_u, float *cfl_b, int *cfl_nx, int *cfl_ny, int *cfl_nz, float *cfl_dt, float *cfl_c);
__device__ f... |
a371bb1fd0b453357caf96b26d7e4e31c3481232.hip | // !!! This is a file automatically generated by hipify!!!
#include "Python.h"
#include <stdlib.h>
#define NPY_NO_DEPRECATED_API NPY_1_9_API_VERSION
#include "arrayobject.h"
#include <errno.h>
#include <hip/hip_runtime.h>
#include <rocblas.h>
#include <helper_cuda.h>
#include <thrust/device_vector.h>
#include <thrust/t... | a371bb1fd0b453357caf96b26d7e4e31c3481232.cu | #include "Python.h"
#include <stdlib.h>
#define NPY_NO_DEPRECATED_API NPY_1_9_API_VERSION
#include "arrayobject.h"
#include <errno.h>
#include <cuda.h>
#include <cublas_v2.h>
#include <helper_cuda.h>
#include <thrust/device_vector.h>
#include <thrust/transform.h>
#include <thrust/extrema.h>
#include "util.h"
#include ... |
f57790d52e54c02b81cc7db18b949b83ab5c7d13.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | f57790d52e54c02b81cc7db18b949b83ab5c7d13.cu | /*
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... |
829a1cfd68d83b819fd55231c5f8faa350f1dae1.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/** @file grid-points.cu a test where grid points are sorted into a grid */
#include <halloc.h>
#include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
/** a macro for check... | 829a1cfd68d83b819fd55231c5f8faa350f1dae1.cu | /** @file grid-points.cu a test where grid points are sorted into a grid */
#include <halloc.h>
#include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
/** a macro for checking CUDA calls */
#define cucheck(call) \
{ ... |
b34f0bac34cdcd2849176e67af923a547c6ffa7c.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 "transposeUnroll4Col.cu"
#include<chrono>
#include<iostream>
usin... | b34f0bac34cdcd2849176e67af923a547c6ffa7c.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 "transposeUnroll4Col.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,1... |
edd0c9bcce4dd1d4431d8e932dcb87c7fd7dc92f.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
csymv_upper.cu is nearly identical to chemv_upper.... | edd0c9bcce4dd1d4431d8e932dcb87c7fd7dc92f.cu | /*
-- MAGMA (version 2.1.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date August 2016
csymv_upper.cu is nearly identical to chemv_upper.cu, just change names and drop MAGMA_C_CONJ.
chemv_kernel_U (upper) in ch... |
77a22fc12891d7fb75241e3863021126ccbe5789.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#define THREADS_PER_BLOCK 3
#define TOTAL_BLOCKS 1
//make sure numbers above match the matlab script
__device__ int blockSums [TOTAL_BLOCKS];
__constant__ int VECTOR_SIZE;
__global__ void dot_product (int* a, int*b, int*c)
{
... | 77a22fc12891d7fb75241e3863021126ccbe5789.cu | #define THREADS_PER_BLOCK 3
#define TOTAL_BLOCKS 1
//make sure numbers above match the matlab script
__device__ int blockSums [TOTAL_BLOCKS];
__constant__ int VECTOR_SIZE;
__global__ void dot_product (int* a, int*b, int*c)
{
__shared__ int multiplicationStorage [THREADS_PER_BLOCK];
if (threadIdx.x < V... |
c31ffd314300f155a7bd377ab1426d8e55593de1.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <iostream>
using namespace std;
__global__ void MatrixMulKernel(int m, int n, int k, float *A, float *B, float *C)
{
int Row = blockIdx.y * blockDim.y + threadIdx.y;
int Col = blockIdx.x * blockDim.x + threadIdx.x;... | c31ffd314300f155a7bd377ab1426d8e55593de1.cu | #include <iostream>
using namespace std;
__global__ void MatrixMulKernel(int m, int n, int k, float *A, float *B, float *C)
{
int Row = blockIdx.y * blockDim.y + threadIdx.y;
int Col = blockIdx.x * blockDim.x + threadIdx.x;
if ((Row < m) && (Col < k))
{
float Cvalue = 0.0;
for (int i =... |
aa1ea1a1ca33ca4ffad51dc842db747fd9e12d27.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Copyright (c) 2018 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 ... | aa1ea1a1ca33ca4ffad51dc842db747fd9e12d27.cu | /* Copyright (c) 2018 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... |
56158b13c9b17c96cf6e4c8ded30f074bab59743.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <ATen/ATen.h>
#include <ATen/native/SortingUtils.h>
#include <assert.h>
#include <c10/macros/Macros.h>
#include <stdlib.h>
#include <ATen/hip/HIPApplyUtils.cuh>
#include <ATen/hip/detail/TensorInfo.cuh>
#include <THH/THHDev... | 56158b13c9b17c96cf6e4c8ded30f074bab59743.cu | #include <ATen/ATen.h>
#include <ATen/native/SortingUtils.h>
#include <assert.h>
#include <c10/macros/Macros.h>
#include <stdlib.h>
#include <ATen/cuda/CUDAApplyUtils.cuh>
#include <ATen/cuda/detail/TensorInfo.cuh>
#include <THC/THCDeviceUtils.cuh> // only for THCRoundUp?
#include <THC/THCNumerics.cuh>
#include <THC/TH... |
a2335bdb4a60cf7fa064390a3d90dfcee5253659.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <assert.h>
#include "hip/hip_runtime.h"
#define N 2
__global__ void foo(int* p) {
p[threadIdx.x] = 2;
__syncthreads();
}
int main(){
int *a;
int *dev_a;
int size = N*sizeof(int);
hipMalloc((void**)&dev_a, size);
a ... | a2335bdb4a60cf7fa064390a3d90dfcee5253659.cu | #include <stdio.h>
#include <assert.h>
#include "cuda.h"
#define N 2
__global__ void foo(int* p) {
p[threadIdx.x] = 2;
__syncthreads();
}
int main(){
int *a;
int *dev_a;
int size = N*sizeof(int);
cudaMalloc((void**)&dev_a, size);
a = (int*)malloc(N*size);
cudaMemcpy(dev_a,a,size, cudaMemcpyHostToDe... |
dd9f23ee870dd37a423c0c4427c8525adf0c8084.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Copyright (c) 2022 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 t... | dd9f23ee870dd37a423c0c4427c8525adf0c8084.cu | // Copyright (c) 2022 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... |
a092873005ebcba2b837a35dc6c7f8d908674083.hip | // !!! This is a file automatically generated by hipify!!!
// -----------------------------------------------------------------------------
//
// Copyright (C) The BioDynaMo Project.
// All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in comp... | a092873005ebcba2b837a35dc6c7f8d908674083.cu | // -----------------------------------------------------------------------------
//
// Copyright (C) The BioDynaMo Project.
// 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.
//
// See the LICENSE file distrib... |
236a5d4d4ac7acd39f24dad349f4240b6fb299bf.hip | // !!! This is a file automatically generated by hipify!!!
// Includes
#include <stdio.h>
#include <stdlib.h>
// includes CUDA
#include <hip/hip_runtime.h>
#define THREADS_PER_BLOCK 256
#define NUM_OF_BLOCKS 640
// Variables
texture<float,1,hipReadModeElementType> texmem1;
texture<float,1,hipReadModeElementType> te... | 236a5d4d4ac7acd39f24dad349f4240b6fb299bf.cu | // Includes
#include <stdio.h>
#include <stdlib.h>
// includes CUDA
#include <cuda_runtime.h>
#define THREADS_PER_BLOCK 256
#define NUM_OF_BLOCKS 640
// Variables
texture<float,1,cudaReadModeElementType> texmem1;
texture<float,1,cudaReadModeElementType> texmem2;
// Functions
void CleanupResources(void);
void Rando... |
f7ff235af46fabc13dbeb3c2658cf7360d93626b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifndef THC_GENERIC_FILE
#define THC_GENERIC_FILE "generic/VolumetricMaxUnpooling.cu"
#else
static inline void THNN_(VolumetricMaxUnpooling_shapeCheck)(
THCState *state,
THCTensor *... | f7ff235af46fabc13dbeb3c2658cf7360d93626b.cu | #ifndef THC_GENERIC_FILE
#define THC_GENERIC_FILE "generic/VolumetricMaxUnpooling.cu"
#else
static inline void THNN_(VolumetricMaxUnpooling_shapeCheck)(
THCState *state,
THCTensor *input,
THCTensor *gradOutput,
THCIndex... |
3088bb20054028632d3cdf9e9f60447525666dce.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* Inverse Discrete Sine Transform in Column wise (DST four)
* DST_IV_Column_Inverse
* This CUDA code can handle/work with any type of the input mxArrays,
* GPUarray or standard matlab CPU array as input {prhs[0] := mxGPUArr... | 3088bb20054028632d3cdf9e9f60447525666dce.cu | /*
* Inverse Discrete Sine Transform in Column wise (DST four)
* DST_IV_Column_Inverse
* 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 output, B=DST_IV_Column_Inverse(A)=mexFunction(A).
* Devel... |
8deef7d68c385916b85a6ba3e0d2adb8e5110a19.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void InvertPermutationKernel(float* input, float* output, int size)
{
int id = blockDim.x*blockIdx.y*gridDim.x
+ blockDim.x*blockIdx.x
+ threadIdx.x;
if (id >= size)
return;
int temp = __float2int... | 8deef7d68c385916b85a6ba3e0d2adb8e5110a19.cu | #include "includes.h"
__global__ void InvertPermutationKernel(float* input, float* output, int size)
{
int id = blockDim.x*blockIdx.y*gridDim.x
+ blockDim.x*blockIdx.x
+ threadIdx.x;
if (id >= size)
return;
int temp = __float2int_rn(input[id]);
if (input == output)
__syncthreads();
output[temp] = id;
} |
9299c72cf5f6b122398f216cbc3cc960a530b57c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifdef USE_CUDNN
#include <vector>
#include <opencv2\opencv.hpp>
#include "caffe/layers/cudnn_conv_layer.hpp"
namespace caffe {
__global__ void sync_conv_groups() { }
template <typename Dtype>
void CuDNNConvolutionLayer<Dtype>::... | 9299c72cf5f6b122398f216cbc3cc960a530b57c.cu | #ifdef USE_CUDNN
#include <vector>
#include <opencv2\opencv.hpp>
#include "caffe/layers/cudnn_conv_layer.hpp"
namespace caffe {
__global__ void sync_conv_groups() { }
template <typename Dtype>
void CuDNNConvolutionLayer<Dtype>::Forward_gpu(
const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) {
... |
a14adbdab2be4b98abb31a35a1cebd6b9a16a0ab.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "cuda_macros.h"
#include "active_set_buffers.h"
#define BLOCK_DIM_X 128
#define GRID_DIM_X 64
#define BLOCK_DIM_BATCH_X 32
#define BLOCK_DIM_BATCH_Y 32
#define BLOCK_DIM_NORM_X 128
#define BLOCK_DIM_NORM_Y 1
#define MAT... | a14adbdab2be4b98abb31a35a1cebd6b9a16a0ab.cu | #include "cuda_macros.h"
#include "active_set_buffers.h"
#define BLOCK_DIM_X 128
#define GRID_DIM_X 64
#define BLOCK_DIM_BATCH_X 32
#define BLOCK_DIM_BATCH_Y 32
#define BLOCK_DIM_NORM_X 128
#define BLOCK_DIM_NORM_Y 1
#define MAT_IJ_TO_LINEAR(i, j, dim) ((i) + (j)*(dim))
extern "C" void construct_active_set_buffers... |
7c5b996b0fcdb17dc055f952311731c256d1cbc5.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#if GOOGLE_CUDA
#include "ew_op_gpu.h"
#include <stdio.h>
__device__ __forceinline__ uint bfe(uint val, int pos)
{
uint bit;
asm ("bfe.u32 %0, %1, %2, 1;" : "=r"(bit) : "r"(val), "r"(pos) );
return bit;
}
typedef str... | 7c5b996b0fcdb17dc055f952311731c256d1cbc5.cu | #if GOOGLE_CUDA
#include "ew_op_gpu.h"
#include <stdio.h>
__device__ __forceinline__ uint bfe(uint val, int pos)
{
uint bit;
asm ("bfe.u32 %0, %1, %2, 1;" : "=r"(bit) : "r"(val), "r"(pos) );
return bit;
}
typedef struct __align__(8) KeyVal
{
uint key;
float val;
} KeyVal;
template <typename T>... |
20955041023f73313feb0ae8042e53cb89f3d5f8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#ifdef USE_ROCM
#include "dragon/core/context_cuda.h"
#include "dragon/utils/math_functions.h"
#include "dragon/utils/op_kernels.h"
namespace dragon {
namespace kernels {
namespace {
template <typename T, int D>
__global__ void... | 20955041023f73313feb0ae8042e53cb89f3d5f8.cu | #ifdef USE_CUDA
#include "dragon/core/context_cuda.h"
#include "dragon/utils/math_functions.h"
#include "dragon/utils/op_kernels.h"
namespace dragon {
namespace kernels {
namespace {
template <typename T, int D>
__global__ void _Assign(
const int N,
const int num_dims,
const SimpleArray<int, D> X_dims,... |
95815d288ed73d5f9aa5b361e9700c35582d764e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define BLOCK_SIZE 8
#define GRID_SIZE 8
__global__ void ising_kernel(int *G,int *newG,double *w,int n){
int id=blockIdx.x*blockDim.x+threa... | 95815d288ed73d5f9aa5b361e9700c35582d764e.cu |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define BLOCK_SIZE 8
#define GRID_SIZE 8
__global__ void ising_kernel(int *G,int *newG,double *w,int n){
int id=blockIdx.x*blockDim.x+threadIdx.x;
unsigned int xBlock = blockDim.x * blockIdx.x;
unsigned int yBlock = blockDi... |
f9bc079e608a8fa2117294753ffc5a422733d5b5.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "cuda_plugin_helper.h"
using namespace himan;
template <typename Type>
__device__ Type VVMS(Type VV, Type T, Type P)
{
ASSERT(P < 1200 || IsMissing(P));
return 287 * -VV * T / (static_cast<Type>(himan::constants::kG) * ... | f9bc079e608a8fa2117294753ffc5a422733d5b5.cu | #include "cuda_plugin_helper.h"
using namespace himan;
template <typename Type>
__device__ Type VVMS(Type VV, Type T, Type P)
{
ASSERT(P < 1200 || IsMissing(P));
return 287 * -VV * T / (static_cast<Type>(himan::constants::kG) * 100 * P);
}
template <typename T>
__global__ void VVMSKernel(const T* __restrict__ d_t,... |
bb6b93c3e98def518d08720fb08fc0d0f665d31c.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <hip/hip_runtime.h>
#define BLOCKSIZE 1024
__global__ void dkernel() {
__shared__ unsigned s;
if (threadIdx.x == 0) s = 0;
__syncthreads();
if (threadIdx.x == 1) s += 1;
__syncthreads();
if (threadIdx.x == 100) s += 2;
__... | bb6b93c3e98def518d08720fb08fc0d0f665d31c.cu | #include <stdio.h>
#include <cuda.h>
#define BLOCKSIZE 1024
__global__ void dkernel() {
__shared__ unsigned s;
if (threadIdx.x == 0) s = 0;
__syncthreads();
if (threadIdx.x == 1) s += 1;
__syncthreads();
if (threadIdx.x == 100) s += 2;
__syncthreads();
if (threadIdx.x == 0) printf("s=%d\n", s);
}
int main... |
58ddfc4b45cd9d1c1051a38dde94373c57caf12d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* author gumboshi <gumboshi@gmail.com> */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include "pzdr_def.h"
#include "pzdr_saidai.h"
#define LOCALRANKINGLENGTH 5
#ifndef NUM... | 58ddfc4b45cd9d1c1051a38dde94373c57caf12d.cu | /* author gumboshi <gumboshi@gmail.com> */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include "pzdr_def.h"
#include "pzdr_saidai.h"
#define LOCALRANKINGLENGTH 5
#ifndef NUM_BLOCK
#define NUM_BLOCK 52
#endif
#define NUM_THREAD 256
#define CUDA_SAFE_CALL(func) ... |
ea17498a50497506e95bae4cff4bc29af158a873.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <device_launch_parameters.h>
#include <math.h>
# define M 5
# define N 4
__global__ void matrix_add(int* A, int* B, int* C)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
int j ... | ea17498a50497506e95bae4cff4bc29af158a873.cu | #include <stdio.h>
#include <stdlib.h>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
#include <math.h>
# define M 5
# define N 4
__global__ void matrix_add(int* A, int* B, int* C)
{
int i = blockDim.x * blockIdx.x + threadIdx.x;
int j = blockDim.y * blockIdx.y + threadIdx.y;
if (i < M && j < N... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.