High-performance hardware for machine learning