-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Description
Hi, I'm working on a project that involves lowering math.isFinite to SPIR-V. I've noticed a few things and would like to confirm whether the current infrastructure supports this, and how best to proceed.
Current observations:
-
math.isFinite is already supported and lowered to the LLVM and NVVM dialects.
-
However, I couldn't find any existing support for lowering math.isFinite to the SPIR-V dialect.
-
The SPIR-V dialect itself does not define an equivalent operation (e.g., spirv.IsFinite), but the SPIR-V specification does include the OpIsFinite instruction.
My questions:
-
Is it expected that math.isFinite should eventually lower to a SPIR-V operation like OpIsFinite?
-
If so, should a new spirv.IsFinite op be introduced in the SPIR-V dialect to support this?
-
Or is there a recommended workaround for this case (e.g. combine isinf/isnan with boolean logic)?
I'm currently exploring the feasibility of this lowering and not yet planning to submit a patch. I’d appreciate any guidance on the intended direction for this feature.
Thanks!