Barrier is a simple operation that takes no arguments and returns
nothing, but implies a side effect (synchronization of all threads)
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 43510 Build 44399: arc lint + arc unit
Event Timeline
mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h | ||
---|---|---|
11 | In other places we use namespace omp, either way it probably makes sense to be consistent. |
mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h | ||
---|---|---|
2 | All of these files are missing top-level file comments. | |
7 | Why is this header necessary? | |
8 | Is OpImplementation.h necessary here? | |
27 | These should use // style comments. Please refer to other similar files for examples. | |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
25 | Need an extra space here. | |
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp | ||
5 | Only OpenMPDialect.h seems necessary here. | |
7 | Use using namespace ... instead, (with explicit scoping when necessary) See other files for examples. | |
10 | nit: Use getDialectNamespace instead of hardcoding the string. | |
20 | nit: openMPDialect? |
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp | ||
---|---|---|
20 | If we spell out OpenMP it should be OpenMP. |
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp | ||
---|---|---|
20 | MLIR uses camelCase variable names. |
mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h | ||
---|---|---|
8 | I moved this include to the .cpp file. If I don't have it at all I get linker errors related to some missing function definitions. | |
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp | ||
20 | I've changed this to ompDialect to be consistent with the namespace name change. Let me know if there's a preferred name for this though. |
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp | ||
---|---|---|
20 |
While that is interesting on its own, my comment was not targeted at variable naming conventions but rather towards how we commonly, and even in MLIR, treat "names". "OpenMP" is (used as) a proper name, doing anything to it seems problematic, e.g., we cannot properly search for it. We also have ample of precedence, e.g. GPU, LLVM, SPIRV, .... at least I haven't seen gPU, lLVM, or sPIRV.
That sounds fine to me. |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
10 | Missing period at the end. |
I don't remember that we ever fully resolved this(adding OpenMP Dialect). Can you make a ping on llvm.discourse.group to make sure?
mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h | ||
---|---|---|
4 | MLIR -> LLVM now | |
10 | nit: Missing punctuation at the end of the line. | |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
4 | Same here. |
The original RFC was sent to mlir google groups in December. (https://groups.google.com/a/tensorflow.org/d/msg/mlir/SCerbBpoxng/bVqWTRY7BAAJ)
I have now posted this RFC in discourse.
https://llvm.discourse.group/t/rfc-openmp-dialect-in-mlir/397
Approval modulo no strong comments on discourse and after fixing the last few remaining nits.
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp | ||
---|---|---|
4 | Same here. |
I've committed and pushed this after fixing the nits, please revert if I misunderstood or if the discourse discussion decides this doesn't want to be here.
Thanks!
All of these files are missing top-level file comments.