hello, in device group, we have a concept devicemask.
What is the device mask?
If a device group has three different GPUs.
How can I set the device mask if I want to apply to only two among three?
As its name suggests, it is a bitmask formed by bits according to the ordinal number of the subdevice participating in the device group.
// accumulating only the bits corresponding to the index of the first and third subdevices, respectively.
uint32_t devMask = 0;
devMask |= (1 << /* 1st subdevice index*/0);
devMask |= (1 << /* 3rd subdevice index*/2);
// skipping the second subdevice, which would be (1 << /*2nd sudevice index*/1);
uint32_t subdeviceCnt = 3; // queried from your chosen setup.
// now, selecting all subdevices.
for (int i = 0; i < subdeviceCnt; i++)
devMask |= (1 << i);
1 Like
Hello, Veryzon
Thank you so much. Now I understand
See you, Veryzon