[Openmp-commits] [PATCH] D75581: [libomptarget][amdgcn] Implement get_wtime

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 26 17:57:50 PDT 2020

jdoerfert added inline comments.

Comment at: openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip:50
+  return ((double)1.0 / 745000000.0) * t;
JonChesterfield wrote:
> JonChesterfield wrote:
> > 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.
My money is on: NVIDIA Tesla K40 Graphic Card - 1 GPUs - 745 MHz Core 

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list