Skip to content

how to use nsight compute to get the kernel performance? #46

Closed

Description

@youzjuer

i use command ncu --set full -o deepgemm python tests/test_core.py
but report error:
==ERROR== ERR_NVGPUCTRPERM - The user does not have permission to access NVIDIA GPU Performance Counters on the target device 0. For instructions on enabling permissions and to get more information see https://developer.nvidia.com/ERR_NVGPUCTRPERM
Traceback (most recent call last):
File "/mnt/workspace/xxx/DeepGEMM-main/tests/test_core.py", line 167, in
test_gemm()
File "/mnt/workspace/xxx/DeepGEMM-main/tests/test_core.py", line 80, in test_gemm
deep_gemm.gemm_fp8_fp8_bf16_nt(x_fp8, y_fp8, out)
File "/usr/local/lib/python3.12/dist-packages/deep_gemm/jit_kernels/gemm.py", line 162, in gemm_fp8_fp8_bf16_nt
runtime = jit_tuner.compile_and_tune(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/deep_gemm/jit_kernels/tuner.py", line 40, in compile_and_tune
kernels.append((build(name, arg_defs, code), tuned_keys))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/deep_gemm/jit/compiler.py", line 110, in build
enable_sass_opt = get_nvcc_compiler()[1] <= '12.8' and int(os.getenv('DG_DISABLE_FFMA_INTERLEAVE', 0)) == 0
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/deep_gemm/jit/compiler.py", line 57, in get_nvcc_compiler
version = match.group(1)
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
==PROF== Disconnected from process 25948
==ERROR== The application returned an error code (1).

Activity

  1. soundOfDestiny commented on Mar 7, 2025

    @soundOfDestiny
    Contributor

    DeepGEMM cannot find the version of your NVCC.
    You can print os.popen(f'{path} --version').read() in code before version = match.group(1), or simply run 'nvcc --version' to debug.

  2. sazczmh commented on Apr 9, 2025

    @sazczmh
    Collaborator

    The error message itself contains the solution.

    ==ERROR== ERR_NVGPUCTRPERM - The user does not have permission to access NVIDIA GPU Performance Counters on the target device 0. For instructions on enabling permissions and to get more information see https://developer.nvidia.com/ERR_NVGPUCTRPERM

    Image

    To allow access for any user, create a file with the .conf extension containing options nvidia NVreg_RestrictProfilingToAdminUsers=0 in /etc/modprobe.d.

  3. added a commit that references this issue on Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions