torch function on smart phone