Comments (5)
Does this error also occur with different host compilers (GCC, Clang) and different CUDA versions (11.3, etc.)? Furthermore, is this the only error you are getting? Or are there also errors regarding the is_signed
, is_integer
, etc. member variables? If possible, could you attach a (minimal) reproducable example?
from stdgpu.
Try only GCC and CUDA 11.4, this is my work setup.
Have 5 errors, as list of this variables:
/**
* \brief Whether the type is signed
*/
static constexpr bool is_signed = false;
/**
* \brief Whether the type is an integer
*/
static constexpr bool is_integer = true;
/**
* \brief Whether the type is exact
*/
static constexpr bool is_exact = true;
/**
* \brief Number of radix digits
*/
static constexpr int digits = 1;
/**
* \brief Integer base
*/
static constexpr int radix = 2;
Add in work project #include header from example vector.cu
#include <iostream>
#include <thrust/copy.h>
#include <thrust/reduce.h>
#include <thrust/sequence.h>
#include <stdgpu/memory.h> // createDeviceArray, destroyDeviceArray
#include <stdgpu/iterator.h> // device_begin, device_end
#include <stdgpu/platform.h> // STDGPU_HOST_DEVICE
#include <stdgpu/vector.cuh> // stdgpu::vector
and two lines of code
stdgpu::index_t n = 100;
int* d_input = createDeviceArray<int>(n);
In cmakelists.txt add (CUDA is active and work in project):
find_package(stdgpu REQUIRED)
target_link_libraries(${EXECUTABLE_NAME} PUBLIC stdgpu::stdgpu)
can't understand what to write in add_library(foo ... ) so don't add it
if add include_directory with path to include directory of stdgpu, errors more than 200
from stdgpu.
this errors if add include_directory with headers
from stdgpu.
if add include_directory with path to include directory of stdgpu, errors more than 200
Could you elaborate what you exactly mean by that? The lines
find_package(stdgpu REQUIRED)
target_link_libraries(${EXECUTABLE_NAME} PUBLIC stdgpu::stdgpu)
are sufficient to add all necessary properties stdgpu
needs add to your project, including the include directory paths.
It seems like this is an error/incompatibility in your project. stdgpu
requires compilation with C++14 and should enforce this by its imported cxx_std_14
property. Did you set the C++ standard somewhere in your project? Could you provide more details on your project? In particular, the build configuration, i.e. the CMakeLists.txt
file(s), would be helpful to know (if it is possible for you to attach them).
from stdgpu.
Made small project to solve problem, under some changes in cmakelists.txt all work as expected:
cmake_minimum_required(VERSION 3.5)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 61)
message(CMAKE_CUDA_ARCHITECTURES)
endif()
project(CellInstancing LANGUAGES CUDA CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_STANDARD 14)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
set(EXECUTABLE_NAME "CUDA_exp")
find_package(CUDA REQUIRED)
SET(TARGET_H
)
SET(TARGET_SRC
main.cu
)
SET(TARGET_CUDA_H
cuda_exp.cuh
)
SET(TARGET_CUDA_SRC
cuda_exp.cu
)
find_package(stdgpu REQUIRED)
set(Cuda_common_include "/usr/local/cuda/samples/common/inc")
include_directories(${Cuda_common_include})
message(${CUDA_INCLUDE_DIRS})
include_directories(${CUDA_INCLUDE_DIRS})
add_executable(${EXECUTABLE_NAME} ${TARGET_SRC} ${TARGET_H} ${TARGET_CUDA_H} ${TARGET_CUDA_SRC} )
set_target_properties(${EXECUTABLE_NAME} PROPERTIES CUDA_ARCHITECTURES "61")
target_link_libraries(${EXECUTABLE_NAME} ${CUDA_LIBRARIES})
target_link_libraries(${EXECUTABLE_NAME} stdgpu::stdgpu)
from stdgpu.
Related Issues (20)
- Implement at() in terms of operator[] to avoid bound checks in deque and vector HOT 5
- Cannot include stdgpu to an existing OpenMP/HIP project HOT 9
- Build suceeds but cannot include package and build HOT 2
- Any chance to support spirv as a backend? HOT 3
- Failed to build project with stdgpu. Error: expected unqualified-id before ‘sizeof’ HOT 5
- Unordered_maps with complex containers HOT 1
- Minimize thrust dependency HOT 1
- Compatibility with Thrust? HOT 3
- Raise minimum requirements to C++17
- Solve compilation error in Ubuntu 22.04 and friends HOT 1
- unordered_map creation crashing with cuda 12.x HOT 15
- unordered map creation freezes async processes HOT 10
- Execution policy support for all containers HOT 1
- Unordered_set with structure HOT 3
- About _excess_list_positions used in unordered_set HOT 2
- About stdgpu::queue size < 0 HOT 4
- Findthrust.cmake parse error HOT 1
- Unexpected insertion when using unordered_map and capacity equals to 4 HOT 2
- Please help to answer the two questions about this, thank you HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stdgpu.