weld icon indicating copy to clipboard operation
weld copied to clipboard

Merger on structs not supported

Open radujica opened this issue 7 years ago • 7 comments

Running the following in the repl: || let b = merger[{i64, i32}, +]; merge(b, {1L, 2})

returns: REPL: Compile error: Unsupported identity for binary op: + on {i64,i32}

radujica avatar Apr 05 '18 14:04 radujica

Update These seem to work:

|| let b = dictmerger[i64, {i32, f64}, +]; merge(b, {2L, {2, 2.0}})
|| let b = dictmerger[{f32, i64}, {i32, f64}, +]; merge(b, {{2f, 3L}, {2, 2.0}})

But this still gives the error above:

|| let b = merger[{i64, i32}, +]; merge(b, {1L, 2})

radujica avatar Apr 10 '18 09:04 radujica

I'll add support for this shortly! As you'd pointed out, the issue is with binop_identity not supporting structs at the moment, and only mergers require an identity element.

On Tue, Apr 10, 2018 at 2:17 AM, Radu [email protected] wrote:

Update These seem to work:

|| let b = dictmerger[i64, {i32, f64}, +]; merge(b, {2L, {2, 2.0}}) || let b = dictmerger[{f32, i64}, {i32, f64}, +]; merge(b, {{2f, 3L}, {2, 2.0}})

But this still gives the error above:

|| let b = merger[{i64, i32}, +]; merge(b, {1L, 2})

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/weld-project/weld/issues/336#issuecomment-380031749, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTCY9OW1kp8jfOhvzXJRa3ZgKPClDhvks5tnHiVgaJpZM4TImMP .

-- Shoumik

sppalkia avatar Apr 11 '18 05:04 sppalkia

Any updates?

radujica avatar Apr 30 '18 07:04 radujica

Hey Radu,

I’m actually working toward a paper deadline (OSDI, it’s this Thursday), so I’ll look into this right after. Apologies for the delay!

On Mon, Apr 30, 2018 at 12:21 AM Radu [email protected] wrote:

Any updates?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/weld-project/weld/issues/336#issuecomment-385327512, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTCY03kFLf8W3YHeGHWMFIRXIyKmIq-ks5ttrtfgaJpZM4TImMP .

-- Shoumik

sppalkia avatar Apr 30 '18 08:04 sppalkia

Any updates on this?

radujica avatar May 30 '18 21:05 radujica

Looking at it today!

sppalkia avatar Jun 04 '18 18:06 sppalkia

Hey Radu,

I've started working on this, but we're actually overhauling the codegen to make it perform better overall, so the ETA on this is a couple weeks.

Shoumik

On Wed, May 30, 2018 at 2:38 PM Radu [email protected] wrote:

Any updates on this?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/weld-project/weld/issues/336#issuecomment-393328247, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTCY8ew-eGy4iU2f4SbmqYk4otFiYzpks5t3xFlgaJpZM4TImMP .

-- Shoumik

sppalkia avatar Jun 16 '18 19:06 sppalkia