Skip to content

Conversation

@ethche
Copy link
Contributor

@ethche ethche commented Nov 26, 2025

After running some additional benchmarks, I realized that for some kernels, there are many configs that give identical performance (e.g. for rms_norm). Originally, LFBO Pattern Search construct training labels by classifying which configs have performance strictly better than quantile(perfs, 0.3). Since this comparison is strict, in cases where the performance of the top 30% of configs is identical, then all the labels are zero. Training with these labels doesn't throw an error but instead when we call predict_proba, this returns all a 1D tensor of all zeros instead of a 2d tensor of probabilities for each class.

Now this is fixed by constructing labels with a non-strict comparison. We also explicitly deal with the case where all the labels are identical by arbitrarily flipping the first one.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 26, 2025
@ethche ethche requested a review from jansel November 26, 2025 19:23
@jansel jansel merged commit f7e6a47 into pytorch:main Nov 26, 2025
3 checks passed
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 Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants