Speed up +/- of arrays on GPU

Open Beginner friendly
#83 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
julia
Domain
performance

Research direction

Start with src/reverse_mode.jl lines 205-226 and inspect how infer_size leads into the array +/- path. Update the scalar-indexing path to use view_linear, then verify that GPU arrays support Y_hat - Y as well as Y_hat .- Y without the scalar-indexing error.

Written by the indexing model from the issue text.

Description

This uses scalar indexing, this is failing on GPU with ERROR: Scalar indexing is disallowed., we should update it to use view_linear (we don't need to branch with view_matrix as the size doesn't matter here, we already checked they are of the same size in infer_size):
https://github.com/blegat/ArrayDiff.jl/blob/2bec1698b726f72de06b262aec279e5901adc876/src/reverse_mode.jl#L205-L226
Once this is done, we should be able to do Y_hat - Y and not just Y_hat .- Y for training NN on GPU.

Dominant language
Julia
Stars
6
Forks
0
Avg merge
6d 22h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from blegat/ArrayDiff.jl

All issues in blegat/ArrayDiff.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.