Commit 1fa8c82
committed
test: consolidate C++ runtime tests, add model-level coverage
Address PR review comments that asked the new C++ runtime tests be
folded into existing feature-level files rather than shipped as
parallel `*_cpp.py` files.
What
- Merge `test_000_runtime_cache_cpp.py` into the existing
`test_000_runtime_cache.py`. The file already covered the Python
runtime path; two new classes (`TestRuntimeCacheCppPersistence`,
`TestCppSerializationIndices`) cover the C++ runtime path via
`use_python_runtime=False`, and the serialization-index
assertions. Skip on non-RTX builds.
- Fold the C++ runtime cases for dynamic shapes kernel
specialization strategy into `test_001_dynamic_shapes_kernel_
strategy.py` (introduced upstream in PR pytorch#4184). Two new classes
(`TestDynamicShapesKernelStrategyCpp`, `TestDynamicShapesKernel
StrategyCppInvalidValue`) exercise lazy/eager/none end-to-end and
reject invalid strategy names. The pre-existing Python runtime
tests remain untouched.
- Rename `test_000_cuda_graph_strategy.py` to `test_001_cuda_graph_
strategy.py` to match the `test_001_*` convention used for L1
RTX-only features. When upstream lands the Python runtime
counterpart (PR pytorch#4187), both sets fold into the same file.
- Add model-level tests: `test_runtime_cache_models.py` gains a
`TestRuntimeCacheCppModels` class exercising ResNet18 through the
C++ runtime with warm-cache roundtrip. `test_dynamic_shapes_
kernel_strategy_models.py` gains `TestDynamicShapesKernelStrategy
CppModels` covering lazy/eager/none on ResNet18 via the C++
runtime.
Verified
- 35 passed / 3 skipped in the runtime/ tests (merged file plus
test_001 strategy files).
- No regression in test_002_cudagraphs_cpp.py (8 passed) or
test_005_dynamic_allocation.py (1 passed).
Addresses PR pytorch#4202 review comments asking for test file merges and
the addition of model-level runtime_cache_models.py /
dynamic_shapes_kernel_strategy_models.py coverage.1 parent 54f9ccd commit 1fa8c82
6 files changed
Lines changed: 390 additions & 279 deletions
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
132 | 196 | | |
133 | 197 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
328 | 419 | | |
329 | 420 | | |
Lines changed: 0 additions & 133 deletions
This file was deleted.
0 commit comments