tensorflow / mlir

"Multi-Level Intermediate Representation" Compiler Infrastructure
1.73k stars 257 forks source link

Unify vector op names with other dialects. #257

Closed jmgorius closed 4 years ago

jmgorius commented 4 years ago

Change vector op names from VectorFooOp to Vector_FooOp and from vector::VectorFooOp to vector::FooOp.

jmgorius commented 4 years ago

I just followed what was done in commit 1e9bdfc for the GPU dialect. It might be a better fit since it avoids the redundant dialect name in the operation.

nicolasvasilache commented 4 years ago

Please rebase on 3f37f5278b304fdf79b9f56d625b39e9c9d21b96 and I'll start the integration process.

jmgorius commented 4 years ago

I just rebased on the latest commit on master c203743.

nicolasvasilache commented 4 years ago

can you please rebase and make sure to run clang-format? The following 3 files are flagged:

include/mlir/EDSC/Intrinsics.h
lib/Conversion/VectorConversions/VectorToVector.cpp
lib/Transforms/MaterializeVectors.cpp
jmgorius commented 4 years ago

I just rebased and ran clang-format, but it does not find anything to format. Could this be a version mismatch? I'm using

clang-format version 9.0.0 (tags/RELEASE_900/final)

Edit: I just tried with a more recent build:

clang-format version 10.0.0 (.../llvm-project.git 020de4a80125ac731d2cc3c4f0b65cc5b548971a)

and it can't find anything do to either. If I run

clang-format mlir/EDSC/Intrinsics.h > tmp.h
diff mlir/EDSC/Intrinsics.h tmp.h

I get an empty diff.

ftynse commented 4 years ago

I ran clang-format -i -style=file on your changes, there was a bunch of those. On the general basis, we are using clang-format compiled from LLVM's HEAD.

jmgorius commented 4 years ago

@nicolasvasilache Interestingly enough, I cannot manage to get any format changes from the files you pointed out to me.

@ftynse However, if I run

find . -name "*.cpp" | xargs clang-format -i -style=file
find . -name "*.h" | xargs clang-format -i -style=file

in the root of the repository, it changes a lot of files, most of which I did not even touch. A quick git diff shows that these changes are mostly related to the AlwaysBreakTemplateDeclarations: Yes in the .clang-format file. Are we using the same .clang-format?