Skip to main content

DLIO Profiler Build and Test Coverage Status Documentation Status

DLIO Profiler v0.0.7

A multi-level profiler for capturing application functions and low-level system I/O calls from deep learning workloads.

Requirements for profiler

  1. Python > 3.7
  2. pybind11

Requirements for analyzer

  1. bokeh>=2.4.2
  2. pybind11
  3. zindex_py
  4. pandas>=2.0.3
  5. dask>=2023.5.0
  6. distributed
  7. numpy>=1.24.3
  8. pyarrow>=12.0.1
  9. rich>=13.6.0
  10. python-intervals>=1.10.0.post1
  11. matplotlib>=3.7.3

Build DLIO Profiler with pip

Users can easily install DLIO profiler using pip. This is the way most python packages are installed. This method would work for both native python environments and conda environments.

From source

    git clone git@github.com:hariharan-devarajan/dlio-profiler.git
    cd dlio-profiler
    # You can skip this for installing the dev branch.
    # for latest stable version use master branch.
    git checkout tags/<Release> -b <Release>
    pip install .

From Github

DLP_VERSION=dev
pip install git+https://github.com/hariharan-devarajan/dlio-profiler.git@${DLP_VERSION}

For more build instructions check here

Usage

    from dlio_profiler.logger import dlio_logger, fn_interceptor
    log_inst = dlio_logger.initialize_log(logfile=None, data_dir=None, process_id=-1)
    dlio_log = fn_interceptor("COMPUTE")

    # Example of using function decorators
    @dlio_log.log
    def log_events(index):
        sleep(1)

    # Example of function spawning and implicit I/O calls
    def posix_calls(val):
        index, is_spawn = val
        path = f"{cwd}/data/demofile{index}.txt"
        f = open(path, "w+")
        f.write("Now the file has more content!")
        f.close()
        if is_spawn:
            print(f"Calling spawn on {index} with pid {os.getpid()}")
            log_inst.finalize() # This need to be called to correctly finalize DLIO Profiler.
        else:
            print(f"Not calling spawn on {index} with pid {os.getpid()}")

    # NPZ calls internally calls POSIX calls.
    def npz_calls(index):
        # print(f"{cwd}/data/demofile2.npz")
        path = f"{cwd}/data/demofile{index}.npz"
        if os.path.exists(path):
            os.remove(path)
        records = np.random.randint(255, size=(8, 8, 1024), dtype=np.uint8)
        record_labels = [0] * 1024
        np.savez(path, x=records, y=record_labels)

    def main():
        log_events(0)
        npz_calls(1)
        with get_context('spawn').Pool(1, initializer=init) as pool:
            pool.map(posix_calls, ((2, True),))
        log_inst.finalize()


    if __name__ == "__main__":
        main()

For this example, as the DLIO_PROFILER_CPP_INIT do not pass log file or data dir, we need to set DLIO_PROFILER_LOG_FILE and DLIO_PROFILER_DATA_DIR. By default the DLIO Profiler mode is set to FUNCTION. Example of running this configurations are:


    # the process id, app_name and .pfw will be appended by the profiler for each app and process.
    # name of final log file is ~/log_file-<APP_NAME>-<PID>.pfw
    DLIO_PROFILER_LOG_FILE=~/log_file
    # Colon separated paths for including for profiler
    DLIO_PROFILER_DATA_DIR=/dev/shm/:/p/gpfs1/$USER/dataset:$PWD/data
    # Enable profiler
    DLIO_PROFILER_ENABLE=1

For more example check Examples.

Metadata

Release files for dlio-profiler-py 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dlio-profiler-py 0.0.7
File Size Uploaded Provenance Actions
dlio_profiler_py-0.0.7.tar.gz 4.4 MB Without provenance Details for dlio_profiler_py-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dlio-profiler-py 0.0.7
File Interpreter ABI Platform Actions
dlio_profiler_py-0.0.7-cp39-cp39-manylinux_2_24_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.24+ x86-64 Details for dlio_profiler_py-0.0.7-cp39-cp39-manylinux_2_24_x86_64.whl

Total release size: 6.5 MB

Release files / dlio_profiler_py-0.0.7.tar.gz

Download URL dlio_profiler_py-0.0.7.tar.gz
Size 4.4 MB
Tags Source
SHA-256 checksum
How to use checksums
7f9670468d61c1933d30ab0d564f4126fe5b1d2e50a77c464c3f97aef6d8833e
BLAKE2b-256 checksum
How to use checksums
63e1e90cb0d1975c378947f8d2fe1eddab09bbe5b58ead233473b83e00d9236e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.12

Release files / dlio_profiler_py-0.0.7-cp39-cp39-manylinux_2_24_x86_64.whl

Download URL dlio_profiler_py-0.0.7-cp39-cp39-manylinux_2_24_x86_64.whl
Size 2.1 MB
Tags CPython 3.9 Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
07bc7e5b54418b271821c83b8cfebd25683277df911162c428e528229e55c249
BLAKE2b-256 checksum
How to use checksums
5861197a047f5a0784a0459391d172404bdbcf0b04a26a81dca99245df3a6c62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.12

Security for dlio-profiler-py 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page