Skip to content

Conversation

@horizon-blue
Copy link
Contributor

Part of MET-36

Summary of Changes

This PR implements the get_pixel_coords utility function, which will be used in the forward kernel to compute the subset of pixel coordinates that each thread is responsible for based on the thread & block IDs. As part of this, I'm also adding a int_ceil_div utility (essentially int(ceil(a/b))) to handle the potential edge cases where the number of pixels isn't divisible by the number of threads.

Test Plans

I've added some basic tests to check that get_pixel_coords guarantees that each thread is covered by at least one thread (though it might be possible for multiple threads to write to the same pixel when the job is not divisible). To check them out, run

pixi run ctest

@linear
Copy link

linear bot commented Dec 3, 2025

MET-36 Integrate and test the forward pass

Definition of done:

  • the results of render_fmbs function calls should agree with the JAX code up to numerics
    • generate a teddy bear image
  • [ ]

@horizon-blue horizon-blue merged commit 5873487 into master Dec 3, 2025
1 check passed
@horizon-blue horizon-blue deleted the xiaoyan/forward-get-pixel-coords branch December 4, 2025 03:41
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