tqchen opened a new pull request, #19875: URL: https://github.com/apache/tvm/pull/19875
This PR removes the old runtime `DataType` wrapper as the compiler-facing dtype abstraction and routes dtype usage by boundary: - compiler/type constructs use `PrimType` for expression and tensor element type reasoning - runtime, ABI, and dtype-valued attrs use raw `DLDataType` - `PrimType` stays minimal but useful: documented factories/matchers, value equality/hash, final/non-null type, and cached common constructors - TIRX, TE, TOPI, Relax, codegen, Python bindings, and tests are updated to follow the boundary The branch is intentionally stacked on #19874 (`2bdedc93aa`) so CI has the needed base fix. Validation: - `pre-commit run --files $(cat /tmp/tvm_task199_final_changed_files.txt)` passed over 420 changed files - `git diff --check` passed - final grep found no `PrimType::IsPredicate`, `.IsBool(`, `.IsInt(`, `.IsUInt(`, removed `type.cc` helper names, or `runtime/data_type.h` references in checked paths - LLVM-enabled `ninja -C build -j$(nproc)` completed and linked `lib/libtvm_compiler.so` - focused Python pytest passed: `77 passed, 4 skipped, 1 warning` over TIRX ops/intrinsics, Relax qdq/manipulate legalizers, and contrib sort - direct TOPI smoke passed for touched math/scatter paths - reduced benchmark matrix was rerun from the final branch state; results are recorded in the task report Benchmark summary (ns/op, old DataType -> current PrimType): - IntImm int32 immediate: 9.78 -> 13.06 - IntImm int64 immediate: 10.10 -> 12.97 - a+b int32 immediate: 23.35 -> 42.90 - a+b float32 immediate: 23.22 -> 41.54 - canonical split-fuse simplify: 3892.61 -> 4608.44 - rewrite split-fuse simplify: 22536.85 -> 29550.93 - rewrite bool-vector simplify: 1090.19 -> 1453.94 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
