Skip to content
Discussion options

You must be logged in to vote

dr::none_or<false> is a helper to avoid horizontal reductions when running in the JIT variants like cuda_ad_rgb. It means "dr::none(...) in scalar variants, or false in JIT variants".
This means the code inside of the if block needs to be masked to get correct results in JIT variants.

Since custom Python plugins are expected to always run in JIT variants, there's no equivalent to dr::none_or<>. You can either remove the if and use masks / selects (like you did), or you @dr.syntax / dr.if_stmt.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@merlinND
Comment options

merlinND Jan 8, 2025
Collaborator

Answer selected by njroussel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants