Skip to content

Instantly share code, notes, and snippets.

(cudf-polars-bench) root@gpu-h100-0161:/app# for query in {1..22}; do
> nsys profile \
> -o "/data/profiles/rapidsmpf.q$query.1k" -f true \
> --trace=nvtx,cuda \
> --nvtx-domain-exclude=CCCL,rapidsmpf,libkvikio \
> --cuda-memory-usage=true \
> python -m cudf_polars.experimental.benchmarks.pdsh \
> --executor="streaming" \
> --runtime="rapidsmpf" \
> --path="/data/tpch-rs/scale-1000" \
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Benchmark Results Explorer</title>
<link href="https://unpkg.com/tabulator-tables@6.2.5/dist/css/tabulator.min.css" rel="stylesheet">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
root@gpu-h100-0261:/app# export TERM=linux
root@gpu-h100-0261:/app# unset UCX_NET_DEVICES
root@gpu-h100-0261:/app# export UCX_PROTO_ENABLE="y"
root@gpu-h100-0261:/app# export UCX_RNDV_PIPELINE_ERROR_HANDLING="y"
root@gpu-h100-0261:/app# export UCX_MAX_RNDV_RAILS="1"
root@gpu-h100-0261:/app# export DASK_DISTRIBUTED__COMM__TIMEOUTS__CONNECT="300"
root@gpu-h100-0261:/app# export DASK_DISTRIBUTED__COMM__UCX__CONNECT_TIMEOUT="300"
root@gpu-h100-0261:/app#
root@gpu-h100-0261:/app# . /app/.venv/bin/activate
(cudf-polars-bench) root@gpu-h100-0261:/app#
(cudf-polars-bench) root@gpu-h100-0468:/app# for query in {1..22}; do
> python -m cudf_polars.experimental.benchmarks.pdsh \
> --executor="streaming" \
> --runtime="rapidsmpf" \
> --path="/data/tpch-rs/scale-1000" \
> --suffix="" \
> --stream-policy="pool" \
> --n-workers 1 \
> --no-print-results \
> --no-summarize \
// -----------------------------------------------------------------------------
// Reproducer (translated from Python)
// -----------------------------------------------------------------------------
#include <cudf/column/column.hpp>
#include <cudf/column/column_factories.hpp>
#include <cudf/strings/contains.hpp>
#include <cudf/strings/regex/regex_program.hpp>
#include <cudf/strings/strings_column_view.hpp>
#include <cudf/types.hpp>
// -----------------------------------------------------------------------------
// Reproducer (translated from Python)
// -----------------------------------------------------------------------------
#include <cudf/column/column.hpp>
#include <cudf/column/column_factories.hpp>
#include <cudf/strings/contains.hpp>
#include <cudf/strings/regex/regex_program.hpp>
#include <cudf/strings/strings_column_view.hpp>
#include <cudf/types.hpp>
#!/usr/bin/env python3
"""
Stream-ordering race using CuPy with RMM's async memory resource.
This should trigger compute-sanitizer's stream-ordered race detection.
"""
import cupy as cp
import rmm.mr
from rmm.allocators.cupy import rmm_cupy_allocator
#!/usr/bin/env python3
"""
Convert cudf-polars traces from JSONL format to Chrome Tracing format.
Chrome Tracing format can be viewed in chrome://tracing or similar tools.
"""
import json
import sys
from pathlib import Path
"""
Outputs the following (parital) IR for query 3. Note the multiple `Select` nodes.
Sort(
schema={'l_orderkey': <DataType(polars=Int64, plc=<type_id.INT64: 4>)>, 'revenue': <DataType(polars=Float64, plc=<type_id.FLOAT64: 10>)>, 'o_orderdate': <DataType(polars=Datetime(time_unit='ms', time_zone=None), plc=<type_id.TIMESTAMP_MILLISECONDS: 14>)>, 'o_shippriority': <DataType(polars=Int32, plc=<type_id.INT32: 3>)>},
by=(NamedExpr(revenue, Col(<DataType(polars=Float64, plc=<type_id.FLOAT64: 10>)>, 'revenue')), NamedExpr(o_orderdate, Col(<DataType(polars=Datetime(time_unit='ms', time_zone=None), plc=<type_id.TIMESTAMP_MILLISECONDS: 14>)>, 'o_orderdate'))),
order=(<order.DESCENDING: 1>, <order.ASCENDING: 0>),
null_order=(<null_order.AFTER: 0>, <null_order.BEFORE: 1>),
stable=False,
zlice=(0, 10),
# /// script
# requires-python = ">=3.13"
# dependencies = [
# "dask-cuda",
# "kvikio-cu12",
# "nvidia-ml-py",
# "psutil",
# "rich",
# ]
# ///