Skip to content
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

feat: Improve logging throughout the Dynamo path #2405

Merged
merged 5 commits into from
Jun 18, 2024
Merged

Conversation

gs-olive
Copy link
Collaborator

Description

  • Add clear logging at the beginning and end of each phase of compilation
  • Reword logging in certain locations for clarity

Addresses #2399

Type of change

  • Documentation and logging improvement

Checklist:

  • [ x ] My code follows the style guidelines of this project (You can use the linters)
  • [ x ] I have performed a self-review of my own code
  • [ x ] I have commented my code, particularly in hard-to-understand areas and hacks
  • [ x ] I have made corresponding changes to the documentation
  • [ x ] I have added tests to verify my fix or my feature
  • [ x ] New and existing unit tests pass locally with my changes
  • [ x ] I have added the relevant labels to my PR in so that relevant reviewers are notified

@gs-olive gs-olive requested a review from narendasan October 20, 2023 17:22
@gs-olive gs-olive self-assigned this Oct 20, 2023
@github-actions github-actions bot added component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Oct 20, 2023
@github-actions github-actions bot requested a review from apbose October 20, 2023 17:22
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code conforms to C++ style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code conforms to Python style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code conforms to Python style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code conforms to C++ style guidelines

Copy link
Collaborator

@peri044 peri044 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code conforms to Python style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code conforms to C++ style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code conforms to C++ style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code conforms to Python style guidelines

@github-actions github-actions bot added the component: lowering Issues re: The lowering / preprocessing passes label Dec 27, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code conforms to C++ style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code conforms to Python style guidelines

@narendasan narendasan added the Blocked Issue cannot be resolved until a change in a dependency label Feb 6, 2024
@github-actions github-actions bot requested a review from peri044 February 6, 2024 22:30
@github-actions github-actions bot removed the component: lowering Issues re: The lowering / preprocessing passes label Feb 27, 2024
@narendasan narendasan removed the Blocked Issue cannot be resolved until a change in a dependency label Apr 12, 2024
@github-actions github-actions bot added component: lowering Issues re: The lowering / preprocessing passes and removed component: lowering Issues re: The lowering / preprocessing passes labels Jun 14, 2024
@gs-olive gs-olive requested a review from narendasan June 14, 2024 01:40
@gs-olive
Copy link
Collaborator Author

Sample logs:

DEBUG:torch_tensorrt.dynamo.conversion._TRTInterpreter:Converting node mean (kind: aten.mean.dim, args: ('[RELU]-[aten_ops.relu.default]-[relu_16]_output <tensorrt.ITensor [shape=(8, 512, 7, 7), dtype=DataType.HALF]>', [-1, -2], True))
DEBUG:torch_tensorrt.dynamo.conversion._TRTInterpreter:Ran node mean with properties: Inputs: (relu_16: (8, 512, 7, 7)@torch.float16, [-1, -2], True) | Outputs: (mean: (8, 512, 1, 1)@torch.float16)
DEBUG:torch_tensorrt.dynamo.conversion._TRTInterpreter:Running node reshape_default, a call_function node with target aten.reshape.default in the TensorRT Interpreter
DEBUG:torch_tensorrt.dynamo.conversion._TRTInterpreter:Converting node reshape_default (kind: aten.reshape.default, args: ('[REDUCE]-[aten_ops.mean.dim]-[mean]_output <tensorrt.ITensor [shape=(8, 512, 1, 1), dtype=DataType.HALF]>', [8, 512]))
DEBUG:torch_tensorrt.dynamo.conversion._TRTInterpreter:Ran node reshape_default with properties: Inputs: (mean: (8, 512, 1, 1)@torch.float16, [8, 512]) | Outputs: (reshape_default: (8, 512)@torch.float16)
DEBUG:torch_tensorrt.dynamo.conversion._TRTInterpreter:Running node _param_constant61, a get_attr node with target _param_constant61 in the TensorRT Interpreter
DEBUG:torch_tensorrt.dynamo.conversion._TRTInterpreter:Ran node _param_constant61 with properties: Inputs: () | Outputs: (_param_constant61: (1000,)@float16)
DEBUG:torch_tensorrt.dynamo.conversion._TRTInterpreter:Running node _frozen_param0, a get_attr node with target _frozen_param0 in the TensorRT Interpreter
DEBUG:torch_tensorrt.dynamo.conversion._TRTInterpreter:Ran node _frozen_param0 with properties: Inputs: () | Outputs: (_frozen_param0: (512, 1000)@float16)
DEBUG:torch_tensorrt.dynamo.conversion._TRTInterpreter:Running node addmm, a call_function node with target aten.addmm.default in the TensorRT Interpreter
DEBUG:torch_tensorrt.dynamo.conversion._TRTInterpreter:Converting node addmm (kind: aten.addmm.default, args: ('<torch.Tensor as np.ndarray [shape=(1000,), dtype=float16]>', '[SHUFFLE]-[aten_ops.reshape.default]-[reshape_default]_output <tensorrt.ITensor [shape=(8, 512), dtype=DataType.HALF]>', '<torch.Tensor as np.ndarray [shape=(512, 1000), dtype=float16]>'))

@github-actions github-actions bot added the component: lowering Issues re: The lowering / preprocessing passes label Jun 14, 2024
@gs-olive gs-olive requested a review from peri044 June 14, 2024 18:29
Copy link
Collaborator

@peri044 peri044 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gs-olive gs-olive force-pushed the improve_logging branch 2 times, most recently from d3bc824 to a0d4807 Compare June 14, 2024 23:14
@gs-olive gs-olive merged commit 8a350ad into main Jun 18, 2024
61 checks passed
@gs-olive gs-olive deleted the improve_logging branch June 18, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: lowering Issues re: The lowering / preprocessing passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants