Skip to content

Commit

Permalink
#7292: Fix non working sweeps in working folder
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjagrujic committed May 10, 2024
1 parent 76a3f60 commit b3945f9
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,14 @@ def gen_permute_args(
mem_configs,
do_sanitize_args=do_sanitize_args,
):
if input_info["layout"][0] == ttl.tensor.Layout.ROW_MAJOR:
# Last dim of output must be divisible by 2 for row_major
last_dim = permute_dims[-1]
last_dim_shape = input_shapes[0][last_dim]

if last_dim_shape % 2 == 1:
continue

if input_info is not None:
input_info.update({"permute_dims": permute_dims})
yield input_info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,3 @@ test-list:
buffer-type: ["DRAM", "L1"]
out-buffer-type: ["DRAM", "L1"]
output-file: eltwise_exp_sweep.csv
- ttnn-exp:
shape:
start-shape: [1, 1, 1, 2]
end-shape: [6, 12, 256, 256]
interval: [1, 1, 1, 2]
num-dims: [2, 3, 4]
num-shapes: 1
num-samples: 64
args-sampling-strategy: "all"
datagen:
function: gen_rand
args:
low: -10
high: 10
comparison:
function: comp_pcc
args-gen: gen_dtype_layout_device
output-file: eltwise_exp_sweep.csv
env:
# TT_PCI_DMA_BUF_SIZE: "1048576"
args:
data-layout: ["ROW_MAJOR"]
data-type: ["BFLOAT16"]
buffer-type: ["DRAM", "L1"]
out-buffer-type: ["DRAM", "L1"]
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test-list:
high: 100
comparison:
function: comp_pcc
args-gen: gen_scalar_args
args-gen: gen_dtype_layout_device
sanitize-args: False
args:
data-layout: ["TILE"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ test-list:
num-shapes: 2
num-samples: 128
args-sampling-strategy: "all"
method: "tt_nn-bcast"
env:
# TT_PCI_DMA_BUF_SIZE: "1048576"
datagen:
Expand All @@ -18,7 +19,7 @@ test-list:
high: 100
comparison:
function: comp_pcc
args-gen: gen_scalar_args
args-gen: gen_dtype_layout_device
sanitize-args: False
args:
data-layout: ["TILE"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,3 @@ test-list:
buffer-type: ["DRAM", "L1"]
out-buffer-type: ["DRAM", "L1"]
output-file: eltwise_exp_sweep.csv
- ttnn-exp:
shape:
start-shape: [1, 1, 1, 2]
end-shape: [6, 12, 256, 256]
interval: [1, 1, 1, 2]
num-dims: [2, 3, 4]
num-shapes: 1
num-samples: 64
args-sampling-strategy: "all"
datagen:
function: gen_rand
args:
low: -10
high: 10
comparison:
function: comp_pcc
args-gen: gen_dtype_layout_device
output-file: eltwise_exp_sweep.csv
env:
# TT_PCI_DMA_BUF_SIZE: "1048576"
args:
data-layout: ["ROW_MAJOR"]
data-type: ["BFLOAT16"]
buffer-type: ["DRAM", "L1"]
out-buffer-type: ["DRAM", "L1"]
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test-list:
high: 100
comparison:
function: comp_pcc
args-gen: gen_scalar_args
args-gen: gen_dtype_layout_device
sanitize-args: False
args:
data-layout: ["TILE"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test-list:
high: 100
comparison:
function: comp_pcc
args-gen: gen_scalar_args
args-gen: gen_dtype_layout_device
sanitize-args: False
args:
data-layout: ["TILE"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test-list:
interval: [1, 1, 32, 32]
num-dims: [2, 3, 4]
num-shapes: 1
num-samples: 128
num-samples: 64
args-sampling-strategy: "all"
env:
# TT_PCI_DMA_BUF_SIZE: "1048576"
Expand All @@ -26,3 +26,29 @@ test-list:
buffer-type: ["DRAM", "L1"]
out-buffer-type: ["DRAM", "L1", "SYSTEM_MEMORY"]
output-file: permute_sweep.csv
- ttnn-permute:
shape:
start-shape: [1, 1, 2, 2]
end-shape: [6, 12, 256, 256]
interval: [1, 1, 1, 2]
num-dims: [1, 2, 3, 4]
num-shapes: 1
num-samples: 64
args-sampling-strategy: "all"
env:
# TT_PCI_DMA_BUF_SIZE: "1048576"
datagen:
function: gen_rand
args:
low: -100
high: 100
comparison:
function: comp_equal
args-gen: gen_permute_args
sanitize-args: False
args:
data-layout: ["ROW_MAJOR"]
data-type: ["BFLOAT16"]
buffer-type: ["DRAM"]
out-buffer-type: ["DRAM"]
output-file: permute_sweep.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test-list:
interval: [32, 32]
#num-dims: [2]
num-shapes: 3
num-samples: 64
num-samples: 128
args-sampling-strategy: "all"
method: ttnn-rmsnorm
env:
Expand Down
6 changes: 2 additions & 4 deletions tests/ttnn/python_api_testing/sweep_tests/ttnn_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,6 @@ def eltwise_sub(
x,
y,
*args,
scalar,
device,
dtype,
layout,
Expand All @@ -938,7 +937,7 @@ def eltwise_sub(
t0 = setup_ttnn_tensor(x, device, layout[0], input_mem_config[0], dtype[0])
t1 = setup_ttnn_tensor(y, device, layout[1], input_mem_config[1], dtype[1])

t2 = ttnn.sub(t0, t1, alpha=scalar, memory_config=memory_config_to_ttnn(output_mem_config))
t2 = ttnn.subtract(t0, t1, memory_config=memory_config_to_ttnn(output_mem_config))
return ttnn_tensor_to_torch(t2)


Expand Down Expand Up @@ -996,7 +995,6 @@ def mul(
x,
y,
*args,
scalar=0,
device,
dtype,
layout,
Expand All @@ -1007,7 +1005,7 @@ def mul(
t0 = setup_ttnn_tensor(x, device, layout[0], input_mem_config[0], dtype[0])
t1 = setup_ttnn_tensor(y, device, layout[1], input_mem_config[1], dtype[1])

t2 = ttnn.mul(t0, t1, memory_config=memory_config_to_ttnn(output_mem_config))
t2 = ttnn.multiply(t0, t1, memory_config=memory_config_to_ttnn(output_mem_config))
return ttnn_tensor_to_torch(t2)


Expand Down

0 comments on commit b3945f9

Please sign in to comment.