Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sbalzarini Lab
S
Software
P
Parallel Computing
OpenFPM
openfpm_devices
Commits
914ad635
Commit
914ad635
authored
Jan 06, 2021
by
incardon
Browse files
GPU restored
parent
b5b82f5b
Pipeline
#2604
passed with stages
in 14 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/CMakeLists.txt
View file @
914ad635
...
@@ -13,10 +13,10 @@ if (CUDA_ON_CPU)
...
@@ -13,10 +13,10 @@ if (CUDA_ON_CPU)
endif
()
endif
()
endif
()
endif
()
add_executable
(
mem main.cpp memory/HeapMemory.cpp util/cudify/cudify_vars.cpp util/cudify/cudify_unit_test.cu
${
CUDA_SOURCES
}
)
add_executable
(
mem main.cpp memory/HeapMemory.cpp util/cudify/cudify_vars.cpp util/cudify/cudify_unit_test.cu
memory/mem_conf.cpp
${
CUDA_SOURCES
}
)
add_library
(
ofpmmemory STATIC memory/HeapMemory.cpp util/cudify/cudify_vars.cpp memory/PtrMemory.cpp
${
CUDA_SOURCES
}
)
add_library
(
ofpmmemory STATIC memory/HeapMemory.cpp util/cudify/cudify_vars.cpp memory/PtrMemory.cpp
memory/mem_conf.cpp
${
CUDA_SOURCES
}
)
add_library
(
ofpmmemory_dl SHARED memory/HeapMemory.cpp util/cudify/cudify_vars.cpp memory/PtrMemory.cpp
${
CUDA_SOURCES
}
)
add_library
(
ofpmmemory_dl SHARED memory/HeapMemory.cpp util/cudify/cudify_vars.cpp memory/PtrMemory.cpp
memory/mem_conf.cpp
${
CUDA_SOURCES
}
)
if
(
CMAKE_COMPILER_IS_GNUCC
)
if
(
CMAKE_COMPILER_IS_GNUCC
)
target_compile_options
(
mem PRIVATE
"-Wno-deprecated-declarations"
)
target_compile_options
(
mem PRIVATE
"-Wno-deprecated-declarations"
)
...
@@ -30,7 +30,11 @@ if (CUDA_FOUND)
...
@@ -30,7 +30,11 @@ if (CUDA_FOUND)
target_compile_options
(
mem PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe
"--display_error_number --diag_suppress=2885 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111"
--expt-extended-lambda>
)
target_compile_options
(
mem PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe
"--display_error_number --diag_suppress=2885 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111"
--expt-extended-lambda>
)
if
(
TEST_COVERAGE
)
if
(
TEST_COVERAGE
)
target_compile_options
(
mem PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: -Xcompiler
"-fprofile-arcs -ftest-coverage"
>
)
target_compile_options
(
mem PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: -Xcompiler
"-fprofile-arcs -ftest-coverage"
>
)
endif
()
endif
()
if
(
NOT CUDA_ON_CPU
)
set_source_files_properties
(
memory/mem_conf.cpp PROPERTIES LANGUAGE CUDA
)
endif
()
endif
()
endif
()
...
...
src/memory/mem_conf.cpp
0 → 100644
View file @
914ad635
#include "config.h"
#include "mem_conf.hpp"
size_t
openfpm_ofpmmemory_compilation_mask
()
{
size_t
compiler_mask
=
0
;
#ifdef CUDA_ON_CPU
compiler_mask
|=
0x1
;
#endif
#ifdef __NVCC__
compiler_mask
|=
0x02
;
#endif
#ifdef CUDA_GPU
compiler_mask
|=
0x04
;
#endif
return
compiler_mask
;
}
\ No newline at end of file
src/memory/mem_conf.hpp
0 → 100644
View file @
914ad635
#ifndef MEM_CONF_HPP_
#define MEM_CONF_HPP_
#include <cstddef>
size_t
openfpm_ofpmmemory_compilation_mask
();
#endif
\ No newline at end of file
src/util/cuda_launch.hpp
View file @
914ad635
...
@@ -8,18 +8,13 @@
...
@@ -8,18 +8,13 @@
#ifndef CUDA_LAUNCH_HPP_
#ifndef CUDA_LAUNCH_HPP_
#define CUDA_LAUNCH_HPP_
#define CUDA_LAUNCH_HPP_
#include "config.h"
#include "cuda_kernel_error_checker.hpp"
#include "cuda_kernel_error_checker.hpp"
#if defined(CUDA_GPU) && !defined(CUDA_ON_CPU)
#if defined(CUDA_GPU) && !defined(CUDA_ON_CPU)
#if defined(SE_CLASS1) || defined(CUDA_CHECK_LAUNCH)
#if defined(SE_CLASS1) || defined(CUDA_CHECK_LAUNCH)
template
<
typename
lambda_funct_type
,
typename
...
Args_type
>
__global__
void
lambda_launcher
(
lambda_funct_type
lbf
,
Args_type
...
args
)
{
lbf
(
args
...);
}
#define CUDA_LAUNCH(cuda_call,ite, ...) \
#define CUDA_LAUNCH(cuda_call,ite, ...) \
{\
{\
cudaDeviceSynchronize(); \
cudaDeviceSynchronize(); \
...
...
src/util/cuda_util.hpp
View file @
914ad635
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#define OPENFPM_DATA_SRC_UTIL_CUDA_UTIL_HPP_
#define OPENFPM_DATA_SRC_UTIL_CUDA_UTIL_HPP_
#include "config.h"
#include "config.h"
#if defined(
__NVCC__
) && !defined(CUDA_ON_CPU)
#if defined(
CUDA_GPU
) && !defined(CUDA_ON_CPU)
#include <cuda_runtime.h>
#include <cuda_runtime.h>
#endif
#endif
...
...
src/util/cudify/cudify_alpaka.hpp
View file @
914ad635
...
@@ -295,7 +295,7 @@ namespace mgpu
...
@@ -295,7 +295,7 @@ namespace mgpu
}
}
}
}
static
void
init_
alpaka
()
static
void
init_
wrappers
()
{
{
if
(
__alpa_base__
.
initialized
==
true
)
{
return
;}
if
(
__alpa_base__
.
initialized
==
true
)
{
return
;}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment