Skip to content

Commit

Permalink
[Benchmark] Benchmark update_ (pytorch#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Mar 8, 2024
1 parent be7c991 commit 37997f4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions benchmarks/common/common_ops_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,16 @@ def exec_update_nested():
benchmark(exec_update_nested)


def test_update__nested(benchmark, td):
td2 = td.clone()

def exec_update__nested():
tdc = td.clone()
tdc.update_(td2)

benchmark(exec_update__nested)


def test_set_nested(benchmark, td, b):
def exec_set_nested():
tdc = td.clone()
Expand Down

0 comments on commit 37997f4

Please sign in to comment.