Page MenuHomePhabricator

[MLIR] Refactor handling of dialect libraries
ClosedPublic

Authored by stephenneuendorffer on Feb 26 2020, 5:01 PM.

Details

Summary

Instead of creating extra libraries we don't really need, collect a
list of all dialects and use that instead.

Diff Detail

Unit TestsFailed

TimeTest
1,120 msMLIR.mlir-cpu-runner::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/bin/mlir-opt /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/mlir/test/mlir-cpu-runner/bare_ptr_call_conv.mlir -convert-loop-to-std -convert-std-to-llvm='use-bare-ptr-memref-call-conv=1' | mlir-cpu-runner -shared-libs=/mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/lib/libmlir_runner_utils.so -entry-point-result=void | /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/bin/FileCheck /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/mlir/test/mlir-cpu-runner/bare_ptr_call_conv.mlir
1,050 msMLIR.mlir-cpu-runner::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/bin/mlir-opt /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/mlir/test/mlir-cpu-runner/unranked_memref.mlir -convert-linalg-to-loops -convert-linalg-to-llvm -convert-std-to-llvm | mlir-cpu-runner -e main -entry-point-result=void -shared-libs=/mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/lib/libmlir_runner_utils.so,/mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/lib/libcblas.so,/mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/lib/libcblas_interface.so | /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/bin/FileCheck /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/mlir/test/mlir-cpu-runner/unranked_memref.mlir
1,110 msMLIR.mlir-cpu-runner::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/bin/mlir-opt /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/mlir/test/mlir-cpu-runner/utils.mlir -convert-linalg-to-loops -convert-linalg-to-llvm -convert-std-to-llvm | mlir-cpu-runner -e print_0d -entry-point-result=void -shared-libs=/mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/lib/libmlir_runner_utils.so | /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/bin/FileCheck /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/mlir/test/mlir-cpu-runner/utils.mlir --check-prefix=PRINT-0D

Event Timeline

mehdi_amini added inline comments.Feb 27 2020, 8:23 PM
mlir/cmake/modules/AddMLIR.cmake
56

Did you need to separate the add_mlir_dialect from add_mlir_dialect_library because some of them don't use add_mlir_dialect / don't have an entry in the include directory? Otherwise why not setting the MLIR_DIALECT_LIBS property in the add_mlir_dialect function?

stephenneuendorffer marked an inline comment as done.Feb 27 2020, 8:47 PM
stephenneuendorffer added inline comments.
mlir/cmake/modules/AddMLIR.cmake
56

It does seem odd at first sight, but in the current scheme, there are multiple libraries for some dialects, so it's not a 1:1 relationship.. Even if there was a 1:1 relationship it seems odd to me that a declaration about a library shows up in the include directory. This way is consistent with the corresponding change for Conversions, and I think a similar scheme could be done for Transforms.

mehdi_amini accepted this revision.Feb 27 2020, 10:28 PM
This revision is now accepted and ready to land.Feb 27 2020, 10:28 PM
This revision was automatically updated to reflect the committed changes.