Skip to content

Instantly share code, notes, and snippets.

@leslie-fang-intel
Last active February 15, 2023 01:34
Show Gist options
  • Select an option

  • Save leslie-fang-intel/b42c8f080a14e212d6c6978d389c6942 to your computer and use it in GitHub Desktop.

Select an option

Save leslie-fang-intel/b42c8f080a14e212d6c6978d389c6942 to your computer and use it in GitHub Desktop.
guards is: {
Guard(name='self', source=<GuardSource.LOCAL: 0>, create_fn=<function GuardBuilder.NN_MODULE at 0x7f01161ab160>, is_volatile=False, guard_types=['ID_MATCH'], code_list=['___check_obj_id(self, 139643301645088)'], obj_weakref=<weakref at 0x7f00fa06a180; to 'Mod' at 0x7f013d63cb20>, guarded_class_weakref=<weakref at 0x7f01362b6360; to 'type' at 0x5572acee40e0 (Mod)>),
Guard(name='x', source=<GuardSource.LOCAL: 0>, create_fn=<function GuardBuilder.TENSOR_MATCH at 0x7f01161ab8b0>, is_volatile=False, guard_types=['TENSOR_MATCH'], code_list=None, obj_weakref=<weakref at 0x7f0116fac2c0; to 'Tensor' at 0x7f0116ed6810>, guarded_class_weakref=<weakref at 0x7f0119143900; to 'torch._C._TensorMeta' at 0x5572ab714830 (Tensor)>),
Guard(name='self.linear', source=<GuardSource.LOCAL_NN_MODULE: 2>, create_fn=<function GuardBuilder.NN_MODULE at 0x7f01161ab160>, is_volatile=False, guard_types=None, code_list=None, obj_weakref=None, guarded_class_weakref=None),
Guard(name='torch', source=<GuardSource.GLOBAL: 1>, create_fn=<function GuardBuilder.FUNCTION_MATCH at 0x7f01161ab1f0>, is_volatile=False, guard_types=None, code_list=None, obj_weakref=None, guarded_class_weakref=None)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment