Skip to content

Conversation

@giordano
Copy link
Member

@giordano giordano commented Mar 8, 2025

No description provided.

@giordano giordano force-pushed the mg/error-large-constant branch from ac0b1c9 to 6374b72 Compare March 8, 2025 21:51
src/Ops.jl Outdated
@noinline function constant(
x::DenseArray{T,N}; location=mlir_stacktrace("constant", @__FILE__, @__LINE__)
) where {T,N}
sizeof(x) > LARGE_CONSTANT_THRESHOLD[] || error("""
Copy link
Member

Choose a reason for hiding this comment

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

Probably you want lebngth not sizeof

Copy link
Member Author

Choose a reason for hiding this comment

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

sizeof gives the size in bytes, length would be type-dependent, I thought the former would be more interesting.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah fair enough, from other projects I just have too many eltypes that may not have a defined size, but here we need to have that

@giordano giordano marked this pull request as ready for review March 9, 2025 03:08
@giordano giordano force-pushed the mg/error-large-constant branch 2 times, most recently from 8f57652 to c34dd36 Compare March 9, 2025 13:15
@giordano giordano requested a review from wsmoses March 9, 2025 13:17
@giordano giordano force-pushed the mg/error-large-constant branch from c34dd36 to 854dbb2 Compare March 9, 2025 13:37
@giordano giordano force-pushed the mg/error-large-constant branch from 854dbb2 to a0d3d44 Compare March 11, 2025 22:08
@wsmoses wsmoses merged commit 6133fde into main Mar 12, 2025
55 of 56 checks passed
@wsmoses wsmoses deleted the mg/error-large-constant branch March 12, 2025 05:32
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.

3 participants