Closed KrutavShah closed 3 years ago
What about trying to mask out the generation instead of listing all cards? Currently we have a lot of IDs, I think we can simplify the tables and reduce maintenance by using range checks instead. Example:
// Maxwell
if(0x1300 <= actual_devid && actual_devid < 0x1400) {
spoofed_devid = 0x13f2; // Tesla M60
}
// Pascal
if(0x1b00 <= actual_devid && actual_devid < 0x1d80) {
spoofed_devid = 0x1b38; // Tesla P40
}
// Volta
if(0x1d80 <= actual_devid && actual_devid < 0x1e00) {
spoofed_devid = 0x1db4; // Tesla V100
}
// Turing
if(0x1e00 <= actual_devid && actual_devid < 0x2200) {
spoofed_devid = 0x1e30; // Quadro RTX 6000
spoofed_subsysid = 0x12ba;
}
// Ampere
if(0x2200 <= actual_devid && actual_devid < 0x2300) {
spoofed_devid = 0x2235; // RTX A40
}
This change will require users to reselect which vGPU profile they want to use, as this exposes only one vGPU compatible card instead of several like before. The outcome is having more profiles to select from, but users also need to be careful to select profiles only if they have adequate VRAM.