-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ahmed, Daiyaan <[email protected]>
- Loading branch information
1 parent
d3ac237
commit a363ba4
Showing
2 changed files
with
27 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "cuda_bf16.h" | ||
#include "cuda_fp16.h" | ||
|
||
__global__ void test_ldg_tex_cache_read(int *deviceArray) { | ||
float f1; | ||
double d; | ||
float2 *f2; | ||
__half h1; | ||
__half2 *h2; | ||
uchar4 u4; | ||
ulonglong2 *ull2; | ||
|
||
__ldg(&f1); | ||
auto cacheReadD = __ldg(&d); | ||
__ldg(f2); | ||
auto cacheReadH1 = __ldg(&h1); | ||
__ldg(h2); | ||
__ldg(&u4); | ||
__ldg(ull2); | ||
} | ||
|
||
int main() { | ||
int test = 0; | ||
test_ldg_tex_cache_read<<<4, 4>>>(&test); | ||
cudaDeviceSynchronize(); | ||
return 0; | ||
} |
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