diff --git a/fbgemm_gpu/test/sparse/pack_segments_test.py b/fbgemm_gpu/test/sparse/pack_segments_test.py index ab1b0e654b..78fa95ccdf 100644 --- a/fbgemm_gpu/test/sparse/pack_segments_test.py +++ b/fbgemm_gpu/test/sparse/pack_segments_test.py @@ -398,6 +398,7 @@ def test_pack_segments_meta_backend( return_presence_mask=True, ) + # pyre-fixme[6]: In call `tuple.__new__`, for 1st positional argument, expected `Iterable[int]` but got `Iterable[bool | float | int]`. assert presence_mask.size() == torch.Size([lengths.numel(), max_length]) @unittest.skipIf(*gpu_unavailable) diff --git a/fbgemm_gpu/test/sparse/permute_indices_test.py b/fbgemm_gpu/test/sparse/permute_indices_test.py index dd2ce3a0a3..1296d160c8 100644 --- a/fbgemm_gpu/test/sparse/permute_indices_test.py +++ b/fbgemm_gpu/test/sparse/permute_indices_test.py @@ -77,10 +77,14 @@ def test_permute_indices( lengths = torch.cat(length_splits, dim=1) else: lengths = torch.randint(low=1, high=L, size=(T, B)).type(index_dtype) + # pyre-fixme[6]: For 1st param expected `list[int] | Size | + # tuple[int, ...]` but got `bool | float | int`. weights = torch.rand(lengths.sum().item()).float() if has_weight else None indices = torch.randint( low=1, high=int(1e5), + # pyre-fixme[6]: Expected `int | tuple[int, ...]` for 3rd + # param but got `tuple[float | int]`. size=(lengths.sum().item(),), ).type(index_dtype) if is_1D: @@ -189,6 +193,8 @@ def test_permute_indices_non_contiguous( indices = torch.randint( low=1, high=int(1e5), + # pyre-fixme[6]: Expected `int | tuple[int, ...]` for 3rd + # param but got `tuple[float | int]`. size=(lengths.sum().item(),), ).type(index_dtype) @@ -247,6 +253,8 @@ def test_permute_indices_scripted_with_none_weights( indices = torch.randint( low=1, high=int(1e5), + # pyre-fixme[6]: Expected `int | tuple[int, ...]` for 3rd + # param but got `tuple[float | int]`. size=(lengths.sum().item(),), ).type(index_dtype) permute_list = list(range(1)) @@ -284,10 +292,14 @@ def test_permute_indices_with_repeats( ) -> None: index_dtype = torch.int64 if long_index else torch.int32 lengths = torch.randint(low=1, high=L, size=(T, B)).type(index_dtype) + # pyre-fixme[6]: For 1st param expected `list[int] | Size | + # tuple[int, ...]` but got `bool | float | int`. weights = torch.rand(lengths.sum().item()).float() if has_weight else None indices = torch.randint( low=1, high=int(1e5), + # pyre-fixme[6]: Expected `int | tuple[int, ...]` for 3rd + # param but got `tuple[float | int]`. size=(lengths.sum().item(),), ).type(index_dtype) permute_list = list(range(T))