Barrier is a simple operation that takes no arguments and returns
nothing, but implies a side effect (synchronization of all threads)
Details
Diff Detail
Event Timeline
mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h | ||
---|---|---|
12 | In other places we use namespace omp, either way it probably makes sense to be consistent. |
mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h | ||
---|---|---|
1 | All of these files are missing top-level file comments. | |
6 | Why is this header necessary? | |
7 | Is OpImplementation.h necessary here? | |
26 | These should use // style comments. Please refer to other similar files for examples. | |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
24 | Need an extra space here. | |
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp | ||
4 | Only OpenMPDialect.h seems necessary here. | |
6 | Use using namespace ... instead, (with explicit scoping when necessary) See other files for examples. | |
9 | nit: Use getDialectNamespace instead of hardcoding the string. | |
19 | nit: openMPDialect? |
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp | ||
---|---|---|
19 | If we spell out OpenMP it should be OpenMP. |
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp | ||
---|---|---|
19 | MLIR uses camelCase variable names. |
mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h | ||
---|---|---|
7 | 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 | ||
19 | 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 | ||
---|---|---|
19 |
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.