Skip to content

[RUNTIME][FFI][BUGFIX] Fix cython FFI compact with np.int64 - #6321

Merged
tqchen merged 1 commit into
apache:masterfrom
tqchen:ptrtype
Aug 22, 2020
Merged

tqchen merged 1 commit into
apache:masterfrom
tqchen:ptrtype

Conversation

@tqchen

@tqchen tqchen commented Aug 21, 2020 •

Copy link
Copy Markdown
Member

Previously np.int64 was not subclass of int, long, but get categorized as a subclass of Number.
The too big value get converted to a double, which causes underflow when converting back to integer.

@tqchen tqchen changed the title [RUNTIME][FFI] Fix cython FFI compact with np.int64 [RUNTIME][FFI][BUGFIX] Fix cython FFI compact with np.int64 Aug 21, 2020
@tqchen

tqchen commented Aug 21, 2020

Copy link
Copy Markdown
Member Author

cc @mbrookhart @ZihengJiang @yzhliu

@mbrookhart mbrookhart left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thank you!

@junrushao junrushao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a really interesting finding! Thanks @mbrookhart @tqchen!

@tqchen
tqchen merged commit f34e3a8 into apache:master Aug 22, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Sep 2, 2020
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 3, 2020
@tqchen
tqchen deleted the ptrtype branch February 26, 2023 13:54
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