Skip to content

Implementing an argmax in drjit #1562

Closed Answered by njroussel
hsunekichi asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @hsunekichi

You might have seen this discussion in the Dr.Jit repository: mitsuba-renderer/drjit#375
You'll also want to have a look at this, slightly more general, page: https://drjit.readthedocs.io/en/stable/eval.html

Fundamentally, you'll never be able to have a symbolic horizontal reduction with a read of the result in the same kernel.
Note that we do have a mode=symbolic on most of our horizontal reductions, but they produce a side-effect which means that when you'll try to access the result it will trigger an evaluation.

The reason lies in the execution model: not all threads are alive at the same time. At any point in time, assuming you're running a very wide kernel, only a subs…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@wjakob
Comment options

@hsunekichi
Comment options

@wjakob
Comment options

@hsunekichi
Comment options

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