You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Node Verification is Backend independent, but there are components of the Node that depend on the backend for validity. Some examples:
Different backends have different dimensional limits for various Nodes (e.g. CPU/Interp is limited to 6 dimensions for BatchedReduceAdd, but OCL is limited to 4).
Tensor Alignment will be phased in to some backends before others.
Fused Activations are supported on specific backends only (initially just Habana).
OpenCL has a limitation on the group parameter for Convolutions which doesn't exist on other backends.
The way we handle this currently is to put asserts in the backend specific code when executing these instructions, but this is brittle and spread through various places in the code. We should be able to tell if a Function is valid at compile time.
To fix this, we could add a Verify() method to Backend which can be overriden to handle these backend specific checks - similar to how transformPostLowering works now.
The text was updated successfully, but these errors were encountered:
This is related to #3452 : I am currently working on layout verifier, the natural place for it Function::verify(), but the layout requirements are backend dependent of course. To make a clean implementation of that larger issue, we would need to support this by either: having backend-agonistic checks, that can be extended in a specific backend or requirement methods that can be overridden by specific backends.
The downside of the second approach is that the optimizer (for example) might make certain assumptions that verify as correct in the base method but break a target backend that overwrote said method.
Currently Node Verification is Backend independent, but there are components of the Node that depend on the backend for validity. Some examples:
The way we handle this currently is to put asserts in the backend specific code when executing these instructions, but this is brittle and spread through various places in the code. We should be able to tell if a Function is valid at compile time.
To fix this, we could add a Verify() method to Backend which can be overriden to handle these backend specific checks - similar to how transformPostLowering works now.
The text was updated successfully, but these errors were encountered: