[Openmp-commits] [PATCH] D75581: [libomptarget][amdgcn] Implement get_wtime
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Mar 3 20:10:02 PST 2020
JonChesterfield marked an inline comment as done.
JonChesterfield added inline comments.
Comment at: openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip:50
+ return ((double)1.0 / 745000000.0) * t;
> grokos wrote:
> > JonChesterfield wrote:
> > > I don't have a source for the magic number. It's from before my time. I can offer that rough checks from running applications look ok, and that it has been shipping as part of aomp for ages without user complaints.
> > At least can you add a comment about what this magic number is (obviously the clock speed in Hz, but it would be nice to have some sort of documentation)? Or (even better) use a macro because this frequency may change in future chips?
> The isa docs offer that the clock operates as if at a fixed frequency. It seems plausible that the various amdgcn chips would all have a timer running at the same rate, but I'd also be happier with a reference on that.
> I'll ask around. It would be useful to know whether the scaling factor should be different for different chips.
Yes. Though I will first ask around internally to try to find out what the 745MHz was based on, and whether it's chip dependent.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the Openmp-commits