Skip to content

Commit

Permalink
Use cuda.bindings (#1511)
Browse files Browse the repository at this point in the history
This updates a cuProj notebook to use cuda.bindings APIs.

xref: rapidsai/build-planning#117

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Ray Douglass (https://github.com/raydouglass)

URL: #1511
  • Loading branch information
bdice authored Jan 8, 2025
1 parent 88332aa commit dbdc75d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- c-compiler
- clang-tools=16.0.6
- cmake>=3.26.4,!=3.30.0
- cuda-python>=11.8.5,<12.0a0
- cuda-version=11.8
- cudatoolkit
- cudf==25.2.*,>=0.0.0a0
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- cuda-cupti-dev
- cuda-nvcc
- cuda-nvrtc-dev
- cuda-python>=12.6.2,<13.0a0
- cuda-version=12.5
- cudf==25.2.*,>=0.0.0a0
- cuml==25.2.*,>=0.0.0a0
Expand Down
10 changes: 10 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,16 @@ dependencies:
- output_types: [conda]
packages:
- curl
specific:
- output_types: [conda, requirements, pyproject]
matrices:
- matrix:
cuda: "12.*"
packages:
- cuda-python>=12.6.2,<13.0a0
- matrix: # All CUDA 11 versions
packages:
- cuda-python>=11.8.5,<12.0a0
# TODO: Remove geopandas.dataset usage in cuspatial_api_examples.ipynb
test_notebooks:
common:
Expand Down
6 changes: 3 additions & 3 deletions notebooks/cuproj_benchmark.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"source": [
"import numpy as np\n",
"import cupy as cp\n",
"from cuda import cudart\n",
"from cuda.bindings import runtime\n",
"\n",
"from pyproj import Transformer\n",
"from cuproj import Transformer as cuTransformer\n",
Expand Down Expand Up @@ -85,8 +85,8 @@
" return t.autorange()\n",
"\n",
"def cu_run_and_sync(transformer, grid):\n",
" transformer.transform(*grid)\n",
" cudart.cudaDeviceSynchronize()\n",
" transformer.transform(*grid)\n",
" runtime.cudaDeviceSynchronize()\n",
"\n",
"def run_cuproj(num_points):\n",
" grid_side = int(np.sqrt(num_points))\n",
Expand Down

0 comments on commit dbdc75d

Please sign in to comment.