Skip to content

Tylera/gtc 2025 tutorials#900

Merged
cliffburdick merged 107 commits intomainfrom
tylera/gtc_2025_tutorials
Jan 27, 2026
Merged

Tylera/gtc 2025 tutorials#900
cliffburdick merged 107 commits intomainfrom
tylera/gtc_2025_tutorials

Conversation

@cliffburdick
Copy link
Collaborator

No description provided.

tylera-nvidia and others added 30 commits January 24, 2025 05:57
@copy-pr-bot
Copy link

copy-pr-bot bot commented Jan 26, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cliffburdick
Copy link
Collaborator Author

/build

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 26, 2026

Greptile Overview

Greptile Summary

This PR adds comprehensive GTC 2025 tutorial materials for MatX, including three new lab notebooks covering introduction, kernel fusion, and profiling topics. The changes reorganize the tutorial structure to support in-notebook execution via a new IPython extension (run_matx.py) that compiles and runs MatX code directly in Jupyter cells.

Major Changes

  • New Tutorial Infrastructure: Added run_matx.py IPython extension enabling inline MatX code execution in notebooks with compilation progress indicators
  • GTC Lab Notebooks: Created three tutorial notebooks (01_lab_intro.ipynb, 02_lab_fusion.ipynb, 03_lab_profiling.ipynb) with exercises and solutions
  • Sample Programs: Added kernel_fusion.cu and simple_radar_pipeline.cu examples demonstrating NVTX profiling and performance optimization
  • Docker Updates: Modified lab.Dockerfile to use internal GitLab base image and reorganized setup steps
  • Exercise Cleanup: Removed 35 standalone exercise files, consolidating exercises into notebooks

Issues Found

  • Critical: Both kernel_fusion.cu files contain duplicate MATX_EXIT_HANDLER() calls (lines 44-45) that will cause double-cleanup
  • Repository Hygiene: Compiled binaries (10MB total) and .nsys-rep files committed to git should be generated during setup instead
  • Docker Image: Using internal NVIDIA GitLab registry instead of public image may limit external usability

The tutorial content is well-structured with clear progression from basics to advanced topics, comprehensive NVTX instrumentation for profiling, and practical radar signal processing examples.

Confidence Score: 3/5

  • Safe to merge after fixing duplicate MATX_EXIT_HANDLER() calls in kernel_fusion.cu files
  • Score reflects one critical syntax error (duplicate exit handler) that must be fixed, plus repository hygiene concerns about committed binaries that should ideally be addressed
  • kernel_fusion.cu files require immediate fixes for duplicate MATX_EXIT_HANDLER() calls; consider removing compiled binaries from git

Important Files Changed

Filename Overview
docs_input/notebooks/gtc_lab/samples/kernel_fusion.cu Example demonstrating kernel fusion with NVTX markers - has duplicate MATX_EXIT_HANDLER() call
examples/kernel_fusion.cu Added kernel fusion example - has duplicate MATX_EXIT_HANDLER() call
docker/dli_lab/lab.Dockerfile Updated to use internal GitLab base image and reorganized installation steps
docs_input/notebooks/gtc_lab/samples/simple_radar_pipeline.cu New radar pipeline example with multi-stage processing and NVTX profiling
docs_input/notebooks/scripts/run_matx.py New IPython extension for compiling and running MatX code in Jupyter notebooks

Sequence Diagram

sequenceDiagram
    participant User
    participant JupyterNotebook
    participant RunMatxExtension
    participant NVCC
    participant CompiledBinary
    participant GPU

    User->>JupyterNotebook: Start GTC Lab Tutorial
    JupyterNotebook->>User: Load 01_lab_intro.ipynb
    
    User->>JupyterNotebook: Execute %%run_matx cell
    JupyterNotebook->>RunMatxExtension: Pass MatX code
    RunMatxExtension->>RunMatxExtension: Wrap code in main()
    RunMatxExtension->>RunMatxExtension: Write to /tmp/output.cu
    RunMatxExtension->>NVCC: Compile with nvcc
    NVCC->>CompiledBinary: Generate /tmp/output
    CompiledBinary->>GPU: Execute on GPU
    GPU->>CompiledBinary: Return results
    CompiledBinary->>RunMatxExtension: stdout/stderr
    RunMatxExtension->>JupyterNotebook: Display output
    JupyterNotebook->>User: Show results
    
    User->>JupyterNotebook: Progress to 02_lab_fusion.ipynb
    User->>JupyterNotebook: Run kernel_fusion sample
    JupyterNotebook->>CompiledBinary: Execute pre-built binary
    CompiledBinary->>GPU: Run unfused kernels
    GPU->>CompiledBinary: Measure performance
    CompiledBinary->>GPU: Run fused operation
    GPU->>CompiledBinary: Measure performance
    CompiledBinary->>User: Compare results
    
    User->>JupyterNotebook: Progress to 03_lab_profiling.ipynb
    User->>JupyterNotebook: Profile simple_radar_pipeline
    JupyterNotebook->>CompiledBinary: Run with NVTX markers
    CompiledBinary->>GPU: Execute radar pipeline stages
    Note over CompiledBinary,GPU: PulseCompression<br/>ThreePulseCanceller<br/>DopplerProcessing<br/>CFARDetections
    GPU->>CompiledBinary: Performance data
    CompiledBinary->>User: Display profiling results
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

cliffburdick and others added 3 commits January 27, 2026 11:02
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 27, 2026

Additional Comments (2)

docs_input/notebooks/gtc_lab/samples/kernel_fusion
compiled binary executable (~2.5 MB) committed - add to .gitignore and remove from repo


docs_input/notebooks/gtc_lab/samples/simple_radar_pipeline
compiled binary executable (~7.6 MB) committed - add to .gitignore and remove from repo

cliffburdick and others added 2 commits January 27, 2026 11:08
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@cliffburdick cliffburdick merged commit 33ccb68 into main Jan 27, 2026
@cliffburdick cliffburdick deleted the tylera/gtc_2025_tutorials branch January 27, 2026 19:09
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 files reviewed, 6 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +44 to +45
MATX_EXIT_HANDLER();
MATX_EXIT_HANDLER();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate MATX_EXIT_HANDLER() call on lines 44-45

Suggested change
MATX_EXIT_HANDLER();
MATX_EXIT_HANDLER();
MATX_EXIT_HANDLER();
}

Comment on lines +44 to +45
MATX_EXIT_HANDLER();
MATX_EXIT_HANDLER();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate MATX_EXIT_HANDLER() call on lines 44-45

Suggested change
MATX_EXIT_HANDLER();
MATX_EXIT_HANDLER();
MATX_EXIT_HANDLER();
}



#FROM ghcr.io/nvidia/matx/production:latest AS devel
FROM gitlab-master.nvidia.com:5005/devtech-compute/sigx-group/container/build:12.8_x86_64_ubuntu22.04-amd64 AS devel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using internal NVIDIA GitLab registry instead of public image - verify this is intended for external use

stderr_thread.join()
stdout_thread.join()

cur_line = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resetting cur_line = 0 after process completion has no effect - this variable goes out of scope immediately after

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 27, 2026

Additional Comments (2)

docs_input/notebooks/gtc_lab/samples/kernel_fusion
committing compiled binary (2.4M) to git - these should typically be built during setup, not committed to version control


docs_input/notebooks/gtc_lab/samples/simple_radar_pipeline
committing compiled binary (7.3M) to git - these should typically be built during setup, not committed to version control

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants