-
Notifications
You must be signed in to change notification settings - Fork 434
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
ElementalIrEmitterExecutionTest.IotaF8E4M3FN - Invalid LLVM IR #17323
Comments
Imported from GitHub PR #17383 `elemental_ir_emitter_test.cc` contains multiple similar tests for `bf16`, `f8e4m3fnuz` and , `f8e5m2fnuz`. Changes: - Parameterize the float tests in elemental_ir_emitter_test.cc. - Add additional types to the list of tested types - `f8e5m2`, `f8e4m3fn`, `f8e4m3b11fnuz`. Some tests failed for newly added types. Temporary use `GTEST_SKIP` for such cases: Related issues: - #17323 - #17324 Copybara import of the project: -- 47dcfcf by Alexander Pivovarov <[email protected]>: Parameterize elemental_ir_emitter_test.cc float tests Merging this change closes #17383 FUTURE_COPYBARA_INTEGRATE_REVIEW=#17383 from apivovarov:param_elemental_ir_emitter_test 47dcfcf PiperOrigin-RevId: 676627549
Imported from GitHub PR openxla/xla#17383 `elemental_ir_emitter_test.cc` contains multiple similar tests for `bf16`, `f8e4m3fnuz` and , `f8e5m2fnuz`. Changes: - Parameterize the float tests in elemental_ir_emitter_test.cc. - Add additional types to the list of tested types - `f8e5m2`, `f8e4m3fn`, `f8e4m3b11fnuz`. Some tests failed for newly added types. Temporary use `GTEST_SKIP` for such cases: Related issues: - openxla/xla#17323 - openxla/xla#17324 Copybara import of the project: -- 47dcfcf43908584d453f63008c9d68b5e7dae9c3 by Alexander Pivovarov <[email protected]>: Parameterize elemental_ir_emitter_test.cc float tests Merging this change closes #17383 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#17383 from apivovarov:param_elemental_ir_emitter_test 47dcfcf43908584d453f63008c9d68b5e7dae9c3 PiperOrigin-RevId: 676627549
The test uses Since it utilizes the Workaround: Run the test with the XLA flag However, I am still unclear on how the test functions for Steps to Reproduce: Command to run (executes HLO on the CPU with all HLO passes disabled):
HLO with three different iota operations—only the first two work, while the last one fails:
@reedwm , could you help clarify why there is a discrepancy between different types and the iota operation when HLO passes are disabled? |
It's expected that certain types, like FP8 types, don't work with arbitrary ops, which is why float-normalization upcasts them. My guess is that BF16 is supported as it's an LLVM IR type, according to this table. And F8E4M3FNUZ has some special logic here to handle it, although I'm not sure why we need to support this at all when float-normalization can handle it. Anyway, I don't think there's anything we need to do for this issue, but let me know if you disagree. I don't think we need to support iota for FP8 types since float-normalization can handle it. |
Hi Jake, Could you please explain why we need special handling for if (component_element_type == F8E4M3FNUZ) {
float_ir_type = llvm_ir::PrimitiveTypeToIrType(F16, module_);
} else if (component_element_type == F8E5M2FNUZ) {
float_ir_type = llvm_ir::PrimitiveTypeToIrType(F16, module_);
} else {
float_ir_type =
llvm_ir::PrimitiveTypeToIrType(component_element_type, module_);
}
if (component_element_type == F8E4M3FNUZ ||
component_element_type == F8E5M2FNUZ) {
TF_ASSIGN_OR_RETURN(
iota_result, EmitFloatingToF8fnuz(F16, float_val,
component_element_type, b_));
} else {
iota_result = float_val;
} It seems that Thank you! |
Imported from GitHub PR #17383 `elemental_ir_emitter_test.cc` contains multiple similar tests for `bf16`, `f8e4m3fnuz` and , `f8e5m2fnuz`. Changes: - Parameterize the float tests in elemental_ir_emitter_test.cc. - Add additional types to the list of tested types - `f8e5m2`, `f8e4m3fn`, `f8e4m3b11fnuz`. Some tests failed for newly added types. Temporary use `GTEST_SKIP` for such cases: Related issues: - #17323 - #17324 Copybara import of the project: -- 47dcfcf by Alexander Pivovarov <[email protected]>: Parameterize elemental_ir_emitter_test.cc float tests Merging this change closes #17383 FUTURE_COPYBARA_INTEGRATE_REVIEW=#17383 from apivovarov:param_elemental_ir_emitter_test 47dcfcf PiperOrigin-RevId: 676627549
Imported from GitHub PR #17383 `elemental_ir_emitter_test.cc` contains multiple similar tests for `bf16`, `f8e4m3fnuz` and , `f8e5m2fnuz`. Changes: - Parameterize the float tests in elemental_ir_emitter_test.cc. - Add additional types to the list of tested types - `f8e5m2`, `f8e4m3fn`, `f8e4m3b11fnuz`. Some tests failed for newly added types. Temporary use `GTEST_SKIP` for such cases: Related issues: - #17323 - #17324 Copybara import of the project: -- 47dcfcf by Alexander Pivovarov <[email protected]>: Parameterize elemental_ir_emitter_test.cc float tests Merging this change closes #17383 COPYBARA_INTEGRATE_REVIEW=#17383 from apivovarov:param_elemental_ir_emitter_test 47dcfcf PiperOrigin-RevId: 676739814
Imported from GitHub PR openxla/xla#17383 `elemental_ir_emitter_test.cc` contains multiple similar tests for `bf16`, `f8e4m3fnuz` and , `f8e5m2fnuz`. Changes: - Parameterize the float tests in elemental_ir_emitter_test.cc. - Add additional types to the list of tested types - `f8e5m2`, `f8e4m3fn`, `f8e4m3b11fnuz`. Some tests failed for newly added types. Temporary use `GTEST_SKIP` for such cases: Related issues: - openxla/xla#17323 - openxla/xla#17324 Copybara import of the project: -- 47dcfcf43908584d453f63008c9d68b5e7dae9c3 by Alexander Pivovarov <[email protected]>: Parameterize elemental_ir_emitter_test.cc float tests Merging this change closes #17383 PiperOrigin-RevId: 676739814
I tried to add new test
IotaF8E4M3FN
based onIotaF8E4FNUZ
code (xla/service/elemental_ir_emitter_test.cc)New test failed on CPU (x86_64)
Error:
Similar issue exist for
f8e5m2
andf8e4m3b11fnuz
types.@reedwm
The text was updated successfully, but these errors were encountered: