Ubuntu - GPU - Get the GPU Memory Bus Size

sudo dmesg | grep drm | grep "RAM width" | cut -d "]" -f3 | cut -d " " -f4

returns:

384bits