mirror of https://github.com/llvm/torch-mlir
58abec5c0a
This commit does a couple of things. First, it fixes a bug in the `linalg.generic` body of the `nll_loss_forward` lowering where the `ignoreIndex` was being compared with the loop index rather than the current element of the `target` tensor. This was not being caught by the tests because they were not testing the case where `ingnoreIndex` actually corresponds to a value in `target`. This has been fixed. Second, this commit adds support for the `reduction` argument in `torch.nll_loss_forward` as well as support for 1-D inputs. In order to simplify the lowering code, I've refactored the code that creates the `linalg.generic` ops for elementwise and reduction ops into static functions, to avoid having boilerplate code for indexing maps, etc that can be very error prone. Note: The function `convertScalarToDtype` was moved to before all the conversion patterns, but nothing in it was modified. |
||
---|---|---|
.. | ||
arange.py | ||
argmax.py | ||
backprop.py | ||
basic.py | ||
cast.py | ||
constant_alloc.py | ||
conv.py | ||
elementwise.py | ||
elementwise_comparison.py | ||
histogram_binning_calibration.py | ||
index_select.py | ||
main.py | ||
matmul.py | ||
mlp.py | ||
nll_loss.py | ||
norm_like.py | ||
quantized_models.py | ||
reduction.py | ||
reshape_like.py | ||
rng.py | ||
scalar.py | ||
scalar_comparison.py | ||
slice_like.py | ||
squeeze.py | ||
table_batch_embedding.py | ||
threshold.py | ||
type_conversion.py | ||
type_promotion.py | ||
vision_models.py | ||
xfail_sets.py |