version2 with initial maxwell and cuda7 support