Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mosaic/software/parallel-computing/openfpm/openfpm_devices
  • argupta/openfpm_devices
2 results
Show changes
......@@ -9,6 +9,7 @@
#define OPENFPM_DATA_SRC_UTIL_CUDA_UTIL_HPP_
#include "config.h"
#include "cuda_kernel_error_checker.hpp"
#if defined(CUDIFY_USE_ALPAKA)
#define CUDA_ON_CPU
......@@ -18,64 +19,65 @@
#define CUDA_ON_CPU
#endif
#if defined(__HIP__)
// If hip fill NVCC think it is Nvidia compiler
#ifdef __NVCC__
#undef __NVCC__
#include <hip/hip_runtime.h>
#define __NVCC__
#else
#include <hip/hip_runtime.h>
#endif
#elif defined(CUDIFY_USE_CUDA)
#include <cuda_runtime.h>
#endif
// CUDA_GPU: CUDA, HIP, SEQUENTIAL, OPENMP, ALPAKA
#ifdef CUDA_GPU
#ifndef __NVCC__
#ifndef __NVCC__
#ifndef __host__
#define __host__
#define __device__
#define __forceinline__
#define __shared__ static thread_local
#define __global__ inline
#endif
#endif
#else
#ifdef CUDA_ON_CPU
#ifndef __host__
#define __host__
#define __device__
#define __forceinline__
#define __global__ inline
#endif
#ifdef CUDA_ON_CPU
#ifdef __shared__
#undef __shared__
#endif
#define __shared__ static thread_local
#else
#ifndef __shared__
#define __shared__
#endif
#ifdef __shared__
#undef __shared__
#endif
#define __shared__ static thread_local
#endif
#else
#ifndef __host__
#define __host__
#define __device__
#define __shared__ static thread_local
#define __global__ inline
#ifndef __host__
#define __host__
#define __forceinline__
#define __device__
#define __shared__ static thread_local
#define __global__ inline
#endif
#endif
#endif
#define CUDA_BACKEND_NONE 0
#define CUDA_BACKEND_CUDA 1
#define CUDA_BACKEND_SEQUENTIAL 2
#define CUDA_BACKEND_ALPAKA 3
#define CUDA_BACKEND_OPENMP 4
#define CUDA_BACKEND_HIP 5
#if defined(CUDIFY_USE_CUDA)
#include "cudify/cuda/cudify_cuda.hpp"
#elif defined(CUDIFY_USE_ALPAKA)
#include "cudify/alpaka/cudify_alpaka.hpp"
#elif defined(CUDIFY_USE_OPENMP)
#include "cudify/openmp/cudify_openmp.hpp"
#elif defined(CUDIFY_USE_HIP)
#include "cudify/hip/cudify_hip.hpp"
#elif defined(CUDIFY_USE_SEQUENTIAL)
#include "cudify/sequential/cudify_sequential.hpp"
#else
#define CUDA_ON_BACKEND CUDA_BACKEND_NONE
constexpr int default_kernel_wg_threads_ = 1024;
static void init_wrappers() {}
#endif
#endif /* OPENFPM_DATA_SRC_UTIL_CUDA_UTIL_HPP_ */
......@@ -10,12 +10,10 @@
*/
#include "util/cudify/cudify_hardware_cpu.hpp"
#include "util/cuda_util.hpp"
#include "boost/bind.hpp"
#include <type_traits>
#define CUDA_ON_BACKEND CUDA_BACKEND_ALPAKA
#define GPU_HOST_DEVICE
extern alpa_base_structs __alpa_base__;
......
......@@ -2,6 +2,7 @@
#define __CUDIFY_CUDA_HPP__
#define CUDA_ON_BACKEND CUDA_BACKEND_CUDA
#include <cuda_runtime.h>
constexpr int default_kernel_wg_threads_ = 1024;
......@@ -13,10 +14,6 @@ constexpr int default_kernel_wg_threads_ = 1024;
#ifdef __NVCC__
#include "operators.hpp"
#ifndef GPU_HOST_DEVICE
#define GPU_HOST_DEVICE __forceinline__ __device__ __host__
#endif
template<typename lambda_f>
__global__ void kernel_launch_lambda(lambda_f f)
{
......
#ifndef CUDIFY_HPP_
#define CUDIFY_HPP_
#include "config.h"
#define CUDA_BACKEND_NONE 0
#define CUDA_BACKEND_CUDA 1
#define CUDA_BACKEND_SEQUENTIAL 2
#define CUDA_BACKEND_ALPAKA 3
#define CUDA_BACKEND_OPENMP 4
#define CUDA_BACKEND_HIP 5
#if defined(CUDIFY_USE_CUDA)
#include "cuda/cudify_cuda.hpp"
#elif defined(CUDIFY_USE_ALPAKA)
#include "alpaka/cudify_alpaka.hpp"
#elif defined(CUDIFY_USE_OPENMP)
#include "openmp/cudify_openmp.hpp"
#elif defined(CUDIFY_USE_HIP)
#include "hip/cudify_hip.hpp"
#elif defined(CUDIFY_USE_SEQUENTIAL)
#include "sequential/cudify_sequential.hpp"
#else
#define CUDA_ON_BACKEND CUDA_BACKEND_NONE
constexpr int default_kernel_wg_threads_ = 1024;
static void init_wrappers() {}
#endif
#endif
......@@ -4,7 +4,6 @@
#include <initializer_list>
#include <cstring>
#include "util/cuda_util.hpp"
#if defined(CUDIFY_USE_SEQUENTIAL) || defined(CUDIFY_USE_OPENMP)
......
......@@ -6,7 +6,7 @@
std::is_trivially_copyable<int> b;
#include "util/cuda_launch.hpp"
#include "util/cuda_util.hpp"
#include "memory/CudaMemory.cuh"
#ifdef CUDIFY_USE_OPENMP
......
#include "cudify_hardware_cpu.hpp"
#include "util/cuda_util.hpp"
#ifdef HAVE_BOOST_CONTEXT
#include <boost/context/continuation.hpp>
#endif
......
......@@ -199,7 +199,6 @@ static cudaError_t cudaMemcpy ( void* dst, const void* src, size_t count, cudaMe
#ifdef __HIPCC__
#include "util/cudify/cudify_hardware_cpu.hpp"
#include "util/cuda_util.hpp"
#include <vector>
#include <string.h>
#include "hipcub/hipcub.hpp"
......
#ifndef CUDIFY_OPENMP_HPP_
#define CUDIFY_OPENMP_HPP_
#include "config.h"
constexpr int default_kernel_wg_threads_ = 1024;
#include <omp.h>
#define CUDA_ON_BACKEND CUDA_BACKEND_OPENMP
#define GPU_HOST_DEVICE
#include "util/cudify/cudify_hardware_cpu.hpp"
......
......@@ -2,7 +2,6 @@
#define CUDIFY_SEQUENCIAL_HPP_
#define CUDA_ON_BACKEND CUDA_BACKEND_SEQUENTIAL
#define GPU_HOST_DEVICE
#include "config.h"
......@@ -12,7 +11,6 @@ constexpr int default_kernel_wg_threads_ = 1024;
#ifdef HAVE_BOOST_CONTEXT
#include "util/cuda_util.hpp"
#include <boost/bind/bind.hpp>
#include <type_traits>
#ifdef HAVE_BOOST_CONTEXT
......
#! /bin/bash
if [ $1 -eq 1 ]; then
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\" , \"attachments\":[{ \"title\":\"Info:\", \"color\": \"#00FF00\", \"text\":\"$2 completed succeffuly the $3 tests with $4\" }] }" https://hooks.slack.com/services/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
else
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\" , \"attachments\":[{ \"title\":\"Info:\", \"color\": \"#00FF00\", \"text\":\"$2 completed succeffuly the $3 tests \" }] }" https://hooks.slack.com/services/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
fi