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

numba/cuda/tests/doc_examples/ffi/functions.cu may not be packaged correctly #8252

Closed
gmarkall opened this issue Jul 18, 2022 · 1 comment · Fixed by #8255
Closed

numba/cuda/tests/doc_examples/ffi/functions.cu may not be packaged correctly #8252

gmarkall opened this issue Jul 18, 2022 · 1 comment · Fixed by #8255
Labels
bug - build/packaging Bugs: issue with building or packaging Numba CUDA CUDA related issue/PR
Milestone

Comments

@gmarkall
Copy link
Member

I've received a report of this failure from running the test suite on Windows with the conda package from the dev channel:

======================================================================
ERROR: test_ex_linking_cu (numba.cuda.tests.doc_examples.test_ffi.TestFFI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\ProgramData\Miniconda37\lib\site-packages\numba\cuda\tests\doc_examples\test_ffi.py", line 42, in test_ex_linking_cu
    multiply_vectors[1, 32](r, x, y)
  File "C:\ProgramData\Miniconda37\lib\site-packages\numba\cuda\dispatcher.py", line 492, in __call__
    self.stream, self.sharedmem)
  File "C:\ProgramData\Miniconda37\lib\site-packages\numba\cuda\dispatcher.py", line 625, in call
    kernel = _dispatcher.Dispatcher._cuda_call(self, *args)
  File "C:\ProgramData\Miniconda37\lib\site-packages\numba\cuda\dispatcher.py", line 633, in _compile_for_args
    return self.compile(tuple(argtypes))
  File "C:\ProgramData\Miniconda37\lib\site-packages\numba\cuda\dispatcher.py", line 796, in compile
    kernel.bind()
  File "C:\ProgramData\Miniconda37\lib\site-packages\numba\cuda\dispatcher.py", line 178, in bind
    self._codelibrary.get_cufunc()
  File "C:\ProgramData\Miniconda37\lib\site-packages\numba\cuda\codegen.py", line 200, in get_cufunc
    cubin = self.get_cubin(cc=device.compute_capability)
  File "C:\ProgramData\Miniconda37\lib\site-packages\numba\cuda\codegen.py", line 175, in get_cubin
    linker.add_file_guess_ext(path)
  File "C:\ProgramData\Miniconda37\lib\site-packages\numba\cuda\cudadrv\driver.py", line 2630, in add_file_guess_ext
    self.add_cu_file(path)
  File "C:\ProgramData\Miniconda37\lib\site-packages\numba\cuda\cudadrv\driver.py", line 2620, in add_cu_file
    with open(path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\ProgramData\\Miniconda37\\lib\\site-packages\\numba\\cuda\\tests\\doc_examples\\ffi\\functions.cu'

Possibly the packaging setup is not correct - I need to investigate this issue further, but have created the GH issue now to keep track publicly.

@gmarkall gmarkall added needtriage CUDA CUDA related issue/PR windows bug - build/packaging Bugs: issue with building or packaging Numba labels Jul 18, 2022
@gmarkall gmarkall added this to the Numba 0.57 RC milestone Jul 18, 2022
@gmarkall
Copy link
Member Author

I was able to reproduce this on Linux too, with:

mamba create -n numba-issue-8253 python=3.7 numba/label/dev::numba nvidia::cuda-python=11.7.0
conda activate numba-issue-8253
NUMBA_CUDA_USE_NVIDIA_BINDING=1 python -m numba.runtests numba.cuda.tests.doc_examples

resulting in:

..E.......
======================================================================
ERROR: test_ex_linking_cu (numba.cuda.tests.doc_examples.test_ffi.TestFFI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gmarkall/mambaforge/envs/numba-issue-8253/lib/python3.7/site-packages/numba/cuda/tests/doc_examples/test_ffi.py", line 42, in test_ex_linking_cu
    multiply_vectors[1, 32](r, x, y)
  File "/home/gmarkall/mambaforge/envs/numba-issue-8253/lib/python3.7/site-packages/numba/cuda/dispatcher.py", line 492, in __call__
    self.stream, self.sharedmem)
  File "/home/gmarkall/mambaforge/envs/numba-issue-8253/lib/python3.7/site-packages/numba/cuda/dispatcher.py", line 625, in call
    kernel = _dispatcher.Dispatcher._cuda_call(self, *args)
  File "/home/gmarkall/mambaforge/envs/numba-issue-8253/lib/python3.7/site-packages/numba/cuda/dispatcher.py", line 633, in _compile_for_args
    return self.compile(tuple(argtypes))
  File "/home/gmarkall/mambaforge/envs/numba-issue-8253/lib/python3.7/site-packages/numba/cuda/dispatcher.py", line 796, in compile
    kernel.bind()
  File "/home/gmarkall/mambaforge/envs/numba-issue-8253/lib/python3.7/site-packages/numba/cuda/dispatcher.py", line 178, in bind
    self._codelibrary.get_cufunc()
  File "/home/gmarkall/mambaforge/envs/numba-issue-8253/lib/python3.7/site-packages/numba/cuda/codegen.py", line 200, in get_cufunc
    cubin = self.get_cubin(cc=device.compute_capability)
  File "/home/gmarkall/mambaforge/envs/numba-issue-8253/lib/python3.7/site-packages/numba/cuda/codegen.py", line 175, in get_cubin
    linker.add_file_guess_ext(path)
  File "/home/gmarkall/mambaforge/envs/numba-issue-8253/lib/python3.7/site-packages/numba/cuda/cudadrv/driver.py", line 2630, in add_file_guess_ext
    self.add_cu_file(path)
  File "/home/gmarkall/mambaforge/envs/numba-issue-8253/lib/python3.7/site-packages/numba/cuda/cudadrv/driver.py", line 2620, in add_cu_file
    with open(path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/gmarkall/mambaforge/envs/numba-issue-8253/lib/python3.7/site-packages/numba/cuda/tests/doc_examples/ffi/functions.cu'

----------------------------------------------------------------------
Ran 10 tests in 4.525s

The file (and the ffi subfolder it lives in) is indeed absent:

$ ls $CONDA_PREFIX/lib/python3.7/site-packages/numba/cuda/tests/doc_examples
__init__.py        __pycache__         test_cg.py          test_cpu_gpu_compat.py  test_ffi.py
test_laplace.py    test_matmul.py      test_montecarlo.py  test_random.py
test_reduction.py  test_sessionize.py  test_vecadd.py

gmarkall added a commit to gmarkall/numba that referenced this issue Jul 19, 2022
... by adding `__init__.py`. This is intended to resolve Issue numba#8252 by
ensuring the directory is installed and therefore included in packaging.
@sklam sklam modified the milestones: Numba 0.57 RC, Numba 0.56.0 Jul 19, 2022
sklam added a commit that referenced this issue Jul 20, 2022
CUDA: Make numba.cuda.tests.doc_examples.ffi a module to fix #8252
sklam added a commit to sklam/numba that referenced this issue Jul 21, 2022
CUDA: Make numba.cuda.tests.doc_examples.ffi a module to fix numba#8252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - build/packaging Bugs: issue with building or packaging Numba CUDA CUDA related issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants