Skip to content

Conversation

@HLearning
Copy link
Contributor

fix relay frontend pytorch op: addmm
calculation formula error.

bug:
out = input + alpha * beta * mat1 @ mat2

fix bug:
out = beta * input + alpha * mat1 @ mat2

fix relay frontend pytorch op: addmm
calculation formula error.

bug: 
out = input + alpha * beta * mat1 @ mat2

fix bug:
out = beta * input + alpha * mat1 @ mat2
@tvm-bot
Copy link
Collaborator

tvm-bot commented Jul 12, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

@HLearning HLearning changed the title [bug][relay] Update pytorch op addmm [Bug][Relay] Update pytorch op addmm Jul 12, 2023
@HLearning HLearning changed the title [Bug][Relay] Update pytorch op addmm [Bug][Relay] fix relay frontend pytorch op addmm bug Jul 12, 2023
@HLearning
Copy link
Contributor Author

@yelite

@HLearning
Copy link
Contributor Author

@shingjan @Hzfengsy

@Hzfengsy
Copy link
Member

Please add a regression test for it

@HLearning
Copy link
Contributor Author

Please add a regression test for it

ok

Copy link
Member

@jikechao jikechao left a comment

Choose a reason for hiding this comment

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

Thanks for your PR, LGTM!

Please correct the code style according to the CI error: https://ci.tlcpack.ai/blue/organizations/jenkins/tvm-lint/detail/PR-15294/4/pipeline

@HLearning
Copy link
Contributor Author

https://ci.tlcpack.ai/blue/organizations/jenkins/tvm-lint/detail/PR-15294/5/artifacts

I don't know what the reason for his mistake is, and I don't know how to modify it。
I hope your can help me
@jikechao @Hzfengsy

@HLearning
Copy link
Contributor Author

---------Error Log----------
[2023-07-14T19:17:09.367Z] + cat /tmp/5893.logclean.txt
[2023-07-14T19:17:09.367Z] ----------------------------
[2023-07-14T19:17:09.367Z] + echo ----------------------------
[2023-07-14T19:17:09.367Z] + grep --quiet -E 'warning|error'
[2023-07-14T19:17:09.367Z] + cleanup
[2023-07-14T19:17:09.367Z] + rm -f /tmp/5893.log.txt /tmp/5893.logclean.txt
[2023-07-14T19:17:09.367Z] Checking ASF license headers...
[2023-07-14T19:17:09.367Z] + echo 'Checking ASF license headers...'
[2023-07-14T19:17:09.367Z] + tests/lint/check_asf_header.sh --local
[2023-07-14T19:17:12.651Z] NOTE: --local flag present, filtering untracked files
[2023-07-14T19:17:13.217Z] No files violate ASF header check
[2023-07-14T19:17:13.217Z] Linting the C++ code...
[2023-07-14T19:17:13.217Z] + echo 'Linting the C++ code...'
[2023-07-14T19:17:13.217Z] + tests/lint/cpplint.sh
[2023-07-14T19:17:13.217Z] Running 2 cpplints (VTA and TVM)...
[2023-07-14T19:17:13.217Z] All passed!
[2023-07-14T19:19:04.666Z] =====619/619 cpp-header files passed check=====
[2023-07-14T19:19:04.666Z] =====923/923 cpp-source files passed check=====
[2023-07-14T19:19:04.666Z] All passed!
[2023-07-14T19:19:04.666Z] + echo 'clang-format check...'
[2023-07-14T19:19:04.666Z] + tests/lint/git-clang-format.sh
[2023-07-14T19:19:04.666Z] clang-format check...
[2023-07-14T19:19:04.666Z] Ubuntu clang-format version 15.0.7
[2023-07-14T19:19:04.666Z] Running git-clang-format against all C++ files
[2023-07-14T19:19:51.337Z] 
[2023-07-14T19:19:51.337Z] ---------clang-format log----------
[2023-07-14T19:19:51.337Z] clang-format did not modify any files
[2023-07-14T19:19:51.337Z] Rust check...
[2023-07-14T19:19:51.337Z] + echo 'Rust check...'
[2023-07-14T19:19:51.337Z] + tests/lint/rust_format.sh
[2023-07-14T19:19:51.337Z] Docker check...
[2023-07-14T19:19:51.337Z] + echo 'Docker check...'
[2023-07-14T19:19:51.337Z] + tests/lint/docker-format.sh
[2023-07-14T19:19:51.337Z] + cleanup
[2023-07-14T19:19:51.337Z] + rm -rf '/tmp/3764.*'
[2023-07-14T19:19:51.345Z] [Pipeline] }
[2023-07-14T19:19:51.359Z] [Pipeline] // withEnv
[2023-07-14T19:19:51.365Z] [Pipeline] }
[2023-07-14T19:19:51.379Z] [Pipeline] // timeout
[2023-07-14T19:19:51.385Z] [Pipeline] }
[2023-07-14T19:19:51.399Z] [Pipeline] // ws
[2023-07-14T19:19:51.404Z] [Pipeline] }
[2023-07-14T19:19:51.423Z] [Pipeline] // node
[2023-07-14T19:19:51.427Z] [Pipeline] }
[2023-07-14T19:19:51.445Z] [Pipeline] // parallel
[2023-07-14T19:19:51.453Z] [Pipeline] }
[2023-07-14T19:19:51.466Z] [Pipeline] // stage
[2023-07-14T19:19:51.476Z] [Pipeline] End of Pipeline
[2023-07-14T19:19:51.498Z] ERROR: script returned exit code 1
[2023-07-14T19:19:52.450Z] 
[2023-07-14T19:19:52.451Z] GitHub has been notified of this commit’s build result
[2023-07-14T19:19:52.451Z] 
[2023-07-14T19:19:52.869Z] Finished: FAILURE

@jikechao
Copy link
Member

Change the code format as follows:


[2023-07-14T19:08:15.007Z]  @tvm.testing.uses_gpu

[2023-07-14T19:08:15.007Z]  def test_addmm():

[2023-07-14T19:08:15.007Z]      def test_fn(alpha, beta):

[2023-07-14T19:08:15.007Z] -        return lambda inp, batch1, batch2: torch.addmm(

[2023-07-14T19:08:15.007Z] -            inp, batch1, batch2, beta=beta, alpha=alpha

[2023-07-14T19:08:15.007Z] -        )

[2023-07-14T19:08:15.007Z] +        return lambda inp, batch1, batch2: torch.addmm(inp, batch1, batch2, beta=beta, alpha=alpha)

@HLearning HLearning requested a review from jikechao July 16, 2023 09:26
@HLearning
Copy link
Contributor Author

@jikechao 3Q

@HLearning
Copy link
Contributor Author

requests merge into main. @Hzfengsy @jikechao

@Hzfengsy Hzfengsy merged commit ab75b58 into apache:main Jul 20, 2023
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.

4 participants