triton.language.where¶
- triton.language.where(condition, x, y)¶
- Returns a tensor of elements from either - xor- y, depending on- condition.- Note that - xand- yare always evaluated regardless of the value of- condition.- If you want to avoid unintented memory operations, use the - maskarguments in triton.load and triton.store instead.- The shape of - xand- yare both broadcast to the shape of- condition.- xand- ymust have the data type.- Parameters
- condition (Block of triton.bool) – When True (nonzero), yield x, otherwise yield y. 
- x – values selected at indices where condition is True. 
- y – values selected at indices where condition is False.