Commit f83e18e4 authored by incardon's avatar incardon
Browse files

Fixing CUDA_ON_CPU for intel

parent 25445ab3
Pipeline #2723 passed with stages
in 14 seconds
......@@ -8,7 +8,7 @@ if (CUDA_ON_CPU)
add_definitions(-DCUDA_ON_CPU)
set_source_files_properties(${CUDA_SOURCES} PROPERTIES LANGUAGE CXX)
set_source_files_properties(${CUDA_SOURCES} PROPERTIES COMPILE_FLAGS "-D__NVCC__ -DCUDART_VERSION=11000")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
add_definitions("-x c++")
endif()
endif()
......
......@@ -62,7 +62,7 @@ bool CudaMemory::allocate(size_t sz)
this->sz = sz;
#ifdef FILL_CUDA_MEMORY_WITH_MINUS_ONE
#if defined(GARBAGE_INJECTOR) && !defined(CUDA_ON_CPU)
CUDA_SAFE_CALL(cudaMemset(dm,-1,sz))
#endif
......@@ -277,11 +277,9 @@ bool CudaMemory::resize(size_t sz)
#endif
#endif
#ifdef FILL_CUDA_MEMORY_WITH_MINUS_ONE
#ifdef GARBAGE_INJECTOR
#if defined(CUDA_GPU) && !defined(CUDA_ON_CPU)
CUDA_SAFE_CALL(cudaMemset(tdm,-1,sz));
#else
memset(tdm,-1,sz);
#endif
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment