Skip to content

Conversation

@chunhuanMeng
Copy link
Contributor

Introduces a new utility for getting dropout masks on XPU devices, primarily for testing purposes.

Dropout Mask Utility

  • Added the _fill_mem_eff_dropout_mask_ function in Attention.cpp, which generates a dropout mask using XPU kernels and copies it into the input tensor. This utility is intended for testing and does not prioritize performance.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a utility function for generating dropout masks on XPU devices, primarily for testing purposes. The implementation adds a new native function that uses XPU kernels to create dropout masks.

Key Changes:

  • Added _fill_mem_eff_dropout_mask_ native function declaration in YAML configuration
  • Implemented the dropout mask generation utility in Attention.cpp using XPU dropout kernels

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
yaml/native/native_functions.yaml Declares the new _fill_mem_eff_dropout_mask_ function with XPU dispatch and nondeterministic_seeded tag
src/ATen/native/transformers/Attention.cpp Implements the dropout mask utility and adds necessary includes for XPU dropout kernels

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

Performance outliers, please check!

  • 🔴 [-1, 80%), should be regression
Category Model Target vs. Baseline [Eager] Target vs. Baseline [Inductor]
timm_models_bfloat16_training beit_base_patch16_224 0.999691 0.781541

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