ggerganov / ggml

Tensor library for machine learning
MIT License
11.28k stars 1.05k forks source link

feat: refactor cross entropy, add CUDA, fix grad test #929

Closed JohannesGaessler closed 3 months ago

JohannesGaessler commented 3 months ago

I'm currently working on enabling MNIST training for backends other than CPU. As part of that I'm adding CUDA support for cross entropy loss which I'm spinning out into a separate PR since I think it will make reviewing easier. This PR makes the following changes: