How do I get a list of all IR ops in glow?
You can look to a couple places in code depending on what exactly you’re looking for.
You can see all of Glow’s Nodes here. But it generally makes more sense to see if a Node is supported on a specific backend, and with a specific precision.
So you can see whether a particular backend supports a Node with a specific precision by looking at
Backend::isOpSupported(). For example, here is that function for our CPU backend.
Thanks Jordan. Can you point me to any description (document or source code) for memory management pass within the compiler?
Sure! Just to be clear, we mainly do memory-related management/optimizations with our low-level IR, meaning only backends which use our low-level IR benefit from them. That includes our CPU, OpenCL, and Interpreter backends, but not Habana which skips low-level IR. Here are some links you might find useful:
- Our default low-level IR scheduler which tries to minimize memory usage
- Our IR Optimizer does many memory related optimizations such as buffer sharing, skipping unnecessary intermediate allocations, alloc activation sinking, and many more found in that file, many (but not all) of which are listed/described here
- And here’s a general description of our low-level IR
Hope that helps!