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

CUDA: Make numba.cuda.tests.doc_examples.ffi a module to fix #8252 #8255

Merged
merged 1 commit into from Jul 20, 2022

Conversation

gmarkall
Copy link
Member

The fix adds __init__.py to make numba.cuda.tests.doc_examples.ffi a module. This is intended to resolve Issue #8252 by ensuring the directory is installed and therefore included in packaging.

I've built the package locally, and the ffi folder now appears in the package:

$ ls ~/tmp/numba-issue-8252-package/lib/python3.9/site-packages/numba/cuda/tests/doc_examples/ffi
functions.cu  __init__.py  __pycache__

Installing the package locally with (the last couple of lines are because dependency resolution seems not to occur if a local package is installed):

mamba create -n numba-issue-8252-fix python=3.9 numba/label/dev::llvmlite
conda activate numba-issue-8252-fix
mamba install /home/gmarkall/mambaforge/conda-bld/linux-64/numba-0.57.0dev0-np1.16py3.9heec6ddf_g133cfe86d_91.tar.bz2
mamba install numpy
mamba install nvidia::cuda-python=11.7.0

and then running tests gives:

$ NUMBA_CUDA_USE_NVIDIA_BINDING=1 python -m numba.runtests numba.cuda.tests.doc_examples -v
test_ex_grid_sync (numba.cuda.tests.doc_examples.test_cg.TestCooperativeGroups) ... ok
test_ex_cpu_gpu_compat (numba.cuda.tests.doc_examples.test_cpu_gpu_compat.TestCpuGpuCompat) ... ok
test_ex_linking_cu (numba.cuda.tests.doc_examples.test_ffi.TestFFI) ... ok
test_ex_laplace (numba.cuda.tests.doc_examples.test_laplace.TestLaplace) ... ok
test_ex_matmul (numba.cuda.tests.doc_examples.test_matmul.TestMatMul)
Test of matrix multiplication on various cases. ... ok
test_ex_montecarlo (numba.cuda.tests.doc_examples.test_montecarlo.TestMonteCarlo) ... ok
test_ex_3d_grid (numba.cuda.tests.doc_examples.test_random.TestRandom) ... ok
test_ex_reduction (numba.cuda.tests.doc_examples.test_reduction.TestReduction) ... ok
test_ex_sessionize (numba.cuda.tests.doc_examples.test_sessionize.TestSessionization) ... ok
test_ex_vecadd (numba.cuda.tests.doc_examples.test_vecadd.TestVecAdd) ... ok

----------------------------------------------------------------------
Ran 10 tests in 4.213s

OK

indicating that the FFI test ran and succeeded.

Fixes #8252.

... by adding `__init__.py`. This is intended to resolve Issue numba#8252 by
ensuring the directory is installed and therefore included in packaging.
@gmarkall gmarkall added CUDA CUDA related issue/PR Effort - short Short size effort needed 2 - In Progress labels Jul 19, 2022
@gmarkall
Copy link
Member Author

gpuci run tests

@sklam sklam added this to the Numba 0.56.0 milestone Jul 19, 2022
@sklam sklam mentioned this pull request Jul 19, 2022
25 tasks
@sklam
Copy link
Member

sklam commented Jul 19, 2022

BFID numba_smoketest_cuda_yaml_141

@sklam sklam added Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm 4 - Waiting on CI Review etc done, waiting for CI to finish and removed 3 - Ready for Review labels Jul 19, 2022
Copy link
Member

@sklam sklam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked this manually to confirm that it fixes the module not found error

@sklam sklam added BuildFarm Passed For PRs that have been through the buildfarm and passed 5 - Ready to merge Review and testing done, is ready to merge and removed Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm 4 - Waiting on CI Review etc done, waiting for CI to finish labels Jul 20, 2022
@sklam sklam merged commit adc261d into numba:main Jul 20, 2022
sklam added a commit to sklam/numba that referenced this pull request Jul 21, 2022
CUDA: Make numba.cuda.tests.doc_examples.ffi a module to fix numba#8252
sklam added a commit that referenced this pull request Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to merge Review and testing done, is ready to merge BuildFarm Passed For PRs that have been through the buildfarm and passed CUDA CUDA related issue/PR Effort - short Short size effort needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

numba/cuda/tests/doc_examples/ffi/functions.cu may not be packaged correctly
2 participants