-
Notifications
You must be signed in to change notification settings - Fork 792
[slimtensor] Add all required dtype support (Int8/16/32/64, Bool, BFloat16) #16399
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
base: gh/gasoonjia/78/base
Are you sure you want to change the base?
Conversation
…oat16) This diff adds support for all required scalar types in SlimTensor to support ExecuTorch aoti-driven backend usage: Int8 (Char), Int16 (Short), Int32 (Int), Int64 (Long), Bool, and BFloat16. **Key changes:** 1. **`c10/core/ScalarType.h`** - Extended with all required types: - Added enum values matching PyTorch's c10::ScalarType for compatibility - Added type alias constants (kChar, kShort, kInt, kLong, kBool, kBFloat16) - Extended `elementSize()` to return correct sizes for all types - Extended `toString()` for all types - Fixed `isFloatingType()` to include BFloat16 - Fixed `isIntegralType()` to properly handle all integral types and Bool - Added `isBoolType()` helper function - Imported BFloat16 from ExecuTorch's portable_type Differential Revision: [D89821402](https://our.internmc.facebook.com/intern/diff/D89821402/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16399
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 New Failures, 3 Unrelated FailuresAs of commit 368f131 with merge base fd6fa87 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…oat16) This diff adds support for all required scalar types in SlimTensor to support ExecuTorch aoti-driven backend usage: Int8 (Char), Int16 (Short), Int32 (Int), Int64 (Long), Bool, and BFloat16. **Key changes:** 1. **`c10/core/ScalarType.h`** - Extended with all required types: - Added enum values matching PyTorch's c10::ScalarType for compatibility - Added type alias constants (kChar, kShort, kInt, kLong, kBool, kBFloat16) - Extended `elementSize()` to return correct sizes for all types - Extended `toString()` for all types - Fixed `isFloatingType()` to include BFloat16 - Fixed `isIntegralType()` to properly handle all integral types and Bool - Added `isBoolType()` helper function - Imported BFloat16 from ExecuTorch's portable_type Differential Revision: [D89821402](https://our.internmc.facebook.com/intern/diff/D89821402/) ghstack-source-id: 331195238 Pull Request resolved: #16399
This PR needs a
|
…, Bool, BFloat16)" This diff adds support for all required scalar types in SlimTensor to support ExecuTorch aoti-driven backend usage: Int8 (Char), Int16 (Short), Int32 (Int), Int64 (Long), Bool, and BFloat16. **Key changes:** 1. **`c10/core/ScalarType.h`** - Extended with all required types: - Added enum values matching PyTorch's c10::ScalarType for compatibility - Added type alias constants (kChar, kShort, kInt, kLong, kBool, kBFloat16) - Extended `elementSize()` to return correct sizes for all types - Extended `toString()` for all types - Fixed `isFloatingType()` to include BFloat16 - Fixed `isIntegralType()` to properly handle all integral types and Bool - Added `isBoolType()` helper function - Imported BFloat16 from ExecuTorch's portable_type Differential Revision: [D89821402](https://our.internmc.facebook.com/intern/diff/D89821402/) [ghstack-poisoned]
Stack from ghstack (oldest at bottom):
This diff adds support for all required scalar types in SlimTensor to support ExecuTorch aoti-driven backend usage: Int8 (Char), Int16 (Short), Int32 (Int), Int64 (Long), Bool, and BFloat16.
Key changes:
c10/core/ScalarType.h- Extended with all required types:elementSize()to return correct sizes for all typestoString()for all typesisFloatingType()to include BFloat16isIntegralType()to properly handle all integral types and BoolisBoolType()helper functionDifferential Revision: D89821402