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

[RUNTIME][FFI][BUGFIX] Fix cython FFI compact with np.int64#6321
tqchen merged 1 commit into
apache:masterfrom
tqchen:ptrtype

Conversation

@tqchen

@tqchentqchen 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.

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

Copy link
Copy Markdown
MemberAuthor

@mbrookhartmbrookhart 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!

@mbrookhartmbrookhart mentioned this pull request Aug 21, 2020

@junrushaojunrushao 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:masterAug 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 freeto 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

@tqchen@mbrookhart@ZihengJiang@junrushao