parallel-runtimes / lomp

Little OpenMP Library
Apache License 2.0
153 stars 17 forks source link

Implement readCycleCount() also for RISC-V target #56

Closed mjklemm closed 2 years ago

mjklemm commented 2 years ago

Yes, we do have some duplication of code there. Partly because readCycleCount() and readHWTick...() use the same compilation guard. That needs to be cleaned up. It may mean though that the microbenchmarks would be more closely tied to the runtime sources. If we do not want that, we should at least make sure that the code for the microbenchmark does not appear in the runtime code if it's not needed there. I have refactoring branch that I use for other refactoring that I'm working on. I'll see what I can do about that.

JimCownie commented 2 years ago

Thanks.

I think there is a hierarchy of dependency there that shouldn’t be a problem. a microBM including the target headers shouldn't pull in much of the runtime if we have the hierarchy right. Just as using timers and stats doesn’t. Even the barrier microBM manages to use the barrier code without the rest of the runtime. (Though taht may get harder if we manage to integrate the task execution better with the barriers…)

On 15 Mar 2022, at 10:54, Michael Klemm @.***> wrote:

Yes, we do have some duplication of code there. Partly because readCycleCount() and readHWTick...() use the same compilation guard. That needs to be cleaned up. It may mean though that the microbenchmarks would be more closely tied to the runtime sources. If we do not want that, we should at least make sure that the code for the microbenchmark does not appear in the runtime code if it's not needed there. I have refactoring branch that I use for other refactoring that I'm working on. I'll see what I can do about that.

— Reply to this email directly, view it on GitHub https://github.com/parallel-runtimes/lomp/pull/56#issuecomment-1067841951, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY7TVF4VUGR23C4VNE5EJ3VABT5FANCNFSM5QYDBQQA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because your review was requested.

-- Jim James Cownie @.***> Mob: +44 780 637 7146