-
Notifications
You must be signed in to change notification settings - Fork 74.9k
TF2 Upgrader: add support of ipynb files #25680
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
Adapted from original https://github.com/lc0/tf2-ipynb
|
I think once, #25653 is in, I can rebase this one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super-awesome!
| parser = argparse.ArgumentParser( | ||
| formatter_class=argparse.RawDescriptionHelpFormatter, | ||
| description="""Convert a TensorFlow Python file to 2.0 | ||
| description="""Convert a TensorFlow Python file from 1.* to 2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer 1.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
funny, since I started as 1.x, but in a header, it was already written as 1.*
| "--outfile=<output file> argument is required when converting a " | ||
| "single file.") | ||
| files_processed, report_text, errors = upgrade.process_file( | ||
| files_processed, report_text, errors = ipynb.process_file( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer the filename selection logic to live here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, look at line 99, we should make sure that convert tree also understands ipynb files.
| files_processed, report_text, errors = \ | ||
| upgrader.process_file(in_filename, out_filename) | ||
|
|
||
| elif in_filename.endswith('.ipynb'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move the dispatch logic to the main function (and possibly maybe even process_tree)
|
@martinwicke Thanks for review, I've updated accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG, doing the tree stuff in a separate PR makes sense.
7a733d1 to
c9ee938
Compare
|
@martinwicke I fixed linter and other build issues. Please let me know if anything additional is missing. |
PiperOrigin-RevId: 235546488
Imported from GitHub PR openxla/xla#25680 ROCm platform currently doesn't support **dot** --> **__triton_gemm** transformation for OCP FP8 data type. Copybara import of the project: -- 93b3c24e4727f3e80868a6c644d36ccc60fe0199 by scxfjiang <xuefei.jiang@amd.com>: disable triton fp8 gemm test in gpu compiler for ROCm -- 90960280448975109e560a5bbe885aff84e36b25 by scxfjiang <xuefei.jiang@amd.com>: remove unused variable Merging this change closes #25680 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#25680 from ROCm:ci_disable_triton_fp8_gemm_test_for_rocm 90960280448975109e560a5bbe885aff84e36b25 PiperOrigin-RevId: 751348460
Imported from GitHub PR openxla/xla#25680 ROCm platform currently doesn't support **dot** --> **__triton_gemm** transformation for OCP FP8 data type. Copybara import of the project: -- 93b3c24e4727f3e80868a6c644d36ccc60fe0199 by scxfjiang <xuefei.jiang@amd.com>: disable triton fp8 gemm test in gpu compiler for ROCm -- 90960280448975109e560a5bbe885aff84e36b25 by scxfjiang <xuefei.jiang@amd.com>: remove unused variable Merging this change closes #25680 PiperOrigin-RevId: 751368623
As discussed @martinwicke, since locally it was tested in isolated environment, I would be more than happy to run the required tests
Potentially I'd follow with updating readme and other docs related things