gres/gpu: better handling of variable initialization