Comments (3)
Hello @lilohuang and thank you for reporting the issue! A bit simpler reproducer with the same behavior:
#include <nv/target>
template <class T> __device__ int device(T);
template <class T>
__device__ int doit_device(T val) {
return device(val);
}
template <class T>
__host__ int doit_host(T val) {
return 0;
}
template <class T>
int doit(T val)
{
NV_IF_TARGET(NV_IS_HOST,
(return doit_host(val);),
(return doit_device(val);));
}
int main() {
return doit(42);
}
It seems that we have to guard the doit_device
in Thrust to be something along the following lines:
template<class K, class... Args>
cudaError_t __device__
doit_device(K k, Args const&... args) const
{
#ifdef THRUST_RDC_ENABLED
const size_t size = argument_pack_size(0,args...);
void *param_buffer = cudaGetParameterBuffer(64,size);
fill_arguments((char*)param_buffer, 0, args...);
return launch_device(k, param_buffer);
#endif
}
from cub.
Merged NVIDIA/thrust#1939
from cub.
Awesome! Thank you @senior-zero. It worked! 💯 Please close this issue after merging NVIDIA/thrust#1939
from cub.
Related Issues (20)
- DeviceMemcpy::Batched supports only memory buffers HOT 4
- Specialize DeviceMemcpy::Batched to also support iterators HOT 1
- Documentation of warp-wide collectives refers to `__syncthreads` instead of `__syncwarp` HOT 1
- Add policy parameter to allow tuning
- Make decoupled look-back delay part of tuning HOT 2
- Implement tuning db merger HOT 3
- Write example for decoupled look-back API
- Segfault in CachingDeviceAllocator when out of memory HOT 4
- Tune Decoupled Look-back based Algorithms for H100 HOT 1
- Can't get correct result when use cub in CUDA12.0 HOT 24
- Illegal memory access on trying to use `DeviceReduce::Sum()` to count number of non-zeros HOT 2
- What is the correct compile command in Linux platform to compile a function citing cuh? HOT 1
- Segmented sorting does not preserve data in-between segments. HOT 6
- Misleading documentation for DeviceSegmentedRadixSort (or I'm using it wrong) HOT 1
- what's the purpose of CUB_SUBSCRIPTION_FACTOR
- select_if kernel needs grid boundary or reprogramming tile_idx HOT 1
- BlockLoad never attempts to vectorize HOT 5
- Possible bug in variable naming HOT 2
- How do I reduce partially filled 2D blocks? HOT 2
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 cub.