Use 64 bit integers for RoctracerLogger::maxBufferSize_ instead of 32 bit#1156
Use 64 bit integers for RoctracerLogger::maxBufferSize_ instead of 32 bit#1156RElbers wants to merge 1 commit intopytorch:mainfrom
Conversation
|
Hi @RElbers! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
The Roctracer has a limit on the max number of GPU events before it stops tracing. This limit was stored in a uint32_t variable maxBufferSize_. This limit can be changed using ROCTRACER_MAX_EVENTS, which is parsed as a signed int32_t. This means that there is still a hard limit on the number of GPU events at just over 2.1 billion (2^31 − 1). This may sound like an unreasonable number of events in a single trace, but I think users should at least be given the option to do so. And right now, it's impossible given the 32bit types.
This pull requests changes the relevant types to 64 bit integers. For extra context, the maxBufferSize_ is being compared to a size_t and logged here.