-
I have a large GPU tensor composed of booleans and I want to convert it to the mi.Bool type. I've found a method that works, but it is rather slow:
I believe there are alternative approaches to improve upon this. Any advice would be greatly appreciated. To clarify, I cannot change the method of creating the input |
Beta Was this translation helpful? Give feedback.
Answered by
merlinND
Nov 27, 2023
Replies: 1 comment 2 replies
-
Hello @ciy405x, Does the following work for you? choice = mi.Int32(choice.squeeze().to(torch.int32))
active = dr.eq(choice, 0) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
ciy405x
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @ciy405x,
Does the following work for you?