Skip to content

Conversation

manuelcandales
Copy link
Contributor

Adds bfloat16/float32 working implementations of the following AOTI shim ops:

  • aoti_torch_mps_mm_out
  • aoti_torch_mps_convolution
  • aoti_torch_mps__scaled_dot_product_attention_math_for_mps

Adds a stub implementation of aoti_torch_mps_addmm_out

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Oct 10, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15023

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 Cancelled Job

As of commit 61ead64 with merge base 6e0c9f6 (image):

CANCELLED JOB - The following job was cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

[ghstack-poisoned]
Comment on lines +899 to +902
size_t query_size = query_tensor->numel() * element_size;
query_buffer = [device newBufferWithBytes:query_data_ptr
length:query_size
options:MTLResourceStorageModeShared];
Copy link
Contributor

Choose a reason for hiding this comment

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

how and where do you clean this up?

Comment on lines +1182 to +1183
// For attention weights, zero-fill the GPU buffer (shared memory allows CPU memset)
std::memset(attn_contents_ptr, 0, attn_size_bytes);
Copy link
Contributor

Choose a reason for hiding this comment

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

do you need zero filling here


// Set output tensor handles
*ret0 = out_tensor_handle;
*ret1 = attn_tensor_handle;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is ret1 actually populated or just zerod

[ghstack-poisoned]
[ghstack-poisoned]
@manuelcandales manuelcandales added the release notes: none Do not include this in the release notes label Oct 13, 2025
[ghstack-poisoned]
[ghstack-poisoned]
manuelcandales added a commit to manuelcandales/executorch-1 that referenced this pull request Oct 14, 2025
Adds bfloat16/float32 working implementations of the following AOTI shim ops:
 - aoti_torch_mps_mm_out
 - aoti_torch_mps_convolution
 - aoti_torch_mps__scaled_dot_product_attention_math_for_mps

 Adds a stub implementation of aoti_torch_mps_addmm_out


ghstack-source-id: 61b8cc4
ghstack-comment-id: 3392300522
Pull-Request: pytorch#15023
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants