The intent of OpenMP version attribute is to be applied to a module and then hold information on OpenMP version flag.
Information about OpenMP version can be specified in Clang by flag -fopenmp-version and it is stored in LLVM-IR module metadata:
!llvm.module.flags = !{!0, !1} !0 = !{i32 7, !"openmp", i32 51} !1 = !{i32 7, !"openmp-device", i32 51}
OpenMP MLIR version attributes will allow to lower Flang frontend flag to OpenMP MLIR code and then to LLVM IR.
There are two OpenMP MLIR version attributes. The first one "omp.version" MLIR attribute corresponds to host OpenMP version. The second one corresponds to "openmp-device" LLVM-IR metadata. "openmp-device" LLVM-IR metadata is attached only for offloaded code.