the #ifdef was backwards for using SM or not