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

Phase 2 GTT Fix ptbits z0bits of GTT ObjectWords #44334

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

NJManganelli
Copy link
Contributor

PR description:

The methods ptBits() and z0Bits() of the TkJetWord.h and VertexWord.h classes attempt to return the bits for ap_(u)fixed datatypes, but the direct call to to_uint() truncated the float bits, leaving only the magnitude bits. These methods were not found to be in use anywhere in CMSSW, except now for adding GTT objects to L1Nano. This fix updates the methods, and they appropriately return all the magnitude + float bits, which enables full agreement in L1Nano for Vertices and TrackJets. scram build updateclassversion does not produce an updated class version/hash (nor direct usage of edmCheckClassVersion -g ...).

PR validation:

This PR passes
scram b
scram b code-checks
scram b code-format
scram b updateclassversion
Used to generate GTT objects in L1Nano format for ~3000 events

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

port of cms-l1t-offline#1217

…s, avoid truncating float bits from ap_(u)fixed
@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44334/39367

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2024

A new Pull Request was created by @NJManganelli for master.

It involves the following packages:

  • DataFormats/L1Trigger (l1)

@aloeliger, @epalencia, @cmsbuild can you please review it and eventually sign? Thanks.
@rovere, @eyigitba, @kreczko, @thomreis, @dinyar, @missirol this is something you requested to watch as well.
@rappoccio, @antoniovilela, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@epalencia
Copy link
Contributor

Please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2024

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5eb20a/37952/summary.html
COMMIT: 6d0e7a1
CMSSW: CMSSW_14_1_X_2024-03-06-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/44334/37952/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@aloeliger
Copy link
Contributor

@NJManganelli I'll sign this, but real quickly, For my edification what does the addition of range() do here? A quick peak at Xilinx documentation (https://docs.xilinx.com/r/en-US/ug1399-vitis-hls/Other-Class-Methods-Operators-and-Data-Members) would show that range selects a range of bits, usually indexed on arguments, but I'm willing to bet arguments default to maximum. So what exactly does this do?

@NJManganelli
Copy link
Contributor Author

Hi @aloeliger , right, so the range call selects all bits from the LSB to MSB. The problem with the old code was, the to_uint() call was effectively a type-aware cast of the ap_(u)fixed data, so it only grabbed the actual magnitude bits (So the top 6 of 15, for vertex z0, as an example). See the last column of the attached, one before and one after the fix, which shows the stored output from these calls on the rightmost column (the correct values are in the middle column, which select the appropriate subset of bits from the full Word in the left column; the 9 least significant bits for the float are truncated off, leaving the two-three highest bits only). See Range Select

image image

@aloeliger
Copy link
Contributor

+l1

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2024

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @rappoccio, @sextonkennedy, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@antoniovilela
Copy link
Contributor

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants