Skip to content

Conversation

@Lunderberg
Copy link
Contributor

Prior to this commit, ModuleGetFunction returned zero if called with an incorrect number of arguments, or with incorrect type codes. This incorrectly indicated that the module was inspected, and did not contain the requested function.

This commit corrects the implementation of ModuleGetFunction to instead call set an error message with TVMAPISetLastError, then to return an appropriate error code.

Prior to this commit, `ModuleGetFunction` returned zero if called with
an incorrect number of arguments, or with incorrect type codes.  This
incorrectly indicated that the module was inspected, and did not
contain the requested function.

This commit corrects the implementation of `ModuleGetFunction` to
instead call set an error message with `TVMAPISetLastError`, then to
return an appropriate error code.
@Lunderberg
Copy link
Contributor Author

This change is split out from #16183 as an independent change for ease of review.

Copy link
Member

@yongwww yongwww left a comment

Choose a reason for hiding this comment

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

lgtm

@Lunderberg Lunderberg merged commit 9a7b148 into apache:main Jun 18, 2024
@Lunderberg Lunderberg deleted the bugfix_crt_error_code_from_modulegetfunction branch June 18, 2024 18:28
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