Didn't see how to capture control flow
- Dominant language
- C++
- Stars
- 23
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
As this [docs](https://github.com/awslabs/ratex/blob/main/docs/lazy_tensor.md) mentioned:
> Point 2: We use a Ratex specific API to wrap a PyTorch model. What happens here is that we trace the forward graph with torch script to capture the whole forward model for two purposes. First, capturing control flows. Second, performing auto-differentiation in Ratex instead of in PyTorch.
But when I followed the call stack I found the graph captured by `jit.trace`, which doesn't seem to capture all branches of the control flow? https://github.com/awslabs/raf/blob/a7f00f841545fe01729b071484ba4f8c4b30eae0/python/raf/frontend/pytorch.py#L99
Or does "capture control flows" here mean that neither materialize nor graph break does occur?
Thanks for your reply!
Contributor guide
Research direction
Read docs/lazy_tensor.md, especially Point 2, and inspect the PyTorch frontend at python/raf/frontend/pytorch.py around line 99 where jit.trace captures the graph. Determine whether the documentation's claim about control-flow capture matches the referenced implementation, then clarify the wording so the behavior and limitations are explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- documentation, machine-learning
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100