Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Operator] Develop forward function for cumprod operator. #357

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

RubiaCx
Copy link

@RubiaCx RubiaCx commented Dec 12, 2024

PR Category

Operator cumprod

Type of Change

New Feature

Description

Develop forward function for cumprod operator.

  • Add support for cumulative product along any dimension
  • Handle edge cases (empty tensors, single elements) Implement scan-and-propagate pattern for 1-Dim and N-Dims cases

Issue

#319

Test & Performance

Run test cases for:

  • Basic functionality (1D/2D/3D tensors)
  • Different data types
  • Edge cases (empty/single element)
  • Large tensors
  • Negative dimensions

image

- Add support for cumulative product along any dimension
- Handle edge cases (empty tensors, single elements)
Implement scan-and-propagate pattern for 1D and N-D cases
@RubiaCx
Copy link
Author

RubiaCx commented Dec 13, 2024

Benchmarked on NV A100 GPUs comparing Torch and Triton for cumprod. Tested across sizes, data types, edge cases, and special values like NaNs.
Triton matches Torch in accuracy with differences between 1e−8 and 1e−15:
image

@iclementine iclementine self-assigned this Dec 13, 2024
@iclementine
Copy link
Collaborator

iclementine commented Dec 17, 2024

Please add unit tests and benchmark for cumprod according to the contribution guide.

@RubiaCx
Copy link
Author

RubiaCx commented Dec 23, 2024

Please add unit tests and benchmark for cumprod according to the contribution guide.

Hi, I've implemented the Cumprod operator with accuracy tests and performance benchmarks.
However, I encountered an error with the torch backend device: AttributeError: 'NoneType' object has no attribute 'matmul'
image
image

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