Skip to content

Commit

Permalink
Update index.rst
Browse files Browse the repository at this point in the history
removed the installation and sample code snippet.
  • Loading branch information
singhmanas1 authored Sep 6, 2024
1 parent afdfe5b commit 093ce0c
Showing 1 changed file with 3 additions and 41 deletions.
44 changes: 3 additions & 41 deletions docs/cudf/source/cudf_polars/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,9 @@ cuDF supports an in-memory, GPU-accelerated execution engine for Python users of
The engine supports most of the core expressions and data types as well as a growing set of more advanced dataframe manipulations
and data file formats. When using the GPU engine, Polars will convert expressions into an optimized query plan and determine
whether the plan is supported on the GPU. If it is not, the execution will transparently fall back to the standard Polars engine
and run on the CPU. You can install the GPU backend for Polars with a feature flag in your standard Python pip install command.
and run on the CPU.

.. code-block:: bash
pip install polars[gpu] --extra-index-url=https://pypi.nvidia.com
GPU-based execution can be triggered by simply running ``.collect(engine="gpu")`` instead of ``.collect()``.

.. code-block:: python
# Import the necessary library
import polars as pl
# Define the data for the LazyFrame
ldf = pl.LazyFrame({
"a": [1.242, 1.535],
})
print(ldf.select(pl.col("a").round(1)).collect(engine="gpu"))
For finer control, you can pass a GPUEngine object with additional configuration parameters to the ``engine=`` parameter.

.. code-block:: python
# Import the necessary library
import polars as pl
# Define the data for the LazyFrame
ldf = pl.LazyFrame({
"a": [1.242, 1.535],
})
# Configure the GPU engine with advanced settings
gpu_engine = pl.GPUEngine(
device=0,
raise_on_Fail=True # Ensure the engine fails loudly if it cannot execute on the GPU
)
# Execute the collection with the custom GPU engine configuration
print(ldf.select(pl.col("a").round(1)).collect(engine=gpu_engine))
<TO-DO: Benchmarks>

Learn More
----------------------
Expand All @@ -59,4 +21,4 @@ Launch on Google Colab
:width: 200px
:target: https://nvda.ws/rapids-cudf

Take the cuDF backend for Polars for a test-drive in a free GPU-enabled notebook environment using your Google account by `launching on Colab <TBD>`_
Take the cuDF backend for Polars for a test-drive in a free GPU-enabled notebook environment using your Google account by `launching on Colab <TBD>`_

0 comments on commit 093ce0c

Please sign in to comment.