Skip to content

[QwixEmbedding] Add SparseCore row-gather helper sparsecore_take. - #490

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1029473336
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1029473336

Conversation

@copybara-service

Copy link
Copy Markdown

[QwixEmbedding] Add SparseCore row-gather helper sparsecore_take.

  • Add sparsecore_take in qwix/contrib/embedding_table.py to offload 2D axis=0 row gathers (int8 symmetric QArray with float32 scale, or float arrays) to TPU SparseCore while dequantizing on TensorCore.
  • Expand embedding_table_test to run across CPU and TPU backends, covering jnp.take parity, int8/bfloat16 inputs, and TPU compute_on('tpu_sparsecore') placement.

- Add `sparsecore_take` in `qwix/contrib/embedding_table.py` to offload 2D `axis=0` row gathers (`int8` symmetric `QArray` with `float32` scale, or float arrays) to TPU SparseCore while dequantizing on TensorCore.
- Expand `embedding_table_test` to run across CPU and TPU backends, covering `jnp.take` parity, `int8`/`bfloat16` inputs, and TPU `compute_on('tpu_sparsecore')` placement.

PiperOrigin-RevId: 1029473336
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.

1 participant