Skip to content

Tutorial text improvements - #9348

Open
alexreinking wants to merge 11 commits into
mainfrom
alexreinking/tutorial-improvements
Open

Tutorial text improvements#9348
alexreinking wants to merge 11 commits into
mainfrom
alexreinking/tutorial-improvements

Conversation

@alexreinking

@alexreinking alexreinking commented Aug 16, 2026

Copy link
Copy Markdown
Member

See the commit descriptions for the changes I made. A few highlights:

  1. I audited all of the direct compiler invocations to make sure they work. All were misleading (e.g. you want -I to point to /path/to/include, not /path/to/Halide.h) and some were wrong (e.g. autoscheduler usage)
  2. I removed the advice to use the Makefile, which contradicts our README.
  3. I reworded some weirdly hostile language towards Apple's software.
  4. I dropped OpenMP in favor of std::thread because OpenMP isn't readily available on macOS.
  5. I changed the ancient SSE implementation in Lesson 9 to ARM Neon. I could have done AVX2, but it wasn't easy to test on my MBP (and Neon has the same register width anyway).

Breaking changes

None

Checklist

  • Tests added or updated (not required for docs, CI config, or typo fixes)
  • Documentation updated (if public API changed)
  • Python bindings updated (if public API changed)
  • Benchmarks are included here if the change is intended to affect performance.
  • Commits include AI attribution where applicable (see Code of Conduct)

Stack created with GitHub Stacks CLIGive Feedback 💬

@alexreinking

Copy link
Copy Markdown
Member Author

Ugh, nullglob strikes again.

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.02%. Comparing base (e3e0ca0) to head (f7367c2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9348      +/-   ##
==========================================
- Coverage   70.11%   70.02%   -0.09%     
==========================================
  Files         259      259              
  Lines       79135    79135              
  Branches    19286    19286              
==========================================
- Hits        55487    55417      -70     
- Misses      17880    17899      +19     
- Partials     5768     5819      +51     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread python_bindings/tutorial/lesson_04_debugging_2.py Outdated
@abadams

abadams commented Aug 16, 2026

Copy link
Copy Markdown
Member

Unfortunately the OpenMP replacement now reads like a bit of a strawman. Spinning up new threads just to run a single parallel loop is clearly going to be slow. It's not a convincing baseline.

@abadams

abadams commented Aug 16, 2026

Copy link
Copy Markdown
Member

Maybe we want std::for_each with a parallel execution policy?

@alexreinking

alexreinking commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

Maybe we want std::for_each with a parallel execution policy?

This doesn't work because Apple libc++ doesn't have std::execution::par. Even if you enable the API with -fexperimental-library, the runtime serializes it anyway.

Unfortunately the OpenMP replacement now reads like a bit of a strawman. Spinning up new threads just to run a single parallel loop is clearly going to be slow. It's not a convincing baseline.

The halide_thread_pool.h implementation works as well as OpenMP on my machine, so I used that.

@alexreinking
alexreinking force-pushed the alexreinking/tutorial-improvements branch 2 times, most recently from 64d47ce to 0b8ac09 Compare August 17, 2026 00:03
@alexreinking
alexreinking force-pushed the alexreinking/tutorial-improvements branch from 0b8ac09 to 1e0b3dc Compare August 17, 2026 04:40
@alexreinking
alexreinking changed the base branch from alexreinking/new-tutorial-site to main August 17, 2026 04:57
@alexreinking
alexreinking force-pushed the alexreinking/tutorial-improvements branch from 1e0b3dc to df70a20 Compare August 17, 2026 04:57
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.

2 participants