Benign repos Download

hop_db.py

Python unittest importPython repeats repository clone calls
SHA-256bb5c775291749cf68da473fd878bf82dcafc39c6c2b97ee018f2a06ec9b57ee1

Evidence

Python unittest import lines 1–18
1# mypy: ignore-errors
2
3import functools
4import unittest
5
6import torch
7from functorch.experimental.control_flow import map
8from torch.nn.attention.flex_attention import _create_empty_block_mask, flex_attention
9from torch.testing import make_tensor
10from torch.testing._internal.common_device_type import onlyCUDA
11from torch.testing._internal.common_dtype import all_types_and, custom_types
12from torch.testing._internal.opinfo.core import DecorateInfo, OpInfo, SampleInput
13from torch._higher_order_ops.invoke_subgraph import mark_compile_region
14from torch._higher_order_ops import InvokeQuant, invoke_quant_packed
15
16
17def sample_inputs_map(opinfo, device, dtype, requires_grad, **kwargs):
18 make_arg = functoo …
CLI print subcommand token lines 104–109
104:38… DO(soulitzer)
105 "foreach_map",
106 "aoti_call_delegate",
107 "print",
108 "inductor_compiled_code", # Tested separately in test_inductor_wrap_inductor_compile_regions
109 "invoke_leaf_function", …
Python module-level function call lines 109–130
109:33… eeds torch.compile, tested separately in test_leaf_function*
110]
111
112torch.library.define(
113 "testlib::mutating_custom_op",
114 "(Tensor(a!) x, Tensor(b!) z) -> (Tensor, Tensor, Tensor)",
⋯6 lines
121 x.add_(5)
122 z.add_(5)
123 return x.clone(), z.clone(), x + z
124
125
⋯5 lines
imports Replicate from torch.distributed.tensor.placement_types lines 248–252
248:37… ed torch.distributed to be available")
249 from torch.distributed.tensor.placement_types import Replicate
250
251 gm.meta["local_map_kwargs"] = {
252 "in_placements": (Replicate(), Replicate(), Replic …
Module assigns a no-arg call lines 271–287
271:7… f combine_fn(carry, x):
272 result = carry @ x + x
273 return result, carry.clone()
274
275 return torch._higher_order_ops.scan(combine_fn, init, xs)
276
277
278quant_tracer = InvokeQuant()
279
280
⋯7 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.