Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper ops to support cache conflict misses #2571

Closed
wants to merge 1 commit into from

Conversation

sryap
Copy link
Contributor

@sryap sryap commented May 8, 2024

Summary:
This diff adds helper operators for the cache conflict miss support
enablement in SSD TBE. Changes include:

  • Extend get_unique_indices_cuda to compute and return inverse
    linear indices (the tensor that contains the original positions of
    lienar indices before sorting)
  • Extend lru_cache_find_uncached_cuda to compute and return the
    inverse cache sets (the tensor that contains the original positions
    of cache sets of unique indices before sorting)
  • Update SSD backend to support cache conflict misses instead of
    failing. The rows that experience conflict misses will be stored in
    a scratch pad for TBE kernels to consume. They will be evicted to
    SSD once the backward+optimizer step of TBE is completed.
  • Add ssd_generate_row_addrs for generating row addresses of data
    that is fetched from SSD (data can be in either a scratch pad or LXU
    cache).

Differential Revision: D55926421

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55926421

Copy link

netlify bot commented May 8, 2024

Deploy Preview for pytorch-fbgemm-docs failed.

Name Link
🔨 Latest commit fb11951
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/663d8368f460b500084fbda5

sryap added a commit to sryap/FBGEMM that referenced this pull request May 8, 2024
Summary:

This diff adds helper operators for the cache conflict miss support
enablement in SSD TBE.  Changes include:
- Extend `get_unique_indices_cuda` to compute and return inverse
  linear indices (the tensor that contains the original positions of
  lienar indices before sorting)
- Extend `lru_cache_find_uncached_cuda` to compute and return the
  inverse cache sets (the tensor that contains the original positions
  of cache sets of unique indices before sorting)
- Update SSD backend to support cache conflict misses instead of
  failing. The rows that experience conflict misses will be stored in
  a scratch pad for TBE kernels to consume. They will be evicted to
  SSD once the backward+optimizer step of TBE is completed.
- Add `ssd_generate_row_addrs` for generating row addresses of data
  that is fetched from SSD (data can be in either a scratch pad or LXU
  cache).

Differential Revision: D55926421
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55926421

sryap added a commit to sryap/FBGEMM that referenced this pull request May 9, 2024
Summary:

This diff adds helper operators for the cache conflict miss support
enablement in SSD TBE.  Changes include:
- Extend `get_unique_indices_cuda` to compute and return inverse
  linear indices (the tensor that contains the original positions of
  lienar indices before sorting)
- Extend `lru_cache_find_uncached_cuda` to compute and return the
  inverse cache sets (the tensor that contains the original positions
  of cache sets of unique indices before sorting)
- Update SSD backend to support cache conflict misses instead of
  failing. The rows that experience conflict misses will be stored in
  a scratch pad for TBE kernels to consume. They will be evicted to
  SSD once the backward+optimizer step of TBE is completed.
- Add `ssd_generate_row_addrs` for generating row addresses of data
  that is fetched from SSD (data can be in either a scratch pad or LXU
  cache).

Reviewed By: q10

Differential Revision: D55926421
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55926421

sryap added a commit to sryap/FBGEMM that referenced this pull request May 9, 2024
Summary:

This diff adds helper operators for the cache conflict miss support
enablement in SSD TBE.  Changes include:
- Extend `get_unique_indices_cuda` to compute and return inverse
  linear indices (the tensor that contains the original positions of
  lienar indices before sorting)
- Extend `lru_cache_find_uncached_cuda` to compute and return the
  inverse cache sets (the tensor that contains the original positions
  of cache sets of unique indices before sorting)
- Update SSD backend to support cache conflict misses instead of
  failing. The rows that experience conflict misses will be stored in
  a scratch pad for TBE kernels to consume. They will be evicted to
  SSD once the backward+optimizer step of TBE is completed.
- Add `ssd_generate_row_addrs` for generating row addresses of data
  that is fetched from SSD (data can be in either a scratch pad or LXU
  cache).

Reviewed By: q10

Differential Revision: D55926421
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55926421

Summary:

This diff adds helper operators for the cache conflict miss support
enablement in SSD TBE.  Changes include:
- Extend `get_unique_indices_cuda` to compute and return inverse
  linear indices (the tensor that contains the original positions of
  lienar indices before sorting)
- Extend `lru_cache_find_uncached_cuda` to compute and return the
  inverse cache sets (the tensor that contains the original positions
  of cache sets of unique indices before sorting)
- Update SSD backend to support cache conflict misses instead of
  failing. The rows that experience conflict misses will be stored in
  a scratch pad for TBE kernels to consume. They will be evicted to
  SSD once the backward+optimizer step of TBE is completed.
- Add `ssd_generate_row_addrs` for generating row addresses of data
  that is fetched from SSD (data can be in either a scratch pad or LXU
  cache).

Reviewed By: q10

Differential Revision: D55926421
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55926421

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 56d21a0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants