

Since the scene did not previously load and render Frame 2 properly due to the CUDA crash, MayaBatch was reloaded and this time it worked right. variable set to 1, and it renders on one GPU as it should.

02:49:20: 0: INFO: Setting VRAY_GPU_PLATFORMS environment variable to 0 for this session Here is an example of what my task log looks like: 02:49:20: 0: INFO: Rendering with Maya Version 2018.0 The environment variables are being set before the MayaBatch process is even started, and your log does not show that, as it happened before the place you copied from. Please post the individual logs of the two tasks processed at the same time by the same Worker. There is no sign of any environment variables being set. The most important thing missing is the log line where the Environment variables are being set. So for some reason one task is rendering on one GPU, the other on both. This is thread 1 (second task): 16:20:57: 1: STDOUT: V-Ray: Device: GeForce RTX 2080 Ti (WDDM mode) has compute capability 7.5. 16:20:57: 0: STDOUT: V-Ray: Device: GeForce RTX 2080 Ti (WDDM mode) has compute capability 7.5. This is thread 0 (first task): 16:20:57: 0: STDOUT: V-Ray: Device: GeForce RTX 2080 Ti (WDDM mode) has compute capability 7.5. In this log, it has index 0: and 1: showing two threads were running: For example, 6 Concurrent Tasks, 1 GPU Per Task will render Tasks 0,1,2,3 on GPUs 0,1,2,3, while Tasks 4 and 5 will both render on all 4 GPUs. Note that if you try to render more concurrent tasks than there are GPUs, some tasks will use the GPUs Per Task value, and the excess ones will render on all GPUs. But the correct physical GPUs end up rendering, so it seems to be working as expected. Unfortunately, V-Ray indexes the devices in the log in consecutive order, so 0,2 reports as Device 0 and Device 1. As expected, the Task rendered on only the two specified GPUs. “0,2” to render on the first and third GPUs with 1 Concurrent Task. I also submitted a job with Selected GPUs, entering the indices by hand, e.g. I repeated the test with different combinations of Concurrent Tasks and GPUs per Task using both the Monitor Submitter and the Integrated Submitter. The result was 4 Tasks rendered in parallel, each using only 1 GPU. I run this on AWS using a g4dn.12xlarge instance which has 4 x T4 GPUs. To test, I submitted a V-Ray GPU scene from Maya using the integrated submitter set to frames 1 to 8, 4 Concurrent tasks, 1 GPU Per Task. Please BACK UP the original versions of the files before replacing them!
#VRAY GPU RENDERING ZIP FILE#
The ZIP file contains 3 updated script files you need to deploy as follows:
#VRAY GPU RENDERING CODE#
It uses the same basic code and UI as the Redshift implementation, with just a bit of V-Ray specific code to set the VRAY_GPU_PLATFORMS environment variable to the correct GPU indices. I have done only rudimentary testing, so please give it a try and let me know if anything does not behave as expected. Ok, here is my WIP implementation of V-Ray GPU Affinity.
