Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[CodeGenC] Handle GlobalVar callee as internal function call" #15725

Merged
merged 1 commit into from Sep 12, 2023

Conversation

junrushao
Copy link
Member

This PR temporarily reverts a recent change that breaks the Metal backend. Happy to get this commit back once the codegen is fixed.

Reverts #15103

@junrushao
Copy link
Member Author

Related discussion: #15103 (comment).

CC: @Lunderberg @MasterJH5574

@junrushao junrushao marked this pull request as ready for review September 12, 2023 00:37
@MasterJH5574
Copy link
Contributor

Thank you @junrushao! @Lunderberg I’m sorry for this. Please help take a look at the issue!

@junrushao junrushao force-pushed the revert-15103-codegen_c_support_subroutine_calls branch from 2902c10 to cf1766c Compare September 12, 2023 04:20
@csullivan
Copy link
Contributor

Prior to merging I would request that we please include a test or otherwise link to a test that fails so that there is something semi-minimal for which can be used to support the desired use case and prevent the breakage in the future.

@junrushao
Copy link
Member Author

Agreed @csullivan. Given it's a codegen test, it's a bit challenging though to have a minimal test if we don't have unittest infra that could potentially access Metal-capable devices. As suggested by @MasterJH5574 in the prior thread, how about using tests in tests/python/unittest/test_allreduce_cuda.py for Metal? They are around 10-15 lines of code in core.

@junrushao junrushao force-pushed the revert-15103-codegen_c_support_subroutine_calls branch from cf1766c to 45eb402 Compare September 12, 2023 15:36
@MasterJH5574 MasterJH5574 merged commit e88d0d4 into main Sep 12, 2023
17 checks passed
Lunderberg added a commit to Lunderberg/tvm that referenced this pull request Sep 14, 2023
As a first step to addressing the Metal codegen errors that required
the reversion in apache#15725,
parametrizing the unit tests for `allreduce`.  While these tests are
parametrized with `@tvm.testing.parametrize_targets("cuda", "metal")`,
the automatic `tvm.testing.requires_metal` marker inserted for the
metal parametrization will cause them to be skipped if the metal
runtime is unavailable, which includes the current CI.
Hzfengsy pushed a commit that referenced this pull request Sep 15, 2023
* [UnitTest][Metal] Parametrize allreduce GPU tests

As a first step to addressing the Metal codegen errors that required
the reversion in #15725,
parametrizing the unit tests for `allreduce`.  While these tests are
parametrized with `@tvm.testing.parametrize_targets("cuda", "metal")`,
the automatic `tvm.testing.requires_metal` marker inserted for the
metal parametrization will cause them to be skipped if the metal
runtime is unavailable, which includes the current CI.

* Updated filename, device used when testing on metal
@junrushao junrushao deleted the revert-15103-codegen_c_support_subroutine_calls branch September 23, 2023 23:16
Lunderberg added a commit to Lunderberg/tvm that referenced this pull request Sep 27, 2023
This reverts commit
[`e88d0d`](apache#15725), which
itself reverted
[`9ff71f`](apache#15103) for
breakages on the metal backend.  Now that the CI contains
compile-time testing of the metal codegen, the original
breakage should be identifiable.
csullivan pushed a commit that referenced this pull request Oct 18, 2023
…15835)

* [CodeGenC][Redo] Handle GlobalVar callee as internal function call

This reverts commit
[`e88d0d`](#15725), which
itself reverted
[`9ff71f`](#15103) for
breakages on the metal backend.  Now that the CI contains
compile-time testing of the metal codegen, the original
breakage should be identifiable.

* Added codegen metal CI debug print

* Print function decl to the argument stream

* Remove the codegen metal CI debug print-outs
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.

None yet

3 participants