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

Translate cpu.frequency hardware requirement #3296

Merged
merged 4 commits into from
Oct 25, 2024
Merged

Translate cpu.frequency hardware requirement #3296

merged 4 commits into from
Oct 25, 2024

Conversation

skycastlelily
Copy link
Collaborator

@skycastlelily skycastlelily commented Oct 17, 2024

Pull Request Checklist

  • implement the feature
  • write the documentation
  • extend the test coverage
  • update the specification
  • adjust plugin docstring
  • modify the json schema
  • mention the version
  • include a release note

@skycastlelily skycastlelily changed the title Cpu speed Translate cpu.speed hardware requirement Oct 17, 2024
@skycastlelily skycastlelily added the ci | full test Pull request is ready for the full test execution label Oct 17, 2024
@skycastlelily skycastlelily added this to the 1.38 milestone Oct 17, 2024
spec/hardware/cpu.fmf Outdated Show resolved Hide resolved
@skycastlelily
Copy link
Collaborator Author

skycastlelily commented Oct 17, 2024 via email

@martinhoyer
Copy link
Collaborator

martinhoyer commented Oct 17, 2024

How quickly a cpu can process data, measured in HZ,ah,I should put this information into spec?:)

I believe in this context, we are using MHz.
Also, I think it's best to do just Mhz to keep it simple? Or is there any use-case to do conversions et al, @happz ?

Oh and it might be better to use "frequency", instead of "speed".

@skycastlelily
Copy link
Collaborator Author

skycastlelily commented Oct 17, 2024 via email

@happz
Copy link
Collaborator

happz commented Oct 17, 2024

How quickly a cpu can process data, measured in HZ,ah,I should put this information into spec?:)

I believe in this context, we are using MHz. Also, I think it's best to do just Mhz to keep it simple? Or is there any use-case to do conversions et al, @happz ?

The good thing is, that we do not need to worry about conversions :) Thanks to Pint, 2.6 GHz or 2400 MHz should be easy to convert to the right unit when needed. Let the user input anything, make it clear the field expects hertz but GHz or kHz are perfectly fine, and convert it to whatever Beaker/AWS/Azure/GCP/whatever desires when constructing a recipe for that infrastructure (value.to('GHz').magnitude, for example).

It's like the memory key - user is not limited to one unit, as long as they stick to units describing a size of memory. And we say "Bytes are assumed when no unit is specified.". Let's do the same but with a unit one might use for CPU frequency, GHz, MHz, whatever we pick, as long as we let user know and use it accordingly in the code.

Oh and it might be better to use "frequency", instead of "speed".

+1 for frequency, it's also clearer to me what it means. "speed" is pretty ambiguous, although it's widely used.

@happz
Copy link
Collaborator

happz commented Oct 17, 2024

Yeah, Mhz, Ghz, TBO, I don't use it for my team's testing, I'm just trying to fill gaps. My goal is: when beaker users come , they find almost all they need are already implemented☺️ Or, you think I should set a default unit for it?:)

Yep, see how memory is done.

Btw, for cpu.speed ,float is better,though int will fit,I guess, most of users need, do you think I should add or extend NumberConstraint(Constraint[int]) to have float support?

Hm, probably a new class should be added, and maybe we should rename NumberConstraint to something like IntegerConstraint, and use NumberConstraint for this new class which would run with float values. We still need the int one because cpu.processors or whatever.vendor ID will never be a floating-point number.

@skycastlelily
Copy link
Collaborator Author

skycastlelily commented Oct 18, 2024 via email

docs/releases.rst Outdated Show resolved Hide resolved
docs/releases.rst Outdated Show resolved Hide resolved
tmt/hardware.py Outdated Show resolved Hide resolved
tmt/hardware.py Outdated Show resolved Hide resolved
tmt/hardware.py Show resolved Hide resolved
spec/hardware/cpu.fmf Outdated Show resolved Hide resolved
spec/hardware/cpu.fmf Outdated Show resolved Hide resolved
@skycastlelily skycastlelily changed the base branch from main to cpu-stepping October 18, 2024 14:58
@skycastlelily
Copy link
Collaborator Author

skycastlelily commented Oct 18, 2024 via email

@skycastlelily
Copy link
Collaborator Author

skycastlelily commented Oct 18, 2024 via email

@skycastlelily skycastlelily force-pushed the cpu-stepping branch 2 times, most recently from c6b6f81 to fd80b26 Compare October 22, 2024 07:03
@happz happz added the status | blocked The merging of PR is blocked on some other issue label Oct 22, 2024
@happz
Copy link
Collaborator

happz commented Oct 22, 2024

Blocked on #3295

tmt/hardware.py Outdated Show resolved Hide resolved
@happz happz removed the status | blocked The merging of PR is blocked on some other issue label Oct 24, 2024
@skycastlelily skycastlelily changed the title Translate cpu.speed hardware requirement Translate cpu.frequency hardware requirement Oct 24, 2024
@skycastlelily
Copy link
Collaborator Author

skycastlelily commented Oct 24, 2024 via email

@happz happz added the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Oct 24, 2024
@happz
Copy link
Collaborator

happz commented Oct 25, 2024

Unrelated Fedora 41 failures, merging.

@happz happz merged commit 5815197 into main Oct 25, 2024
21 of 22 checks passed
@happz happz deleted the cpu-speed branch October 25, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area | hardware Implementation of hardware requirements ci | full test Pull request is ready for the full test execution plugin | mrack The beaker provision plugin status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants