Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Implement a sparse_tensor.convert stress test using Python DSL #51377

Open Quuxplusone opened 2 years ago

Quuxplusone commented 2 years ago
Bugzilla Link PR52410
Status NEW
Importance P enhancement
Reported by Aart Bik (ajcbik@google.com)
Reported on 2021-11-04 15:09:17 -0700
Last modified on 2021-11-17 16:12:02 -0800
Version unspecified
Hardware PC Linux
CC joker.eph@gmail.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Following the Python DSL driven way in the SpMM test
(google3/third_party/llvm/llvm-
project/mlir/test/python/dialects/sparse_tensor/test_SpMM.py), implement a
stress test for the sparse tensor conversion operation that operates on

(1) high dimensional tensors, e.g. tensor<2x3x4x5x6x7x8xf64>
(2) round trips through all conversions

  %1 = sparse_tensor.convert %0 : format0 to format1
  %2 = sparse_tensor.convert %1 : format1 to format2

(3) makes sure the end result round trips to exactly the original

Here, python is a great way to generate the code automatically (since the
potentially different formats for high dimensions grows very rapidly), making
it very hard to write such tests by hand!
Quuxplusone commented 2 years ago

https://reviews.llvm.org/D114118