-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve setting launching bounds on preset kernels
- Replace metadata if already set (CUDA) - Add test kernel_preset_bounds
- Loading branch information
1 parent
7cfa5a7
commit 9858438
Showing
4 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// clang-format off | ||
// RUN: ./kernel_preset_bounds.%ext | FileCheck %s --check-prefixes=CHECK,CHECK-FIRST | ||
// Second run uses the object cache. | ||
// RUN: ./kernel_preset_bounds.%ext | FileCheck %s --check-prefixes=CHECK,CHECK-SECOND | ||
// clang-format on | ||
#include <climits> | ||
#include <cstdio> | ||
|
||
#include "gpu_common.h" | ||
|
||
__global__ __attribute__((annotate("jit"))) | ||
__launch_bounds__(128, 4) void kernel() { | ||
printf("Kernel\n"); | ||
} | ||
|
||
int main() { | ||
kernel<<<1, 1>>>(); | ||
gpuErrCheck(gpuDeviceSynchronize()); | ||
return 0; | ||
} | ||
|
||
// CHECK: Kernel | ||
// CHECK: JitCache hits 0 total 1 | ||
// CHECK: HashValue {{[0-9]+}} NumExecs 1 NumHits 0 | ||
// CHECK-FIRST: JitStorageCache hits 0 total 1 | ||
// CHECK-SECOND: JitStorageCache hits 1 total 1 |