lzqsd / OptixRenderer

An optix-based GPU path tracer
MIT License
87 stars 33 forks source link

Out of memory even though the assigned gpu is free #7

Open jiangjiechu opened 2 years ago

jiangjiechu commented 2 years ago

Notice that context buffer is created before gpu assignment: https://github.com/lzqsd/OptixRenderer/blob/84b48be7543c46832ec9ad090f96951d5cc6750d/src/optixRenderer/src/optixRenderer.cpp#L514-L525 This could induce serious memory harassment when there are other jobs running on a multi-GPU server. If any one gpu memory is used up, the program will throw out of memory exception and quit, despite that there are plenty of free devices. The gpu should be set before the createBuffer() line in createContext():https://github.com/lzqsd/OptixRenderer/blob/84b48be7543c46832ec9ad090f96951d5cc6750d/src/optixRenderer/src/creator/createContext.cpp#L36

Kartoffelchen commented 1 year ago

Sorry, I tried your solution, but it did not work? Any other advice?