Page MenuHomePhabricator

jcownie (Jim Cownie)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 9 2014, 4:10 AM (266 w, 13 h)

Recent Activity

Mon, Jun 17

jcownie added inline comments to D63106: [OpenMP][libomptarget] Add support for declare target to clause under unified memory.
Mon, Jun 17, 1:36 AM · Restricted Project, Restricted Project

Dec 12 2018

jcownie added a comment to D55578: Add omp_get_device_num() and update several other device API functions (FIXED).

Since you're using it twice already, is it worth abstracting the "find the appropriate function using dlsym" logic into a function?
I imagine that there will be other user-interface functions which will also need this, so abstracting it sooner rather than later seems a good thing to do.

Dec 12 2018, 1:25 AM · Restricted Project

Dec 14 2017

jcownie added a comment to D41171: [OMPT] Handle null pointer in set_callback to improve performance.

Can't we shorten this?
I'd prefer

Dec 14 2017, 3:03 AM

Jul 7 2017

jcownie added a comment to D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.

In the proposed Windows code, I think it would be useful to stash the value in a static variable, so that we only make the system call once. While it's very unlikely that this is ever really going to be on a performance path, it's easy to do.
Something like

static inline int getpagesize(void) {
  static int cachedPageSize = 0;
  if (cachedPageSize == 0) {
      SYSTEM_INFO si;
      GetSystemInfo(&si);
      cachedPageSize =  si.dwPageSize;
  }
  return cachedPageSize;
}

Of course, you could also do this with a static constructor, but the order of static construction gets complicated, and this is guaranteed to be safe.

Jul 7 2017, 1:20 AM

Mar 23 2017

jcownie added a comment to D31071: GOMP compatibility: add missing OMP4.0 taskdeps handling code.

Thanks, LGTM.

Mar 23 2017, 8:19 AM
jcownie added a comment to D31071: GOMP compatibility: add missing OMP4.0 taskdeps handling code.

Setting all flags in both branches seemed to me as better expressing my intents, but I can change it if you insist.

I am not going to insist. I just find it odd to have a duplicate line of code, and the fact that it is the same in both if branches made me suspicious that there was bug lurking there. So, personally, I would find code like this clearer.

Mar 23 2017, 7:11 AM
jcownie added a comment to D31071: GOMP compatibility: add missing OMP4.0 taskdeps handling code.

Is "dep_list[i].flags.in = 1;" really supposed to be set in both of the if cases (lines 980 and 983)?
If so, can't we lift that out of the if?

Mar 23 2017, 6:23 AM

Jan 12 2017

jcownie added a comment to D28599: kmp_affinity: Fix check if specific bit is set.

Good point. My personal preference would be to use "== 0", rather than logical not, since I find that easier to read.
So

Jan 12 2017, 2:34 AM

Sep 13 2016

jcownie added a comment to D24486: [OpenMP] Stride in distribute parallel for loops with no chunk size.

Code looks fine to me, but it'd be really useful also to add a regression test...

Sep 13 2016, 3:03 AM

May 24 2016

jcownie added a comment to D19878: Use C++11 atomics for ticket locks implementation.

(as suggested by Jim)

May 24 2016, 5:41 AM

May 5 2016

jcownie added a comment to D19980: Fix team reuse with foreign threads..

LGTM, though the test code may need some reworking to handle Windows...

May 5 2016, 9:21 AM

May 4 2016

jcownie added a comment to D19879: Solve 'Too many args to microtask' problem.

On the microtask stuff: I have no objection to this, but I'm very surprised that it is needed, since I was under the impression that Clang/OpenMP only ever emits an outlined function for the parallel region that takes a single pointer argument, and then generates code that uses offsets from that to find all the actual arguments.

May 4 2016, 3:55 AM
jcownie added a comment to D19878: Use C++11 atomics for ticket locks implementation.

I have only made a top-level scan, so this needs more review. However,
__kmp_baker_check should look like this

May 4 2016, 2:51 AM

Mar 21 2016

jcownie accepted D18198: [STATS] separate noTotal bit flag from onlyInMaster and noUnits..

LGTM

Mar 21 2016, 10:18 AM

Mar 17 2016

jcownie added a comment to D18244: Expose the option to disable building with ITT.

Looks fine.

Mar 17 2016, 8:30 AM

Mar 15 2016

jcownie accepted D18153: [STATS] Add header information (e.g., machine name, time of run, etc.).

LGTM

Mar 15 2016, 2:15 AM

Mar 11 2016

jcownie accepted D17869: [STATS] Add a total statistics count which is an aggregation across all threads for each valid timers..

Looks good to me.

Mar 11 2016, 7:53 AM

Oct 22 2015

jcownie added a comment to D13072: [OpenMP] Enable ThreadSanitizer to check OpenMP programs.

Do you expect us to align the license to the licenses used by LLVM/OpenMP or
will someone from your team take care of this?

Oct 22 2015, 1:22 AM

Oct 19 2015

jcownie added a comment to D13827: Avoid bad conversion for __kmp_sys_max_nth.

If you choose this approach, 32Ki seems too small. A current maxed-out SGI is already at 256 sockets which could get you to 256*18*2 = 9216 threads, so over 1/4 of the way to your 32Ki.

Oct 19 2015, 1:28 AM

Oct 13 2015

jcownie added a comment to D13689: Add OMPT events for API locking.

I notice that there aren't any patches to kmp_gsupport.c. I looked in that file and didn't see any support for locking. What will happen when using gcc with this support? Will the instrumented locking routines be called to generate the promised callbacks?

Oct 13 2015, 6:56 AM

Sep 28 2015

jcownie added a comment to D13175: Added sockets to the syntax of KMP_PLACE_THREADS environment variable..

Can't we roll this up into something which is more table-driven (or loopy) ? (Something more like the code in the testbed runtime, which, admittedly, doesn't parse this yet, but clearly could quite easily.
Note that there's a loop here that extracts the sub-components of the string, then another loop to process them, rather than having five blocks of code, much of which is replicated.

Sep 28 2015, 2:40 AM

Sep 24 2015

jcownie added a comment to D13072: [OpenMP] Enable ThreadSanitizer to check OpenMP programs.

It generally looks fine to me.

Sep 24 2015, 4:52 AM

Sep 16 2015

jcownie accepted D12902: Force the readelf call to be in English.

LGTM (Ca me parait bon :-)

Sep 16 2015, 4:55 AM

Aug 26 2015

jcownie added a comment to D12331: Removing the Makefile+Perl build system.

The LLVM OpenMP landing page contains instructions on getting started that tell people to use the Makefile. Therefore that also needs to be updated to reflect this change.

Aug 26 2015, 2:25 AM

Aug 5 2015

jcownie retitled D11759: Tidy statistics collection from to Tidy statistics collection.
Aug 5 2015, 2:49 AM

Jul 21 2015

jcownie added a comment to D11301: Remove the __kmp_invoke_microtask() that relies on libffi.

As I understand it from Jim, icc does not even need this capability any more (acting more like Clang does now)

Jul 21 2015, 2:01 AM

Jul 9 2015

jcownie added a comment to D11062: Bug fixes in OMPT support.

It looks generally fine, but I am nervous about putting the ompt state placeholders in OpenMP's namespace (by giving them thename prefix "omp_" ). Is there a reason not to name them "ompt_", which would move them into our namespace?

Jul 9 2015, 7:47 AM

Jun 26 2015

jcownie added a comment to D10656: LLVM OpenMP CMake Overhaul.

Oh my, I didn't realize that the runtime actually compiled Fortran code.

Jun 26 2015, 1:47 AM

Apr 9 2015

jcownie added a comment to D8916: kmp_lock: Change return type of release functions from void to int.

I think it would be cleaner if you defined the new constants as KMP_LOCK_RELEASED and KMP_LOCK_STILL_HELD, then the non-nested lock implementations can sensibly return KMP_LOCK_RELEASED, which would be preferable to the explicit "0" they return at the moment.

Apr 9 2015, 6:46 AM

Nov 25 2014

jcownie added a comment to D6292: [OPENMP] Codegen for "omp flush" directive..

From a runtime point of view we need to preserve backwards binary compatibility, so we can't change the interface to the current interface function to introduce a count (because that old code won't set it).

Nov 25 2014, 5:16 AM

Jun 9 2014

jcownie added a comment to D4067: Using of variable length arrays in captured statements and OpenMP constructs.

Man, I must be in a fuddle this morning. I blame it being Monday.
My logic is utterly wrong :-(

Jun 9 2014, 4:27 AM
jcownie added a comment to D4067: Using of variable length arrays in captured statements and OpenMP constructs.

Ah, sorry, I should keep my nose out of stuff that I don't understand.

Jun 9 2014, 4:22 AM
jcownie added a comment to D4067: Using of variable length arrays in captured statements and OpenMP constructs.

This looks very dubious
lib/CodeGen/CGStmt.cpp : 2076

assert(CD->hasBody() && "missing CapturedDecl body");
Jun 9 2014, 4:13 AM