Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kokkos version major/version minor (Feature request) #1930

Closed
jjwilke opened this issue Dec 5, 2018 · 13 comments
Closed

Kokkos version major/version minor (Feature request) #1930

jjwilke opened this issue Dec 5, 2018 · 13 comments
Assignees
Labels
Feature Request Create new capability; will potentially require voting

Comments

@jjwilke
Copy link

jjwilke commented Dec 5, 2018

Related to #1031.

Kokkos should define a major and minor version in the CMake. This would at least allow us to do cmake compatibility checks if someone is using the "preferred" method of CMake packages - since they could request a particular major version.

I'm not sure if there is a versioning model for Kokkos? I would recommend all minor versions be required be API-preserving. Major versions not required to be API conforming.

In reference to #1031 - CMake package magic would ensure headers and libraries are the same version and the version you requested in your CMake.

@ndellingwood
Copy link
Contributor

@jjwilke git tag -l provides the version for kokkos. The major version has corresponded to copyright asserts; the minor version has corresponded to substantial changes, and the sub-minor version (not sure what to call it) corresponds to when a promotion occurs tracking the number of weeks since the previous minor update.
These are also tracked in the master_history.txt file, here's a bit of a description in the kokkos-promotion document, hopefully it's helpful.

@crtrott
Copy link
Member

crtrott commented Dec 6, 2018

API breakage is mainly limited to major versions. Thats what delayed the 3.0 release, because we didn't finish deprecated everything we want to deprecate until the last version.

@jjwilke
Copy link
Author

jjwilke commented Dec 6, 2018

Added versions matching the git tag -l output. I set CMake compatibility to SAME_MAJOR_VERSION - which assumes that any two kokkos major versions are API-compatible. The other common option is ANY_GREATER_VERSION, but it sounds like this would be incorrect.

@crtrott
Copy link
Member

crtrott commented Dec 6, 2018

Minor versions are backward compatible but not forward. And only from the user perspective. We do not guarantee ABI compatibility in any way shape or form at this point.

@jjwilke
Copy link
Author

jjwilke commented Dec 6, 2018

Okay. That is exactly the behavior of cmake SAME_MAJOR_VERSION. Minor versions are assumed to be backwards but not forward compatible.

@mhoemmen
Copy link
Contributor

mhoemmen commented Dec 7, 2018

The main value of the minor version number is for apps that don't update their Kokkos continuously and may need to support multiple versions in order to get integrations right. For example, the change from dimension to extent was still within the same major release.

@jjwilke
Copy link
Author

jjwilke commented Dec 7, 2018

Was that done in a non-backward compatible way? My understanding of "best practice" would be to avoid breaking backwards compatibility on minor version numbers (which is potentially why Cmake makes this the easiest versioning model to support).

This would only be relevant going forward as the new CMake is in a feature branch at this point. Probably worth discussing whether we want to follow this model in the future.

@ndellingwood
Copy link
Contributor

@jjwilke dimension_* is usable and still exists when KOKKOS_ENABLE_DEPRECATED_CODE=ON for backward compatibility, which is the current default. The macro will be turned OFF during the next update, in which case use of the dimension_* methods will result in a compiler error (unless users explicitly set KOKKOS_ENABLE_DEPRECATED_CODE=ON).

@crtrott just to confirm, the next release when we flip the switch to OFF with deprecated code is to be considered a minor release, with the next major release to coincide with the copyright update?

@jjwilke
Copy link
Author

jjwilke commented Dec 7, 2018

I believe I can put in logic to activate KOKKOS_ENABLE_DEPRECATED_CODE when an older minor version is requested, which should then be enough to guarantee minor version backwards compatibility?

@ndellingwood
Copy link
Contributor

@jjwilke I think that would work, thanks!

jjwilke pushed a commit to jjwilke/kokkos that referenced this issue Dec 7, 2018
@jjwilke
Copy link
Author

jjwilke commented Dec 7, 2018

Basic logic is implemented here

As needed, we should be able to modify for changing backwards compatibility conditions

@ndellingwood ndellingwood added the Feature Request Create new capability; will potentially require voting label Feb 1, 2019
@ndellingwood ndellingwood added this to the 2019 April milestone Feb 7, 2019
@crtrott crtrott removed this from the 2019 April milestone Aug 21, 2019
crtrott added a commit that referenced this issue Aug 27, 2019
@jjwilke jjwilke added this to the 3.0 Release milestone Sep 4, 2019
@dalg24
Copy link
Member

dalg24 commented Oct 7, 2019

@jjwilke Did you work on this?

@jjwilke
Copy link
Author

jjwilke commented Oct 7, 2019

We export version numbers that allow people to request specific versions. There was some discussion of deprecated code previously. I would say let's just declare major version compatibility only. We don't really have backwards compatibility. You'd have to set the deprecated code option when installing Kokkos.

We can revisit this for 4.0. In a manner of speaking, 3.0 is "1.0" for the build system. If we decide that someone requesting 3.1 should be able to use 4.0, I can change SAME_MAJOR_VERSION logic without issue.

TL;DR Yes, this is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Create new capability; will potentially require voting
Projects
None yet
Development

No branches or pull requests

6 participants