Skip to content

Add lowering for bitwise_left_shift.#8865

Merged
ysiraichi merged 6 commits intomasterfrom
ysiraichi/lower-left-shift
Mar 24, 2025
Merged

Add lowering for bitwise_left_shift.#8865
ysiraichi merged 6 commits intomasterfrom
ysiraichi/lower-left-shift

Conversation

@ysiraichi
Copy link
Copy Markdown
Collaborator

This PR lowers torch.bitwise_left_shift operation. It introduces the following changes:

  • Add bitwise_left_shift.Tensor to full_codegen section of native_functions.yaml
  • Introduce the corresponding *OuputShape() and *::Lower() functions
  • Add test confirming that we don't fallback

@ysiraichi ysiraichi added the lowering ATen Operation lowering label Mar 20, 2025
@ysiraichi ysiraichi requested review from pgmoka and tengyifei and removed request for tengyifei March 20, 2025 18:28
Copy link
Copy Markdown
Collaborator

@pgmoka pgmoka left a comment

Choose a reason for hiding this comment

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

Could you add a link to https://github.com/pytorch/xla/blob/master/docs/source/contribute/codegen_migration.md as potential reference for what was done here?

Also, I had one question I was curious about. Depending on that, there might be changes I would suggest.

Comment thread torch_xla/csrc/ops/ops_xla_shape_fn.cpp
@ysiraichi ysiraichi merged commit 46a7990 into master Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lowering ATen Operation lowering

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants