Skip to content

Add fix & tests for new mapreduce_scalar bypass - #78

Merged
kshyatt merged 5 commits into
mainfrom
ksh/scalar
Jul 27, 2026
Merged

Add fix & tests for new mapreduce_scalar bypass#78
kshyatt merged 5 commits into
mainfrom
ksh/scalar

Conversation

@kshyatt

@kshyatt kshyatt commented Jul 27, 2026

Copy link
Copy Markdown
Member

Adds a test that was needed but not added to #76, which currently fails. Once this starts working on AMD, TensorKit.jl should un-break.

@kshyatt
kshyatt requested a review from lkdvos July 27, 2026 09:07
@kshyatt kshyatt changed the title Add tests for new mapreduce_scalar bypass Add fix & tests for new mapreduce_scalar bypass Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
ext/StridedGPUArraysExt.jl 92.20% <100.00%> (+4.14%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kshyatt
kshyatt requested a review from Jutho July 27, 2026 10:16
@lkdvos

lkdvos commented Jul 27, 2026

Copy link
Copy Markdown
Member

Do you know if there is any point in trying to schedule the kernel on the GPU and only afterwards doing the scalar indexing on the output? Or am I misreading this

@kshyatt

kshyatt commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Which kernel do you mean?

out = arrays[1]
iout = ParentIndex(Strided.offset(out) + 1)
@allowscalar begin
v = f(map(a -> a[ParentIndex(Strided.offset(a) + 1)], Base.tail(arrays))...)

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.

@kshyatt I meant here, since if I understand this correctly this is effectively just first bringing everything to the CPU, and then computing f? I'm not sure it really matters to be honest, since I don't think you ever want to end up in this situation and need it to be performant to begin with

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah I think it doesn't matter either way, this was only being triggered for AMD because I think cuTENSOR bypasses this. But it was getting picked up by one of the amd/planar tests for a previous issue, so there is a way to reach this code.

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

do you want to immediately bump the version as well?

@kshyatt

kshyatt commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Yeah let's, I'll do so now

Bump patch version
@kshyatt
kshyatt enabled auto-merge (squash) July 27, 2026 13:45
@kshyatt
kshyatt merged commit bd6f5d2 into main Jul 27, 2026
8 of 12 checks passed
@kshyatt
kshyatt deleted the ksh/scalar branch July 27, 2026 14: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.

2 participants