Extract the pieces of an ir.Buffer that we should invalidate cached autotuning results on.
(node)
| 958 | |
| 959 | @staticmethod |
| 960 | def key_of(node): |
| 961 | """ |
| 962 | Extract the pieces of an ir.Buffer that we should invalidate cached |
| 963 | autotuning results on. |
| 964 | """ |
| 965 | sizevars = V.graph.sizevars |
| 966 | return ( |
| 967 | node.get_device().type, |
| 968 | str(node.get_dtype()), |
| 969 | *sizevars.size_hints( |
| 970 | node.get_size(), |
| 971 | fallback=config.unbacked_symint_fallback, |
| 972 | ), |
| 973 | *sizevars.size_hints( |
| 974 | node.get_stride(), |
| 975 | fallback=config.unbacked_symint_fallback, |
| 976 | ), |
| 977 | sizevars.size_hint( |
| 978 | node.get_layout().offset, |
| 979 | fallback=config.unbacked_symint_fallback, |
| 980 | ), |
| 981 | ) |
| 982 | |
| 983 | |
| 984 | _ALGORITHM_SELECTOR_CACHE = None |
no test coverage detected