Page MenuHomePhabricator

[mlir] Extend standalone example by standalone-translate

Authored by marbre on May 28 2020, 9:48 AM.



Extend the standalone by standalone-translate, based on mlir-translate.

Diff Detail

Event Timeline

marbre created this revision.May 28 2020, 9:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 28 2020, 9:48 AM
Kayjukh added inline comments.May 28 2020, 10:00 AM

This should probably be replaced by add_llvm_executable.

marbre added a comment.EditedMay 28 2020, 10:27 AM

Needs a test?

There is no test for iree-translate and we don't have an additional translation registered in the standalone dialect. Anyway, I could go for a test similar to, for example:

// RUN: standalone-translate --help | FileCheck %s
// CHECK: --avx512-mlir-to-llvmir
// CHECK: --deserialize-spirv
// CHECK: --import-llvm
// CHECK: --mlir-to-llvmir
// CHECK: --mlir-to-nvvmir
// CHECK: --mlir-to-rocdlir
// CHECK: --serialize-spirv

Would that be suitable?

marbre updated this revision to Diff 266946.May 28 2020, 10:53 AM

Replace add_llvm_tool by add_llvm_executable

marbre marked an inline comment as done.May 28 2020, 10:54 AM

Would that be suitable?

Yes, something like that is probably good enough for a smoke test.

This revision is now accepted and ready to land.May 28 2020, 11:53 AM
Kayjukh accepted this revision.EditedMay 28 2020, 12:17 PM

LGTM too, after adding the test case. Thanks!

marbre updated this revision to Diff 266990.May 28 2020, 12:34 PM

Add standalone-translate test, rename test from check-standalone-opt to check-standalone

This revision was automatically updated to reflect the committed changes.