Documentation
¶
Overview ¶
Package opschema holds the per-op input specifications MIL ops are declared with in coremltools.
Every op class in coremltools/converters/mil/mil/ops/defs declares an InputSpec (input_type.py:32-53): an ordered map from input name to an _InputType carrying a const and an optional flag (input_type.py:145-160) and, for tensors, a type domain (input_type.py:238-282). The spec is what coremltools checks a program against before it will serialize it. The table in table.gen.go is a dump of those specs for the ops we emit; see gen/dumpops.py.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Known ¶
Known reports whether schemas are recorded for opset, named as MIL text names it ("ios15" and up). Callers skip per-op checking for unknown opsets rather than reporting an error, so a test asserts the opsets we emit are known.
func Registered ¶
Registered reports whether the table records opType for any opset. It is false both for an op that does not exist and for one the dump does not cover, so it cannot be used to reject an op outright.
Types ¶
type DataType ¶
type DataType string
DataType is a MIL builtin type name, as types.builtin_to_string renders it.