Skip to content

Conversation

@zahidwx
Copy link
Contributor

@zahidwx zahidwx commented May 24, 2025

This PR takes care of #4203.

  • e2e support of aten.kl_div op supporting all reduction modes (mean, sum, batchmean, none)
  • reduction: batchmean requires special handling by calling op with sum and then dividing it by input batch_size.

Some tests are failing and are marked either in expected failures or crashing set.

  • config=linalg | RuntimeError: attribute lookup is not defined on builtin | LINALG_XFAIL_SET
  • config=torchdynamo | Error: failed to legalize operation 'torch.aten.xlogy.Tensor' | TORCHDYNAMO_CRASHING_SET
  • config=onnx | RuntimeError: aten::div() Expected a value of type 'number' for argument 'other' but instead found type 'Tensor' Position: 1
    Value: tensor(1)
    Declaration: aten::div.Scalar(Tensor self, Scalar other) -> Tensor
    Cast error details: Cannot cast tensor(1) to number | ONNX_XFAIL_SET
  • config=onnx_tosa | Error: failed to legalize operation 'torch.aten.size.int' that was explicitly marked illegal | ONNX_TOSA_XFAIL_SET

@zahidwx zahidwx marked this pull request as ready for review May 25, 2025 11:11
@zahidwx
Copy link
Contributor Author

zahidwx commented May 26, 2025

Can someone review this please? @vivekkhandelwal1 @penguin-wwy @AmosLewis @rsuderman

@zahidwx zahidwx force-pushed the feature/kl_div_loss branch from 84f5325 to daf7aee Compare June 19, 2025 19:58
@zahidwx
Copy link
Contributor Author

zahidwx commented Jun 19, 2025

Reminder: This PR is ready to be reviewed @vivekkhandelwal1 & @zjgarvey

Copy link
Collaborator

@zjgarvey zjgarvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Let me know if you need a merge.

@zahidwx
Copy link
Contributor Author

zahidwx commented Jun 24, 2025

Looks good to me. Let me know if you need a merge.

@zjgarvey It's ready for merge.

@zjgarvey zjgarvey merged commit 8cc313f into llvm:main Jun 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants