Comments (5)
Yes, you are absolutely right. It's "current" device instead of "default" device. CUDAGuard
would store the original current device, and sets the current device to the specified device. After a CUDAGuard
goes out of scope, it sets the current device back to the original current device.
from tiny-cuda-nn.
Hi there, yes, unfortunately tiny-cuda-nn does not support multi-GPU operation as of now. This is something that'd be cool to have in the future, but currently is not a high priority.
I'm going to leave this issue open to serve as a TODO marker.
Cheers!
from tiny-cuda-nn.
@Tom94 Thanks for the quick response! Hopefully it could be implemented one day. But I think even if we do not support multi-GPU for now, it should still be possible to support the single GPU case where both input & the network is on cuda:1
? In particular, I think we probably just need to use a CUDAGuard
to change the default GPU to be the same as the one net.params
is using?
I am guessing that the error was caused by a mismatch between the default GPU and the inputs/net.params
' GPU. I even have some hope that maybe th.nn.DataParallel
would also work as long as there is CUDAGuard
, but maybe that's just my wishful thinking. Would be great to hear about your thoughts. Thanks!
from tiny-cuda-nn.
tcnn uses whichever CUDA device is "current" on the CPU thread, i.e. the device returned by cudaGetDevice
. This device needs to remain the same across all calls into tcnn.
If CUDAGuard
controls this (I haven't tried it myself), then yes, it should work the way you describe. If not, please let me know and I can add a tcnn-specific version of CUDAGuard that'll do the trick.
from tiny-cuda-nn.
Hi, do you have any plans on supporting multi-GPU training recently? Or do you have some hints about why the current code prevents using multiple GPUs with Pytorch distributed training? I think it will be super useful to have tinycudann used to train large-scale models with tiny MLPs. Thanks
from tiny-cuda-nn.
Related Issues (20)
- Failed to build PyTorch extension on Amazon Linux 2 HOT 1
- Hash Grid Encoding Gradient Computation
- Different learning rate per encoding level
- cannot do `pip install` for torch. HOT 1
- 'tiny cuda nn' issue HOT 1
- something to do with tinycudann
- Backward method of the grid encoding
- How to calculate FLOPs?
- Is the RTX4070ti supported?
- install issue HOT 6
- Add auxiliary losses directly imposed on params HOT 1
- README executable instructions include non-executable shell prompts
- Question about the bounding box
- initiailization of hash grid
- tinycudann ImportError: tinycudann_bindings/_80_C.cpython-38-x86_64-linux-gnu.so: undefined symbol: HOT 2
- Enable 5D grids HOT 2
- Link Against tiny-cuda-nn in C++ Program HOT 1
- [Question]: can tiny-cuda-nn build a network with layer's bias=0?
- Problems encountered during installation HOT 1
- Already setted the CUDA_HOME but still:CUDA_HOME environment variable is not set. Please set it to your CUDA install root. HOT 1
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 tiny-cuda-nn.