vllm.compilation.passes.inductor_pass
¶
Classes:
-
CallableInductorPass–This class is a wrapper for a callable that automatically provides an
-
InductorPass–A custom graph pass that uses a hash of its source as the UUID.
Functions:
-
enable_fake_mode–Applies a FakeTensorMode context. This is useful when you don't want to
-
get_pass_context–Get the current pass context.
-
pass_context–A context manager that stores the current pass context,
CallableInductorPass
¶
Bases: InductorPass
This class is a wrapper for a callable that automatically provides an implementation of the UUID.
InductorPass
¶
Bases: CustomGraphPass
A custom graph pass that uses a hash of its source as the UUID. This is defined as a convenience and should work in most cases.
Methods:
-
hash_dict–Utility method to hash a dictionary, can alternatively be used for uuid.
-
hash_source–Utility method to hash the sources of functions or objects.
-
uuid–Provide a unique identifier for the pass, used in Inductor code cache.
hash_dict(dict_)
staticmethod
¶
Utility method to hash a dictionary, can alternatively be used for uuid.
Returns:
-
str–A sha256 hash of the json rep of the dictionary.
hash_source(*srcs)
staticmethod
¶
uuid()
¶
Provide a unique identifier for the pass, used in Inductor code cache. This should depend on the pass implementation, so that changes to the pass result in recompilation. By default, the object source is hashed.
enable_fake_mode(fn)
¶
Applies a FakeTensorMode context. This is useful when you don't want to create or run things with real tensors.
get_pass_context()
¶
Get the current pass context.
pass_context(compile_range)
¶
A context manager that stores the current pass context, usually it is a list of sizes to specialize.