-
Notifications
You must be signed in to change notification settings - Fork 35
Out of memory even though the assigned gpu is free #7
Copy link
Copy link
Open
Description
Notice that context buffer is created before gpu assignment:
OptixRenderer/src/optixRenderer/src/optixRenderer.cpp
Lines 514 to 525 in 84b48be
| unsigned scale = createContext(context, use_pbo, cameraInput.cameraType, | |
| cameraInput.width, | |
| cameraInput.height, | |
| mode, | |
| cameraInput.sampleNum, | |
| maxPathLength, | |
| rrBeginLength ); | |
| if(gpuIds.size() != 0){ | |
| std::cout<<"GPU Num: "<<gpuIds.size()<<std::endl; | |
| context -> setDevices(gpuIds.begin(), gpuIds.end() ); | |
| } |
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():
| Buffer outputBuffer = context -> createBuffer(RT_BUFFER_OUTPUT, RT_FORMAT_FLOAT3, bWidth, bHeight); |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels