Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make @device_code_sass work with non-Julia kernels. #2247

Merged
merged 1 commit into from
Jan 20, 2024
Merged

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Jan 19, 2024

By using CUPTI and profiled module callbacks, instead of hooking into GPUCompiler, we can also reflect on SASS code from external libraries:

julia> @device_code_sass CUBLAS.scal!(1, 1f0, CUDA.ones(1))
	.headerflags	@"EF_CUDA_TEXMODE_UNIFIED EF_CUDA_64BIT_ADDRESS EF_CUDA_SM86 EF_CUDA_VIRTUAL_SM(EF_CUDA_SM86)"
	.elftype	@"ET_EXEC"


//--------------------- .text._Z15scal_kernel_refI7double2dEv19cublasScalParamsRefIT_T0_E --------------------------
	.section	.text._Z15scal_kernel_refI7double2dEv19cublasScalParamsRefIT_T0_E,"ax",@progbits
	.sectioninfo	@"SHI_REGISTERS=18"
	.align	128
        .global         _Z15scal_kernel_refI7double2dEv19cublasScalParamsRefIT_T0_E
        .type           _Z15scal_kernel_refI7double2dEv19cublasScalParamsRefIT_T0_E,@function
        .size           _Z15scal_kernel_refI7double2dEv19cublasScalParamsRefIT_T0_E,(.L_x_92 - _Z15scal_kernel_refI7double2dEv19cublasScalParamsRefIT_T0_E)
        .other          _Z15scal_kernel_refI7double2dEv19cublasScalParamsRefIT_T0_E,@"STO_CUDA_ENTRY STV_DEFAULT"
_Z15scal_kernel_refI7double2dEv19cublasScalParamsRefIT_T0_E:

.text._Z15scal_kernel_refI7double2dEv19cublasScalParamsRefIT_T0_E:
...

@maleadt maleadt added cuda kernels Stuff about writing CUDA kernels. enhancement New feature or request labels Jan 19, 2024
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (d8c6d6d) 71.32% compared to head (3e11958) 71.33%.

Files Patch % Lines
src/compiler/reflection.jl 86.36% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2247      +/-   ##
==========================================
+ Coverage   71.32%   71.33%   +0.01%     
==========================================
  Files         155      155              
  Lines       14837    14854      +17     
==========================================
+ Hits        10582    10596      +14     
- Misses       4255     4258       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maleadt maleadt merged commit 3967481 into master Jan 20, 2024
1 check passed
@maleadt maleadt deleted the tb/ext_code_sass branch January 20, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda kernels Stuff about writing CUDA kernels. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant