Skip to content

_compiled_module.*.so built in the wrong directory #152

@davidberard98

Description

@davidberard98

Describe the bug
After building from source with pip install -e ., the compiled .so file is put in the wrong directory, preventing import cudnn from working.

Expected behavior
Import works properly after pip install -e .. Presumably, the compiled .so file should be built in python/cudnn/ instead of python/ so that the import works properly.

System Environment (please complete the following information):

  • cudnn_frontend version: 9793df5
  • cudnn_backend version: N/A
  • GPU arch: H100
  • cuda runtime version: N/A
  • cuda driver version: N/A
  • host compiler: N/A
  • OS: CentOS9

API logs
N/A

To Reproduce
Steps to reproduce the behavior:

$ git clone [email protected]:NVIDIA/cudnn-frontend.git
$ cd cudnn-frontend
$ python -m pip install -e .
$ python -c "import cudnn"
Traceback (most recent call last):
  File "...", line 9, in <module>
    import cudnn
  File "/data/users/dberard/triton-env/cudnn-frontend/python/cudnn/__init__.py", line 15, in <module>
    _pybind_module = importlib.import_module(module_name, package=__name__)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dberard/.conda/envs/triton-env/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'cudnn._compiled_module

To fix, you can move the _compiled_module.*.so file from python/ into python/cudnn/.

Additional context
N/A

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