Skip to content

Disable example plugins on Windows#6281

Merged
whitneywhtsang merged 2 commits into
mainfrom
quinnlp/win-disable-plugins
Mar 6, 2026
Merged

Disable example plugins on Windows#6281
whitneywhtsang merged 2 commits into
mainfrom
quinnlp/win-disable-plugins

Conversation

@quinnlp
Copy link
Copy Markdown
Contributor

@quinnlp quinnlp commented Mar 5, 2026

We need to disable the example plugins on Windows in preparation for merging triton-lang/triton#9549 into our repo. Prior to triton-lang/triton#9549, the example plugin libraries build successfully with LLVM/MLIR's static libraries and the example plugin tests are guarded by not building against shared libs. Enabling Triton extensions/plugins on Windows is difficult: #6248 (comment).

This patch adds a CMake option TRITON_ENABLE_PLUGINS to enable/disable building the plugin libraries in example/plugins. It also adds a LIT config feature that reads the option to guard LIT tests that require the example plugin libraries. If the option is on, the example plugin libraries are built and the example plugin tests are enabled. If the option is off, the example plugin libraries are not built and the example plugin tests are skipped.

We require that TRITON_ENABLE_PLUGINS is set off to build on Windows. The default value of the option is OFF for Windows and ON otherwise.

New contributor declaration

  • I am not making a trivial change, such as fixing a typo in a comment.

  • I have written a PR description following these
    rules.

  • I have run pre-commit run --from-ref origin/main --to-ref HEAD.

  • Select one of the following.

    • I have added tests.
      • /test for lit tests
      • /unittest for C++ tests
      • /python/test for end-to-end tests
    • This PR does not need a test because it is a change to the CMake configuration.
  • Select one of the following.

    • I have not added any lit tests.
    • The lit tests I have added follow these best practices,
      including the "tests should be minimal" section. (Usually running Python code
      and using the instructions it generates is not minimal.)

@quinnlp
Copy link
Copy Markdown
Contributor Author

quinnlp commented Mar 5, 2026

There are many ways to solve this problem.

Here are some comments about how I am solving this:

  • If we don't like having a CMake option to enable/disable example plugins, then we can check if we are on Windows and explicitly enable/disable them based on that.
  • Are we ok with having a different default value for TRITON_ENABLE_PLUGINS based on if we are Windows or not? If we do not like this, we can either require that it is explicitly set off to build on Windows or turn the option off by default for all platforms.

Copy link
Copy Markdown
Contributor

@anmyachev anmyachev left a comment

Choose a reason for hiding this comment

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

LGTM! Please open an issue for enabling plugins on Windows if we don't have it already.

@whitneywhtsang whitneywhtsang merged commit 006159c into main Mar 6, 2026
17 checks passed
@whitneywhtsang whitneywhtsang deleted the quinnlp/win-disable-plugins branch March 6, 2026 16:47
@quinnlp
Copy link
Copy Markdown
Contributor Author

quinnlp commented Mar 6, 2026

LGTM! Please open an issue for enabling plugins on Windows if we don't have it already.

Thanks!

I just created an issue: #6291

quinnlp added a commit that referenced this pull request Mar 24, 2026
wdziurdz added a commit that referenced this pull request Apr 1, 2026
wdziurdz pushed a commit that referenced this pull request Apr 7, 2026
* src/main:
  Disable example plugins on Windows (#6281)
quinnlp added a commit that referenced this pull request Apr 27, 2026
quinnlp added a commit that referenced this pull request May 4, 2026
This reverts commit 006159c.

We do not need this patch anymore because
triton-lang/triton#9783 introduced a similar
build option (`TRITON_EXT_ENABLED`), which is OFF by default.
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