# tensorplay.stax.stax

Source: https://www.tensorplay.cn/docs/generated/tensorplay.stax.stax.html

# tensorplay.stax.stax

tensorplay.stax.stax(graph_module: GraphModule, example_inputs: [list](https://docs.python.org/3/library/stdtypes.html#list)[[Any](https://docs.python.org/3/library/typing.html#typing.Any)], *, mode: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) = None, options: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [Any](https://docs.python.org/3/library/typing.html#typing.Any)] | [None](https://docs.python.org/3/library/constants.html#None) = None, name: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) = None, dynamic: [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None) = None, strict_native: [bool](https://docs.python.org/3/library/functions.html#bool) = False, **kwargs: [Any](https://docs.python.org/3/library/typing.html#typing.Any))[[source]](../_modules/tensorplay/backends/stax.html#stax)

Compile one canonical graph and return an executable callable.

example_inputs and backend options are part of the same contract as
TorchInductor’s compile_fx entry point.  Stax currently specializes
metadata in the frontend and uses the native graph when its lowering
contract is satisfied.  strict_native makes a failed lowering a hard
compiler error, so a benchmark can never report the Python GraphModule
executor as compiled performance.
