MCPcopy Create free account
hub / github.com/pytorch/pytorch / setUp

Method setUp

tools/test/test_codegen.py:214–228  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

212
213class TestGenSchemaRegistration(unittest.TestCase):
214 def setUp(self) -> None:
215 self.selector = SelectiveBuilder.get_nop_selector()
216 self.custom_native_function, _ = torchgen.model.NativeFunction.from_yaml(
217 {"func": "custom::func() -> bool"},
218 loc=torchgen.model.Location(__file__, 1),
219 valid_tags=set(),
220 )
221 (
222 self.fragment_custom_native_function,
223 _,
224 ) = torchgen.model.NativeFunction.from_yaml(
225 {"func": "quantized_decomposed::func() -> bool"},
226 loc=torchgen.model.Location(__file__, 1),
227 valid_tags=set(),
228 )
229
230 def test_default_namespace_schema_registration_code_valid(self) -> None:
231 native_functions = [DEFAULT_NATIVE_FUNCTION]

Callers

nothing calls this directly

Calls 2

get_nop_selectorMethod · 0.80
from_yamlMethod · 0.80

Tested by

no test coverage detected