-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused getitems in op by op flow [#105]
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-FileCopyrightText: (c) 2024 Tenstorrent AI ULC | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
import torch | ||
from torch import nn | ||
import pytest | ||
|
||
import tt_torch | ||
from tt_torch.tools.verify import verify_module | ||
from tt_torch.tools.utils import CompilerConfig, CompileDepth | ||
|
||
|
||
def test_maxpool2d(): | ||
class Basic(nn.Module): | ||
def __init__(self): | ||
super().__init__() | ||
|
||
def forward(self, x): | ||
return torch.nn.functional.max_pool2d(x, kernel_size=2, stride=2) | ||
|
||
cc = CompilerConfig() | ||
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP | ||
verify_module( | ||
Basic(), | ||
inputs=[torch.randn(1, 1, 224, 224).to(torch.bfloat16)], | ||
compiler_config=cc, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters