Commit 7bd81db
committed
[Mosaic GPU] Improve default kernel name and add option to customize
This allows users to distinguish Mosaic GPU kernels from other kernels
when using profiling programs such as Nsight Systems.
The new default behavior is to use `mosaic_gpu_<def_name>_kernel` as
the kernel name, where `<def_name>` is the name of the Mosaic GPU
Python kernel function passed to `as_gpu_kernel` or
`as_torch_gpu_kernel`.
We also add a new `kernel_name` optional argument to `as_gpu_kernel`
and `as_torch_gpu_kernel`. If `kernel_name` is not `None`, the
resulting kernel name is `mosaic_gpu_<kernel_name>_kernel`. This is
useful when the Mosaic GPU Python kernel function is constructed
through metaprogramming so that the final specialized kernel can have
different meaningful names depending on the metaparameters.
Previously the kernel name was always `main_kernel`.1 parent f2f02ee commit 7bd81db
File tree
3 files changed
+55
-7
lines changed- jaxlib/mosaic/gpu
- jax/experimental/mosaic/gpu
3 files changed
+55
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
| 850 | + | |
850 | 851 | | |
851 | 852 | | |
852 | 853 | | |
| |||
873 | 874 | | |
874 | 875 | | |
875 | 876 | | |
| 877 | + | |
| 878 | + | |
876 | 879 | | |
877 | 880 | | |
878 | 881 | | |
| |||
882 | 885 | | |
883 | 886 | | |
884 | 887 | | |
885 | | - | |
| 888 | + | |
886 | 889 | | |
887 | 890 | | |
888 | 891 | | |
| |||
947 | 950 | | |
948 | 951 | | |
949 | 952 | | |
| 953 | + | |
950 | 954 | | |
951 | 955 | | |
952 | 956 | | |
| |||
956 | 960 | | |
957 | 961 | | |
958 | 962 | | |
959 | | - | |
| 963 | + | |
960 | 964 | | |
961 | 965 | | |
962 | 966 | | |
| |||
1014 | 1018 | | |
1015 | 1019 | | |
1016 | 1020 | | |
| 1021 | + | |
1017 | 1022 | | |
1018 | 1023 | | |
1019 | 1024 | | |
| |||
1032 | 1037 | | |
1033 | 1038 | | |
1034 | 1039 | | |
1035 | | - | |
| 1040 | + | |
1036 | 1041 | | |
1037 | 1042 | | |
1038 | 1043 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
415 | 416 | | |
416 | 417 | | |
417 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
418 | 453 | | |
419 | 454 | | |
420 | 455 | | |
| |||
430 | 465 | | |
431 | 466 | | |
432 | 467 | | |
433 | | - | |
434 | | - | |
435 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
436 | 478 | | |
437 | 479 | | |
438 | 480 | | |
| |||
442 | 484 | | |
443 | 485 | | |
444 | 486 | | |
445 | | - | |
| 487 | + | |
446 | 488 | | |
447 | 489 | | |
448 | 490 | | |
| |||
0 commit comments