-
Notifications
You must be signed in to change notification settings - Fork 807
[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
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. ❌ 2 New Failures, 2 Unrelated FailuresAs of commit 042aae1 with merge base 4f8dbde ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present 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]
…, 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]
…, 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]
…, 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]
…, 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]
a7c39dc
into
gh/gasoonjia/78/base
…oat16) (#16731) This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #16399 by @Gasoonjia ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/gasoonjia/78/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/78/head Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/gasoonjia/77/orig Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/78/orig Differential Revision: [D89821402](https://our.internmc.facebook.com/intern/diff/D89821402/) @diff-train-skip-merge --------- Co-authored-by: gasoonjia <gasoonjia@icloud.com>
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