Skip to content

Commit

Permalink
#11512: Update paths to sweep utils file
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjagrujic committed Oct 25, 2024
1 parent 01b8bcd commit bc7bbb0
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down Expand Up @@ -130,5 +130,5 @@ def run(
pcc[1] = min(pcc[1], str_to_float(pcc_tmp[1]))

pcc[1] = str(pcc[1])
print(f"pcc {pcc}")
# print(f"pcc {pcc}")
return [pcc, e2e_perf]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down Expand Up @@ -132,25 +132,3 @@ def run(
pcc[1] = str(pcc[1])
# print(f"pcc {pcc} - {grad_dtype}, {input_a_dtype}, {input_b_dtype}")
return [pcc, e2e_perf]


# from tests.sweep_framework.permutations import *

# start_time = start_measuring_time()
# for suite in parameters.keys():
# device_id = 0
# device = ttnn.open_device(device_id=device_id)
# suite_vectors = list(permutations(parameters[suite]))
# print(len(suite_vectors))
# for vector in suite_vectors:
# try:
# passed, _ = run(**vector, device=device)
# if passed[0] != True:
# print(passed)
# except Exception as e:
# print(e)

# ttnn.close_device(device)

# e2e_perf = stop_measuring_time(start_time)
# print(f"time {e2e_perf / 1000000000}s")
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down Expand Up @@ -157,25 +157,3 @@ def run(
pcc[1] = str(pcc[1])
# print(f"pcc {pcc} - {grad_dtype}, {input_a_dtype}, {input_b_dtype}")
return [pcc, e2e_perf]


# from tests.sweep_framework.permutations import *

# start_time = start_measuring_time()
# for suite in parameters.keys():
# device_id = 0
# device = ttnn.open_device(device_id=device_id)
# suite_vectors = list(permutations(parameters[suite]))
# print(len(suite_vectors))
# for vector in suite_vectors:
# try:
# passed, _ = run(**vector, device=device)
# if passed[0] != True:
# print(passed)
# except Exception as e:
# print(e)

# ttnn.close_device(device)

# e2e_perf = stop_measuring_time(start_time)
# print(f"time {e2e_perf / 1000000000}s")
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down
22 changes: 1 addition & 21 deletions tests/sweep_framework/sweeps/eltwise/unary_complex/conj.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down Expand Up @@ -93,23 +93,3 @@ def run(
pcc = check_with_pcc(torch.view_as_real(torch_output_tensor), torch.view_as_real(output_tensor), 0.99)
# print(f"pcc {pcc} input_a_dtype {input_a_dtype}")
return [pcc, e2e_perf]


# from tests.sweep_framework.permutations import *

# start_time = start_measuring_time()
# for suite in parameters.keys():
# device_id = 0
# device = ttnn.open_device(device_id=device_id)
# suite_vectors = list(permutations(parameters[suite]))
# print(len(suite_vectors))
# for vector in suite_vectors:
# try:
# passed, _ = run(**vector, device=device)
# except Exception as e:
# print(e)

# ttnn.close_device(device)

# e2e_perf = stop_measuring_time(start_time)
# print(f"time {e2e_perf / 1000000000}s")
24 changes: 23 additions & 1 deletion tests/sweep_framework/sweeps/eltwise/unary_complex/reciprocal.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down Expand Up @@ -91,3 +91,25 @@ def run(
pcc = check_with_pcc(torch.view_as_real(torch_output_tensor), torch.view_as_real(output_tensor), 0.99)
# print(f"pcc {pcc} input_a_dtype {input_a_dtype}")
return [pcc, e2e_perf]


# from tests.sweep_framework.permutations import *

# start_time = start_measuring_time()
# for suite in parameters.keys():
# device_id = 0
# device = ttnn.open_device(device_id=device_id)
# suite_vectors = list(permutations(parameters[suite]))
# print(len(suite_vectors))
# for vector in suite_vectors:
# try:
# passed, _ = run(**vector, device=device)
# if passed[0] != True:
# print(passed)
# except Exception as e:
# print(e)

# ttnn.close_device(device)

# e2e_perf = stop_measuring_time(start_time)
# print(f"time {e2e_perf / 1000000000}s")
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import random
import ttnn
from tests.sweep_framework.utils import gen_shapes
from tests.sweep_framework.sweep_utils.utils import gen_shapes
from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt

from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time
Expand Down Expand Up @@ -145,23 +145,3 @@ def run(

# print(f"pcc {pcc} input_a_dtype {input_a_dtype}")
return [pcc, e2e_perf]


# from tests.sweep_framework.permutations import *

# start_time = start_measuring_time()
# for suite in parameters.keys():
# device_id = 0
# device = ttnn.open_device(device_id=device_id)
# suite_vectors = list(permutations(parameters[suite]))
# print(len(suite_vectors))
# for vector in suite_vectors:
# try:
# passed, _ = run(**vector, device=device)
# except Exception as e:
# print(e)

# ttnn.close_device(device)

# e2e_perf = stop_measuring_time(start_time)
# print(f"time {e2e_perf / 1000000000}s")

0 comments on commit bc7bbb0

Please sign in to comment.