Redshift Gpu affinity



Does the Redshift env var REDSHIFT_GPUDEVICES override the slave GPU affinity? Which is respected if they are in conflict, for example one is set to GPU0, the other GPU1?





Unlike CPU affinity, Deadline doesn’t set a mask on what gpu resources the process can use. GPU usage is solely determined by the application that uses the gpus and how it accepts their selection.

In the case of Redshift interacting with gpu affinity overrides, we take into account the job’s settings and the Slave’s gpu affinity override. Based on those values, we set the gpus to use based on how the program accepts it. Whether it’s from an environment variable, command-line flag, or code executed in the 3rd party app.

In the case of Redshift Standalone, we’re using the -gpu and an index for each gpu we wish to specify for the render. Looking at Redshift docs: they don’t specify the interaction between environment and command-line flag. I have a hunch that the command-line flag will override the environment variable, but that’s not something I can verify at the moment.