From fb97c8c2172afe169e03540886c4cbc6757ae4d2 Mon Sep 17 00:00:00 2001 From: atrantan Date: Mon, 30 Jan 2017 15:58:52 -0600 Subject: [PATCH 1/3] Fix condition when using for_each in Cuda code --- hpx/parallel/algorithms/for_each.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hpx/parallel/algorithms/for_each.hpp b/hpx/parallel/algorithms/for_each.hpp index 9591832506f4..2a4208353967 100644 --- a/hpx/parallel/algorithms/for_each.hpp +++ b/hpx/parallel/algorithms/for_each.hpp @@ -432,7 +432,7 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1) // FIXME : is_indirect_callable does not work properly when compiling - // Cuda device code + // Cuda host code template ::value && hpx::traits::is_iterator::value && parallel::traits::is_projected::value) -#if !defined(__CUDA_ARCH__) +#if (!defined(__NVCC__) && !defined(__CUDACC__)) || defined(__CUDA_ARCH__) , HPX_CONCEPT_REQUIRES_( parallel::traits::is_indirect_callable< ExPolicy, F, traits::projected From 4361ba33ff1877fec03cdfa07c4bfdb16b5e80ce Mon Sep 17 00:00:00 2001 From: atrantan Date: Fri, 3 Feb 2017 12:03:48 -0600 Subject: [PATCH 2/3] Include missing directories and add missing dependencies --- examples/compute/cuda/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/compute/cuda/CMakeLists.txt b/examples/compute/cuda/CMakeLists.txt index 50530967af1f..49cd8be28542 100644 --- a/examples/compute/cuda/CMakeLists.txt +++ b/examples/compute/cuda/CMakeLists.txt @@ -13,8 +13,13 @@ if(HPX_WITH_CUDA) hello_compute partitioned_vector ) - set(cublas_matmul_FLAGS DEPENDENCIES cublas) -# set_source_files_properties(cublas_matmul.cpp PROPERTIES CUDA_SOURCE_PROPERTY_FORMAT OBJ) + + include_directories(${CUDA_INCLUDE_DIRS}) + + set(cublas_matmul_FLAGS + DEPENDENCIES ${CUDA_LIBRARIES} ${CUDA_CUBLAS_LIBRARIES}) + + set(cublas_matmul_CUDA Off) set(data_copy_CUDA On) set(hello_compute_CUDA On) set(partitioned_vector_CUDA ON) From b1e7760f8afe1bd31ae50d6edd20f5c48e095313 Mon Sep 17 00:00:00 2001 From: atrantan Date: Sat, 4 Feb 2017 08:27:32 -0600 Subject: [PATCH 3/3] Revert "Make visible action registrations only during the host compilation step" This reverts commit 0d443ebb70360ba22715e588c11f0ca80da5ac0c. --- .../partitioned_vector/partitioned_vector_component.hpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hpx/components/containers/partitioned_vector/partitioned_vector_component.hpp b/hpx/components/containers/partitioned_vector/partitioned_vector_component.hpp index 48aeeca297c3..05affc811d82 100644 --- a/hpx/components/containers/partitioned_vector/partitioned_vector_component.hpp +++ b/hpx/components/containers/partitioned_vector/partitioned_vector_component.hpp @@ -442,12 +442,9 @@ namespace hpx { namespace server HPX_REGISTER_VECTOR_DECLARATION_IMPL( \ BOOST_PP_CAT(__partitioned_vector_, BOOST_PP_CAT(type, name)), name) \ /**/ -#ifndef __CUDA_ARCH__ + #define HPX_REGISTER_PARTITIONED_VECTOR(...) \ - HPX_REGISTER_VECTOR_(__VA_ARGS__) -#else -#define HPX_REGISTER_PARTITIONED_VECTOR(...) -#endif + HPX_REGISTER_VECTOR_(__VA_ARGS__) \ /**/ #define HPX_REGISTER_VECTOR_(...) \ HPX_UTIL_EXPAND_(BOOST_PP_CAT( \