mirror of https://github.com/llvm/torch-mlir
09c988046c
This implements the Onnx.NegativeLogLikelihoodLoss op using the signature provided [here](https://onnx.ai/onnx/operators/onnx__NegativeLogLikelihoodLoss.html) by replacing it with a `NLLLossForward` op. Additionally, I included a helper function `get_loss_reduction_enum` to convert from a string `reduction` parameter to the corresponding intended integer value since this is an operation that will be reused for any loss function module. This differs from `get_reduction_enum` in `TorchUpstream.cpp` which handles the `reduce` parameter from `scatter_reduce` type operations. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
SparsityUtils.cpp | ||
TorchUpstream.cpp | ||
Utils.cpp |