Skip to content

Commit

Permalink
Remove the functinal form of 'assertOnGpu'
Browse files Browse the repository at this point in the history
It has been deprecated for a year now

Signed-off-by: Danila Fedorin <[email protected]>
  • Loading branch information
DanilaFe committed Aug 30, 2024
1 parent d301f0a commit c7ddb4d
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 167 deletions.
8 changes: 1 addition & 7 deletions compiler/optimizations/gpuTransforms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,7 @@ class GpuAssertionReporter {
if (assertion->isPrimitive(PRIM_ASSERT_GPU_ELIGIBLE)) {
reason = "is marked with @gpu.assertEligible";
} else {
INT_ASSERT(assertion->isPrimitive(PRIM_ASSERT_ON_GPU));
reason = "contains assertOnGpu()";
auto isAttributeSym = toSymExpr(assertion->get(1));
INT_ASSERT(isAttributeSym);
if (isAttributeSym->symbol() == gTrue) {
reason = "is marked with @assertOnGpu";
}
reason = "is marked with @assertOnGpu";
}
USR_FATAL_CONT(loc, "Loop %s but is not eligible for execution on a GPU", reason);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/standard/AutoGpu.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module AutoGpu {
"that the code can be executed on the GPU without ",
"runtime checks.");
}
__primitive("chpl_assert_on_gpu", true);
__primitive("chpl_assert_on_gpu");
}

inline proc chpl__gpuBlockSizeAttr(param counter: int, arg: integral) {
Expand Down
12 changes: 0 additions & 12 deletions modules/standard/GPU.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,6 @@ module GPU
gpuWrite((...args), "\n":c_ptrConst(c_char));
}

/*
Will halt execution at runtime if called from outside a GPU. If used on
first line in ``foreach`` or ``forall`` loop will also do a compile time
check that the loop is eligible for execution on a GPU.
*/
pragma "insert line file info"
pragma "always propagate line file info"
@deprecated(notes="the functional form of assertOnGpu() is deprecated. Please use the @assertOnGpu loop attribute instead.")
inline proc assertOnGpu() {
__primitive("chpl_assert_on_gpu", false);
}

/*
Returns value of a per-multiprocessor counter that increments every clock cycle.
This function is meant to be called to time sections of code within a GPU
Expand Down
15 changes: 0 additions & 15 deletions test/gpu/native/assertOnFailToGpuize.1.good

This file was deleted.

14 changes: 0 additions & 14 deletions test/gpu/native/assertOnFailToGpuize.2.good

This file was deleted.

14 changes: 0 additions & 14 deletions test/gpu/native/assertOnFailToGpuize.3.good

This file was deleted.

10 changes: 0 additions & 10 deletions test/gpu/native/assertOnFailToGpuize.4.good

This file was deleted.

82 changes: 0 additions & 82 deletions test/gpu/native/assertOnFailToGpuize.chpl

This file was deleted.

11 changes: 0 additions & 11 deletions test/gpu/native/assertOnFailToGpuize.compopts

This file was deleted.

2 changes: 1 addition & 1 deletion test/users/engin/context/gpuSharedMem.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ config const n = 20;
on here.gpus[0] {
var A : [0..<N] uint;

@assertOnGpu
foreach i in simpleOneDim(N) { // context should be coming from a new syntax
assertOnGpu();
const context = new Context();
const vectorContext = __primitive("outer context", context);

Expand Down

0 comments on commit c7ddb4d

Please sign in to comment.