A GPU-accelerated grep tool built with cuDF.
Project description
PyCuGrep
PyCuGrep is a Python package that provides a GPU-accelerated grep utility, leveraging the power of NVIDIA GPUs and the cuDF library from RAPIDS. It's designed for rapidly searching large text files or datasets by offloading the pattern matching to the GPU, significantly speeding up operations compared to traditional CPU-based grep for suitable workloads.
Features
- GPU Accelerated: Utilizes cuDF for high-performance string matching on NVIDIA GPUs.
- Regex Support: Supports standard regular expressions for flexible pattern matching.
- Case Insensitive Search: Option to perform case-insensitive searches.
- Invert Match: Find lines that do not match the pattern.
- Line Numbers: Display line numbers for matched (or non-matched) lines.
- Count Only: Only output the count of matching lines.
Installation
To install pycugrep, you'll need a system with an NVIDIA GPU and CUDA installed. It's recommended to install via pip:
pip install pycugrep
Usage
PyCuGrep can be used directly from the command line after installation:
cugrep [OPTIONS] PATTERN FILE...
Example: Basic search
cugrep "error" /path/to/logfile.txt
Example: Case-insensitive search across multiple files
cugrep -i "warning" file1.txt file2.txt
Example: Count only, inverted match
cugrep -c -v "success" all_logs.txt
For more details on available options, run cugrep --help.
Development
For local development, after cloning the repository, navigate to the python/ directory and install in editable mode:
cd cugrep/python
pip install -e .
License
PyCuGrep is licensed under the Apache 2.0 License. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycugrep-0.1.2.tar.gz.
File metadata
- Download URL: pycugrep-0.1.2.tar.gz
- Upload date:
- Size: 94.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6028ae009359a356fe6732f0d8ca05166b7fca4b6f977549ebbd62fe2cbd7943
|
|
| MD5 |
f475cee9ede5709da5a1bb22c233d141
|
|
| BLAKE2b-256 |
d80fc1a056a58f74012b181dcf8a5a162ba9ff9922773645ea8014f890258a62
|
Provenance
The following attestation bundles were made for pycugrep-0.1.2.tar.gz:
Publisher:
pypi_release.yml on loghijiaha/cugrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycugrep-0.1.2.tar.gz -
Subject digest:
6028ae009359a356fe6732f0d8ca05166b7fca4b6f977549ebbd62fe2cbd7943 - Sigstore transparency entry: 1060761482
- Sigstore integration time:
-
Permalink:
loghijiaha/cugrep@0f0dd76067dabeb5605232ab09e8d88e9e78d66a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/loghijiaha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_release.yml@0f0dd76067dabeb5605232ab09e8d88e9e78d66a -
Trigger Event:
push
-
Statement type:
File details
Details for the file pycugrep-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pycugrep-0.1.2-py3-none-any.whl
- Upload date:
- Size: 93.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e2c54d802fdc4d530df68206754c3d35bbb3efb4836f4051ddfbd6cb8541569
|
|
| MD5 |
b94aa723467362b8e6e0cf2a3d7795dc
|
|
| BLAKE2b-256 |
9b4b8ac439659dd7ef163e6daa5dbdd17cfdedecc2cd642ff93299e2a6e74be1
|
Provenance
The following attestation bundles were made for pycugrep-0.1.2-py3-none-any.whl:
Publisher:
pypi_release.yml on loghijiaha/cugrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycugrep-0.1.2-py3-none-any.whl -
Subject digest:
9e2c54d802fdc4d530df68206754c3d35bbb3efb4836f4051ddfbd6cb8541569 - Sigstore transparency entry: 1060761543
- Sigstore integration time:
-
Permalink:
loghijiaha/cugrep@0f0dd76067dabeb5605232ab09e8d88e9e78d66a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/loghijiaha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_release.yml@0f0dd76067dabeb5605232ab09e8d88e9e78d66a -
Trigger Event:
push
-
Statement type: