[Language] Enhance T.dtype.as_torch conversion for compatibility (#1473)
* [Language] Enhance dtype conversion for PyTorch compatibility - Added support for new float8 and float4 data types in the __dtype_as_torch__ method. - Implemented backend-specific handling for float8_e4m3 based on HIP or CUDA. - Included assertions to ensure compatibility with the required PyTorch versions for each dtype. - Improved error handling for unsupported dtypes. * Fix test script execution and improve error messages for dtype assertions - Commented out the main execution call in the test script and replaced it with a direct call to the test function `test_divmod()`. - Enhanced error messages in the dtype conversion assertions to improve clarity and readability, ensuring proper guidance for required PyTorch versions.
Showing
Please register or sign in to comment