diff --git a/models/experimental/functional_unet/tests/test_unet_trace.py b/models/experimental/functional_unet/tests/test_unet_trace.py index 96f52717626..a468b956c8a 100644 --- a/models/experimental/functional_unet/tests/test_unet_trace.py +++ b/models/experimental/functional_unet/tests/test_unet_trace.py @@ -27,7 +27,7 @@ @skip_for_grayskull("UNet not currently supported on GS") @pytest.mark.models_performance_bare_metal -@pytest.mark.parametrize("device_params", [{"l1_small_size": 68864, "trace_region_size": 423936}], indirect=True) +@pytest.mark.parametrize("device_params", [{"l1_small_size": 68864, "trace_region_size": 444416}], indirect=True) @pytest.mark.parametrize( "batch, groups, iterations", ((2, 1, 16),), @@ -83,7 +83,7 @@ def test_unet_trace( @skip_for_grayskull("UNet not currently supported on GS") @pytest.mark.models_performance_bare_metal @pytest.mark.parametrize( - "device_params", [{"l1_small_size": 68864, "trace_region_size": 423936, "num_command_queues": 2}], indirect=True + "device_params", [{"l1_small_size": 68864, "trace_region_size": 442368, "num_command_queues": 2}], indirect=True ) @pytest.mark.parametrize( "batch, groups, iterations", @@ -202,7 +202,7 @@ def buffer_address(tensor): @pytest.mark.models_performance_bare_metal @pytest.mark.parametrize("enable_async_mode", (True,), indirect=True) @pytest.mark.parametrize( - "device_params", [{"l1_small_size": 68864, "trace_region_size": 423936, "num_command_queues": 2}], indirect=True + "device_params", [{"l1_small_size": 68864, "trace_region_size": 442368, "num_command_queues": 2}], indirect=True ) @pytest.mark.parametrize( "batch, groups, iterations", diff --git a/ttnn/cpp/ttnn/operations/pool/upsample/upsample.cpp b/ttnn/cpp/ttnn/operations/pool/upsample/upsample.cpp index 4fad1223ddb..88815011efc 100644 --- a/ttnn/cpp/ttnn/operations/pool/upsample/upsample.cpp +++ b/ttnn/cpp/ttnn/operations/pool/upsample/upsample.cpp @@ -11,15 +11,13 @@ namespace ttnn::operations::upsample { ttnn::Tensor ExecuteUpSample::invoke(const ttnn::Tensor& input_tensor, std::variant scale_factor, - std::string mode, - std::optional output_mem_config, - std::optional compute_kernel_config) { + const std::string &mode, + const std::optional& output_mem_config, + const std::optional& compute_kernel_config) { MemoryConfig mem_config = output_mem_config.value_or(input_tensor.memory_config()); ttnn::DeviceComputeKernelConfig config = compute_kernel_config.value_or( ttnn::init_device_compute_kernel_config(input_tensor.device()->arch(), std::nullopt, MathFidelity::HiFi4)); - if(mode.empty()) { - mode = "nearest"; - } + int scale_h = 1; int scale_w = 1; std::visit( diff --git a/ttnn/cpp/ttnn/operations/pool/upsample/upsample.hpp b/ttnn/cpp/ttnn/operations/pool/upsample/upsample.hpp index 376a0b20312..91486c80124 100644 --- a/ttnn/cpp/ttnn/operations/pool/upsample/upsample.hpp +++ b/ttnn/cpp/ttnn/operations/pool/upsample/upsample.hpp @@ -16,9 +16,9 @@ struct ExecuteUpSample { static ttnn::Tensor invoke( const ttnn::Tensor& input_tensor, std::variant scale_factor, - std::string mode="nearest", - std::optional output_mem_config = std::nullopt, - std::optional compute_kernel_config = std::nullopt); + const std::string& mode=std::string("nearest"), + const std::optional& output_mem_config = std::nullopt, + const std::optional& compute_kernel_config = std::nullopt); }; } // upsample } // operations