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

Support higher axis numbers for dr.any and dr.all reductions #304

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zhestyatsky
Copy link

Hello,

I have been experimenting with the latest drjit version and noticed that dr.all() and dr.any() operations seem to not be supported for Tensors when they are evaluated with axis argument greater than 0.

Reproducer below raises RuntimeError: drjit.all(<drjit.cuda.TensorXb>): tensor type is not compatible with the requested reduction.

import drjit as dr
from drjit.cuda import TensorXb

v = TensorXb([[True, False, True],
              [True, True, True],
              [True, False, True],
              [True, True, True]
             ])
dr.all(v, axis=1)

Similar exception is raised when calling dr.any().

This PR aims to enable dr.all() and dr.any() operations for Tensors with axis parameter greater than 0.

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.

1 participant