You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current logic for setting up output data format for backward ops selects data format of the first input operand.
Reference: void OpNode::set_output_df_from_operands(const Graph *graph) in the node_types.cpp.
This is problematic since different ops can require output to match data format of some other input operand. For instance, the embedding backward op should match data format of embedding weights (the second operand).
The text was updated successfully, but these errors were encountered:
### Ticket
Close#1142
### Problem description
The current logic for setting up output data format for backward ops
selects data format of the first input operand.
Reference: `void OpNode::set_output_df_from_operands(const Graph
*graph)` in the `node_types.cpp`.
This is problematic since different ops can require output to match data
format of some other input operand. For instance, the embedding backward
op should match data format of embedding weights (the second operand).
### What's changed
Changed the way embedding backward op is created (explicitly setting up
output data format through autogradContext).
### Checklist
- [x] Add set_output_df method to autogradContext
- [x] Updated backward method for embedding op (`embedding.py`)
- [x] Test new logic (test_llama_backward) - note here, couldn't find
explicit tests for adding new functions so test with existing one.
The current logic for setting up output data format for backward ops selects data format of the first input operand.
Reference:
void OpNode::set_output_df_from_operands(const Graph *graph)
in thenode_types.cpp
.This is problematic since different ops can require output to match data format of some other input operand. For instance, the embedding backward op should match data format of embedding weights (the second operand).
The text was updated successfully, but these errors were encountered: