Skip to content

Commit 48fdf84

Browse files
committed
Fix memory allocation assertion in NPU40XX tests
1 parent 38a8e24 commit 48fdf84

File tree

3 files changed

+12
-28
lines changed

3 files changed

+12
-28
lines changed

tests/lit/NPU/dialect/VPUIP/pipelines/default_hw_mode_40XX.mlir

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@
2222
module @SoftMax attributes {config.arch = #config.arch_kind<NPU40XX>, config.compilationMode = #config.compilation_mode<DefaultHW>} {
2323
config.Resources {activity_factor = 0.078934384661980161 : f64} 6 of @NCE at 1.700000e+03 MHz {
2424
builtin.module @ReservedMemory {
25-
module @DummySWKernelsForInstructionPrefetchReservedMemory {
26-
config.MemoryResource 8 bytes of @CMX_NN offset 1474552
27-
}
25+
module @DummySWKernelsForInstructionPrefetchReservedMemory {
26+
config.MemoryResource 8 bytes of @CMX_NN offset 1473528
27+
}
2828
}
29-
config.MemoryResource 1326182 bytes of @CMX_NN_FragmentationAware
30-
config.MemoryResource 1473536 bytes of @CMX_NN {config.bandwidth = 64 : i64, config.derateFactor = 1.000000e+00 : f64}
31-
config.ExecutorResource 2 of @SHAVE_ACT
32-
config.ExecutorResource 1 of @DPU
3329
}
3430

3531
VPURT.SW.Runtime entryPoint : @VPU.SW::@runtime stack_configuration : [4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096]
@@ -180,14 +176,10 @@ module @SoftMax attributes {config.arch = #config.arch_kind<NPU40XX>, config.com
180176
module @TwoFunctions attributes {config.arch = #config.arch_kind<NPU40XX>, config.compilationMode = #config.compilation_mode<DefaultHW>} {
181177
config.Resources {activity_factor = 0.078934384661980161 : f64} 6 of @NCE at 1.700000e+03 MHz {
182178
builtin.module @ReservedMemory {
183-
module @DummySWKernelsForInstructionPrefetchReservedMemory {
184-
config.MemoryResource 8 bytes of @CMX_NN offset 1474552
185-
}
179+
module @DummySWKernelsForInstructionPrefetchReservedMemory {
180+
config.MemoryResource 8 bytes of @CMX_NN offset 1473528
181+
}
186182
}
187-
config.MemoryResource 1326182 bytes of @CMX_NN_FragmentationAware
188-
config.MemoryResource 1473536 bytes of @CMX_NN {config.bandwidth = 64 : i64, config.derateFactor = 1.000000e+00 : f64}
189-
config.ExecutorResource 2 of @SHAVE_ACT
190-
config.ExecutorResource 1 of @DPU
191183
}
192184

193185
// CHECK-DAG: {{ }}config.Resources

tests/lit/NPU/dialect/VPUIP/pipelines/default_hw_mode_schedule_trace_enabled_40XX.mlir

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@
1111
module @Gather attributes {config.arch = #config.arch_kind<NPU40XX>, config.compilationMode = #config.compilation_mode<DefaultHW>} {
1212
config.Resources {activity_factor = 0.078934384661980161 : f64} 2 of @NCE at 1.700000e+03 MHz {
1313
builtin.module @ReservedMemory {
14-
module @DummySWKernelsForInstructionPrefetchReservedMemory {
15-
config.MemoryResource 8 bytes of @CMX_NN offset 1474552
14+
module @DummySWKernelsForInstructionPrefetchReservedMemory {
15+
config.MemoryResource 8 bytes of @CMX_NN offset 1473528
16+
}
1617
}
17-
}
18-
config.MemoryResource 1326182 bytes of @CMX_NN_FragmentationAware
19-
config.MemoryResource 1473536 bytes of @CMX_NN {config.bandwidth = 64 : i64, config.derateFactor = 1.000000e+00 : f64}
20-
config.ExecutorResource 2 of @SHAVE_ACT
21-
config.ExecutorResource 1 of @DPU
2218
}
2319

2420
VPURT.SW.Runtime

tests/lit/NPU/dialect/VPUIP/pipelines/default_hw_mode_vertical_fusion_outlining_40XX+.mlir

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,10 @@ module @VerticalFusionOutlining attributes {config.compilationMode = #config.com
1616

1717
config.Resources {activity_factor = 0.078934384661980161 : f64} 2 of @NCE at 1.700000e+03 MHz {
1818
builtin.module @ReservedMemory {
19-
module @DummySWKernelsForInstructionPrefetchReservedMemory {
20-
config.MemoryResource 8 bytes of @CMX_NN offset 1474552
19+
module @DummySWKernelsForInstructionPrefetchReservedMemory {
20+
config.MemoryResource 8 bytes of @CMX_NN offset 1473528
21+
}
2122
}
22-
}
23-
config.MemoryResource 1326182 bytes of @CMX_NN_FragmentationAware
24-
config.MemoryResource 1473536 bytes of @CMX_NN {config.bandwidth = 64 : i64, config.derateFactor = 1.000000e+00 : f64}
25-
config.ExecutorResource 2 of @SHAVE_ACT
26-
config.ExecutorResource 1 of @DPU
2723
}
2824
net.NetworkInfo entryPoint : @main inputsInfo : {
2925
DataInfo "input" : tensor<1x16x128x128xf16, {order = #NHWC}>

0 commit comments

Comments
 (0)