File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -387,21 +387,21 @@ def check_reduce_node(node: torch.fx.Node) -> bool:
387387 if memory_layout is not None :
388388 for dim in dim_list :
389389 # For WIDTH_PACKED layout, dimension 3 (W) is packed
390- if (
391- memory_layout == VkMemoryLayout .TENSOR_WIDTH_PACKED
392- and dim == 3
393- ):
394- return False
395390 # For HEIGHT_PACKED layout, dimension 2 (H) is packed
396- elif (
397- memory_layout == VkMemoryLayout .TENSOR_HEIGHT_PACKED
398- and dim == 2
399- ):
400- return False
401391 # For CHANNELS_PACKED layout, dimension 1 (C) is packed
402- elif (
403- memory_layout == VkMemoryLayout .TENSOR_CHANNELS_PACKED
404- and dim == 1
392+ if (
393+ (
394+ memory_layout == VkMemoryLayout .TENSOR_WIDTH_PACKED
395+ and dim == 3
396+ )
397+ or (
398+ memory_layout == VkMemoryLayout .TENSOR_HEIGHT_PACKED
399+ and dim == 2
400+ )
401+ or (
402+ memory_layout == VkMemoryLayout .TENSOR_CHANNELS_PACKED
403+ and dim == 1
404+ )
405405 ):
406406 return False
407407 except (AssertionError , KeyError , AttributeError ):
You can’t perform that action at this time.
0 commit comments