Page MenuHomePhabricator

JonChesterfield (Jon Chesterfield)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 11 2015, 1:08 PM (242 w, 3 h)

Recent Activity

Today

JonChesterfield committed rG09834f976125: [libomptarget][nfc] Move non-freestanding headers out of common (authored by JonChesterfield).
[libomptarget][nfc] Move non-freestanding headers out of common
Tue, Mar 31, 4:00 PM
JonChesterfield closed D77071: [libomptarget][nfc] Move non-freestanding headers out of common.
Tue, Mar 31, 4:00 PM · Restricted Project
JonChesterfield accepted D77113: [OpenMP][NFC] Move and simplify directive -> allowed clause mapping.

LGTM too. Non functional change, clearer code. Thanks

Tue, Mar 31, 3:27 PM · Restricted Project

Yesterday

JonChesterfield added a comment to D75917: Expose llvm fence instruction as clang intrinsic.

Can this be revived? Changing the enum to a string still sounds good to me

Mon, Mar 30, 6:02 PM · Restricted Project
JonChesterfield added inline comments to D77071: [libomptarget][nfc] Move non-freestanding headers out of common.
Mon, Mar 30, 6:02 PM · Restricted Project
JonChesterfield added inline comments to D77071: [libomptarget][nfc] Move non-freestanding headers out of common.
Mon, Mar 30, 9:43 AM · Restricted Project
JonChesterfield created D77071: [libomptarget][nfc] Move non-freestanding headers out of common.
Mon, Mar 30, 9:43 AM · Restricted Project

Thu, Mar 26

JonChesterfield committed rG856c99543693: [libomptarget] Add missing elf_end call in elf_common.c (authored by JonChesterfield).
[libomptarget] Add missing elf_end call in elf_common.c
Thu, Mar 26, 12:30 PM
JonChesterfield closed D76874: [libomptarget] Add missing elf_end call in elf_common.c.
Thu, Mar 26, 12:30 PM · Restricted Project
JonChesterfield created D76874: [libomptarget] Add missing elf_end call in elf_common.c.
Thu, Mar 26, 11:55 AM · Restricted Project
JonChesterfield added a comment to D76843: [Openmp] Libomptarget plugin for NEC SX-Aurora.

Looks pretty good to me. Thin shim over veo_*.

Thu, Mar 26, 11:22 AM · Restricted Project, Restricted Project

Wed, Mar 25

JonChesterfield added a comment to D76342: [OpenMP] Implement '#pragma omp tile'.

edit: actually you've already done the clang-format on trunk as I hoped, phabricator mislead me. Apologies for the noise

Wed, Mar 25, 10:15 AM · Restricted Project

Tue, Mar 24

Herald updated subscribers of D56913: decoupling Freestanding atomic<T> from libatomic.a.
Tue, Mar 24, 6:36 PM · Restricted Project
JonChesterfield committed rG0813f41005fd: [libomptarget][nfc] Explicitly static function scope shared variables (authored by JonChesterfield).
[libomptarget][nfc] Explicitly static function scope shared variables
Tue, Mar 24, 12:22 PM
JonChesterfield closed D76713: [libomptarget][nfc] Explicitly static function scope shared variables.
Tue, Mar 24, 12:21 PM · Restricted Project
JonChesterfield created D76713: [libomptarget][nfc] Explicitly static function scope shared variables.
Tue, Mar 24, 10:11 AM · Restricted Project

Mon, Mar 23

JonChesterfield created D76630: [libomptarget][nfc] Use unity build for nvcc to approximate LTO.
Mon, Mar 23, 10:55 AM · Restricted Project

Fri, Mar 20

JonChesterfield committed rG298527587c76: [libomptarget][nfc] Disable amdgcn rtl build. The cmake logic for finding llvm… (authored by JonChesterfield).
[libomptarget][nfc] Disable amdgcn rtl build. The cmake logic for finding llvm…
Fri, Mar 20, 5:23 PM
JonChesterfield added a comment to D76469: Enabled CUDA offloading on aarch64 host.

Sounds good. Thanks for testing it.

Fri, Mar 20, 4:51 AM · Restricted Project

Tue, Mar 17

JonChesterfield committed rGcc691f3384c5: Disable loader-uninitialized tests on Windows (authored by JonChesterfield).
Disable loader-uninitialized tests on Windows
Tue, Mar 17, 4:46 PM
JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

This breaks tests on Windows: http://45.33.8.238/win/10664/step_7.txt

Please take a look, and if it takes some time please revert while you investigate.

Tue, Mar 17, 4:46 PM · Restricted Project
JonChesterfield committed rG1d19b153955a: Fix arm build broken by D74361 by dropping align from filecheck pattern (authored by JonChesterfield).
Fix arm build broken by D74361 by dropping align from filecheck pattern
Tue, Mar 17, 3:41 PM
JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

Tests made assumptions about alignment which are invalid on arm, failed a buildbot. The tests don't actually care about alignment, so fixed by dropping the , align # part of the patterns.

Tue, Mar 17, 3:40 PM · Restricted Project
JonChesterfield committed rGc45eaeabb77a: [Clang] Undef attribute for global variables (authored by JonChesterfield).
[Clang] Undef attribute for global variables
Tue, Mar 17, 2:35 PM
JonChesterfield closed D74361: [Clang] Undef attribute for global variables.
Tue, Mar 17, 2:35 PM · Restricted Project
JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • Update C codegen test to match output of trunk
Tue, Mar 17, 2:35 PM · Restricted Project
JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

Thanks guys. Patched the C codegen test before landing - minor change on trunk in the last week, orthogonal to this.

Tue, Mar 17, 2:35 PM · Restricted Project
JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

ping

Tue, Mar 17, 10:10 AM · Restricted Project

Mon, Mar 16

JonChesterfield added a comment to D75917: Expose llvm fence instruction as clang intrinsic.

Is it really? The scope argument of the IR fence is a target-specific string:
http://llvm.org/docs/LangRef.html#syncscope

The change that I see here is assuming a numerical argument, and also assuming that the numbers used must conform to the OpenCL enum. That would certainly make the builtin quite different from the IR fence.

Mon, Mar 16, 6:35 PM · Restricted Project

Fri, Mar 13

JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • undo reformat of existing def
Fri, Mar 13, 11:17 AM · Restricted Project
JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

Aside from the diagnostic wording, I think this LG to me. However, I'd appreciate if @rjmccall would also sign off.

Fri, Mar 13, 11:17 AM · Restricted Project
JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • Amend diagnostic as suggested, clang-format new lines in SemaKinds.td
Fri, Mar 13, 11:17 AM · Restricted Project

Thu, Mar 12

JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

ping @aaron.ballman - does that look right to you?

Thu, Mar 12, 8:40 AM · Restricted Project

Wed, Mar 11

JonChesterfield added a comment to D75917: Expose llvm fence instruction as clang intrinsic.

Well, there is a problem: The LangRef says that scopes are target-defined. This change says that scopes are defined by the high-level language and further assumes that OpenCL scopes make sense in all languages. Besides conflicting with the LangRef, this not seem to work with C++, which has no scopes and nor with CUDA or HIP, whose scopes are not represented in any AtomicScopeModel.

Wed, Mar 11, 10:13 AM · Restricted Project
JonChesterfield added a comment to D75917: Expose llvm fence instruction as clang intrinsic.

how this builtin fits in with the overall scheme of language-specific and target-specific details of an atomic operation. For example, is this meant only for OpenCL? Does it work with CUDA? Or HIP? What is the behaviour for scope in C++?

Wed, Mar 11, 5:08 AM · Restricted Project

Tue, Mar 10

JonChesterfield added a comment to D75926: [LIBOMPTARGET][WIP]Fix PR45139: Bug in mixing Python and OpenMP target offload..

This feels familiar.

Tue, Mar 10, 9:46 AM · Restricted Project
JonChesterfield updated subscribers of D75917: Expose llvm fence instruction as clang intrinsic.

@jdoerfert this is one of the two intrinsics needed to drop the .ll source from the amdgcn deviceRTL. The other is atomic_inc.

Tue, Mar 10, 9:12 AM · Restricted Project
JonChesterfield added a reviewer for D75917: Expose llvm fence instruction as clang intrinsic: Anastasia.
Tue, Mar 10, 9:12 AM · Restricted Project
JonChesterfield added inline comments to D75917: Expose llvm fence instruction as clang intrinsic.
Tue, Mar 10, 7:32 AM · Restricted Project
JonChesterfield added inline comments to D75917: Expose llvm fence instruction as clang intrinsic.
Tue, Mar 10, 7:32 AM · Restricted Project

Mon, Mar 9

Herald added a reviewer for D17179: [OpenMP] Rename the offload entry points.: jdoerfert.
Mon, Mar 9, 3:07 PM

Fri, Mar 6

JonChesterfield added a comment to D75788: [OpenMP] Provide math functions in OpenMP device code via OpenMP variants.

That's less invasive than I feared. Nicely done.

Fri, Mar 6, 6:46 PM · Restricted Project
JonChesterfield added a comment to D75282: Rebase D59319 on trunk.

Testing is a sore point. I haven't found an acceptably low boilerplate way to write them for this library yet - should probably take another look.

Fri, Mar 6, 3:29 PM · Restricted Project
JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

I thought err_loader_uninitialized_extern says that the variable cannot have external linkage?

Fri, Mar 6, 12:43 PM · Restricted Project
JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • Review comments, add tests for private_extern
Fri, Mar 6, 12:11 PM · Restricted Project

Thu, Mar 5

JonChesterfield committed rG221ada654b28: [libomptarget] Implement locks for amdgcn (authored by JonChesterfield).
[libomptarget] Implement locks for amdgcn
Thu, Mar 5, 12:40 PM
JonChesterfield closed D75546: [libomptarget] Implement locks for amdgcn.
Thu, Mar 5, 12:40 PM · Restricted Project
JonChesterfield added a comment to D73979: [HIP] Allow non-incomplete array type for extern shared var.

BTW this is requested by HIP users, who have similar code for CUDA and HIP. They found it surprised that nvcc allows it but hip-clang does not.

Thu, Mar 5, 9:52 AM
JonChesterfield updated the diff for D75546: [libomptarget] Implement locks for amdgcn.
  • Warn instead of providing a partial implementation
Thu, Mar 5, 9:50 AM · Restricted Project
JonChesterfield added a comment to D75546: [libomptarget] Implement locks for amdgcn.

Can we have a print("Locks are not supported in this thread mapping model") instead?

Thu, Mar 5, 9:50 AM · Restricted Project
JonChesterfield committed rG918a1065be64: [libomptarget][nfc] Move GetWarp/LaneId functions into per arch code (authored by JonChesterfield).
[libomptarget][nfc] Move GetWarp/LaneId functions into per arch code
Thu, Mar 5, 9:19 AM
JonChesterfield closed D75587: [libomptarget][nfc] Move GetWarp/LaneId functions into per arch code.
Thu, Mar 5, 9:18 AM · Restricted Project
JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

ping

Thu, Mar 5, 7:40 AM · Restricted Project
JonChesterfield added a comment to D75581: [libomptarget][amdgcn] Implement get_wtime.

I don't have a documentation reference for this yet. A crude benchmark suggests the frequency is 25MHz on a vega 20, but I'm hoping for a source other than experimentation.

Thu, Mar 5, 7:40 AM · Restricted Project
JonChesterfield committed rG84ac0dffd408: [libomptarget][nfc][amdgcn] Replace magic number with named intrinsic (authored by JonChesterfield).
[libomptarget][nfc][amdgcn] Replace magic number with named intrinsic
Thu, Mar 5, 3:52 AM

Wed, Mar 4

JonChesterfield added a comment to D75546: [libomptarget] Implement locks for amdgcn.

If we say thread == lane of simd, and every lane executes the same instruction with some masked off, then we can 'lock' a thread with respect to the rest of the device if and only if it is the only active one in the warp.

Wed, Mar 4, 3:11 PM · Restricted Project
JonChesterfield committed rG133db44996a8: [libomptarget] Implement most hip atomic functions in terms of intrinsics (authored by JonChesterfield).
[libomptarget] Implement most hip atomic functions in terms of intrinsics
Wed, Mar 4, 10:07 AM
JonChesterfield closed D73076: [libomptarget] Implement most hip atomic functions in terms of intrinsics.
Wed, Mar 4, 10:06 AM · Restricted Project

Tue, Mar 3

JonChesterfield added inline comments to D75581: [libomptarget][amdgcn] Implement get_wtime.
Tue, Mar 3, 8:09 PM · Restricted Project
JonChesterfield added inline comments to D75581: [libomptarget][amdgcn] Implement get_wtime.
Tue, Mar 3, 8:09 PM · Restricted Project
JonChesterfield added inline comments to D75587: [libomptarget][nfc] Move GetWarp/LaneId functions into per arch code.
Tue, Mar 3, 5:16 PM · Restricted Project
JonChesterfield created D75587: [libomptarget][nfc] Move GetWarp/LaneId functions into per arch code.
Tue, Mar 3, 5:16 PM · Restricted Project
JonChesterfield added inline comments to D75581: [libomptarget][amdgcn] Implement get_wtime.
Tue, Mar 3, 4:39 PM · Restricted Project
JonChesterfield created D75581: [libomptarget][amdgcn] Implement get_wtime.
Tue, Mar 3, 4:07 PM · Restricted Project
JonChesterfield added a comment to D73076: [libomptarget] Implement most hip atomic functions in terms of intrinsics.

clang-tidy failed because it tried to compile this file for x86, which doesn't work, and because it doesn't like the naming conventions. I can do T r; => T R; and capitalise various names if we like, but the unknown attributes and error on looking for -DAMDGCN will need an infrastructure change to resolve.

Tue, Mar 3, 1:14 PM · Restricted Project
JonChesterfield committed rGad3d021b9e5a: [libomptarget][nfc][amdgcn] Simplify assert_fail implementation (authored by JonChesterfield).
[libomptarget][nfc][amdgcn] Simplify assert_fail implementation
Tue, Mar 3, 10:59 AM
JonChesterfield updated the diff for D75546: [libomptarget] Implement locks for amdgcn.
  • s/warp/wavefront
Tue, Mar 3, 10:56 AM · Restricted Project
JonChesterfield created D75546: [libomptarget] Implement locks for amdgcn.
Tue, Mar 3, 10:56 AM · Restricted Project
JonChesterfield updated the diff for D73076: [libomptarget] Implement most hip atomic functions in terms of intrinsics.
  • Simplify, drop atomicInc impl
Tue, Mar 3, 10:56 AM · Restricted Project
JonChesterfield added a comment to D73076: [libomptarget] Implement most hip atomic functions in terms of intrinsics.

At some point in the future we may want to change over to using atomic functions that closer match the C++ ones, and let nvptx implement those in terms of cuda.

Tue, Mar 3, 10:56 AM · Restricted Project
JonChesterfield retitled D73076: [libomptarget] Implement most hip atomic functions in terms of intrinsics from [libomptarget] Implement hip atomic functions in terms of intrinsics to [libomptarget] Implement most hip atomic functions in terms of intrinsics.
Tue, Mar 3, 10:56 AM · Restricted Project

Mon, Mar 2

JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

I'm finally happy with the semantic checks here. Thanks for the guidance on where to look for the hooks.

Mon, Mar 2, 6:33 PM · Restricted Project
JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • Error on redeclaration with loader_uninit in C
Mon, Mar 2, 6:33 PM · Restricted Project
JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • error on extern variables, minor cleanup
Mon, Mar 2, 4:38 PM · Restricted Project
JonChesterfield updated the summary of D74361: [Clang] Undef attribute for global variables.
Mon, Mar 2, 4:38 PM · Restricted Project
JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • Reduce scope to trivial default constructed types
Mon, Mar 2, 3:53 PM · Restricted Project
JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

I've continued thinking about / experimenting with this. Curiously - X x; and X x{}; are considered distinct by clang. The current patch will only accept the former. I'll add some tests for that.

Mon, Mar 2, 3:39 PM · Restricted Project
JonChesterfield added inline comments to D74361: [Clang] Undef attribute for global variables.
Mon, Mar 2, 1:19 PM · Restricted Project
JonChesterfield added inline comments to D74361: [Clang] Undef attribute for global variables.
Mon, Mar 2, 12:03 PM · Restricted Project
JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • Reject initialisers, update doc to recommended string
Mon, Mar 2, 11:36 AM · Restricted Project
JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

Fixed the spelling/formatting, added more tests. The C++ case would be improved by warning on int x __attribute__((loader_uninitialised)) = 0 as there are two initializers.

Mon, Mar 2, 8:08 AM · Restricted Project
JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • Address review comments, more test coverage
Mon, Mar 2, 8:04 AM · Restricted Project
JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • Rename attribute, propose some documentation
Mon, Mar 2, 6:16 AM · Restricted Project
JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

The above patch composes sensibly with openmp, e.g.

#include <omp.h>
#pragma omp declare target
int data __attribute__((no_zero_initializer));
#pragma omp allocate(data) allocator(omp_pteam_mem_alloc)
#pragma omp end declare target
@data = hidden addrspace(3) global i32 undef, align 4
Mon, Mar 2, 5:52 AM · Restricted Project

Feb 29 2020

JonChesterfield added a comment to D74258: [OpenMP] Switch default C++ standard to C++ 14.

Issue https://github.com/llvm/llvm-project/issues/159 suggests we missed a file here. Perhaps plugins was previously relying on the compiler default?

Feb 29 2020, 5:39 AM · Restricted Project

Feb 28 2020

JonChesterfield added inline comments to D74361: [Clang] Undef attribute for global variables.
Feb 28 2020, 2:25 AM · Restricted Project
JonChesterfield added a comment to D75285: Mark restrict pointer or reference to const as invariant.

If users derive a non-const pointer from the const pointer and modify it, doesn't that result in UB? Thanks.

Feb 28 2020, 2:08 AM

Feb 27 2020

JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • clang-format
Feb 27 2020, 6:26 PM · Restricted Project
JonChesterfield added inline comments to D74361: [Clang] Undef attribute for global variables.
Feb 27 2020, 4:38 PM · Restricted Project
JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

This will need to impact static analysis and the AST, I think. Local variables can't be redeclared, but global variables can, so disallowing initializers syntactically when the attribute is present doesn't necessarily stop other declarations from defining the variable. Also, you need to make the attribute mark something as a definition, the same way that e.g. the alias attribute does. Also, this probably ought to disable the default-initialization of non-trivial types in C++, in case that's not already done.

Feb 27 2020, 4:38 PM · Restricted Project
JonChesterfield retitled D74361: [Clang] Undef attribute for global variables from [Clang] Uninitialize attribute on global variables to [Clang] Undef attribute for global variables.
Feb 27 2020, 4:29 PM · Restricted Project
JonChesterfield updated the summary of D74361: [Clang] Undef attribute for global variables.
Feb 27 2020, 4:29 PM · Restricted Project
JonChesterfield updated the diff for D74361: [Clang] Undef attribute for global variables.
  • Rename attribute, add to hasDefiningAttr
Feb 27 2020, 4:20 PM · Restricted Project
JonChesterfield updated the diff for D75282: Rebase D59319 on trunk.
  • drop the small buffer optimization to simplify the initial implementation
Feb 27 2020, 12:23 PM · Restricted Project
JonChesterfield created D75282: Rebase D59319 on trunk.
Feb 27 2020, 11:35 AM · Restricted Project

Feb 25 2020

JonChesterfield added a comment to D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface.

I'd like to rebase this on the current deviceRTL, and add any nvptx/amdgcn specific hooks if necessary. Any objections?

Feb 25 2020, 4:35 PM · Restricted Project

Feb 24 2020

JonChesterfield accepted D74925: [OpenMP][Opt] Combine `struct ident_t*` during deduplication.

Nice. Thanks!

Feb 24 2020, 4:45 PM · Restricted Project, Restricted Project
JonChesterfield added a comment to D74925: [OpenMP][Opt] Combine `struct ident_t*` during deduplication.

Cool. Can we reasonably add the reproducible from 44893 to a regression suite, in addition to these IR tests? It's written in C so would need to be under clang's tests.

Feb 24 2020, 6:31 AM · Restricted Project, Restricted Project
JonChesterfield updated subscribers of D74941: [OpenMP] `omp begin/end declare variant` - part 1, parsing.

Thanks! Splitting this out of D71179, which I think ultimately reached consensus, makes the diff much easier to read.

Feb 24 2020, 6:04 AM · Restricted Project, Restricted Project

Feb 18 2020

JonChesterfield added a comment to D74361: [Clang] Undef attribute for global variables.

It zero initialises on x86, but perhaps by coincidence rather than guarantee.

Feb 18 2020, 9:49 AM · Restricted Project