onnxruntime/onnxruntime/test
pengwa 7c98f45928
Fix layernorm and softmax axis after upstream (#17255)
### Fix layernorm and softmax axis after upstream

For Gather (the slicing is a scalar), the output rank is small than its
inputs.

When we upstream this kind of Gather before softmax or layernorm, we
should also update the axis attribute.
Otherwise, the axis might be out-of-date and incorrect for the updated
rank.

```
  File "/opt/conda/envs/ptca/lib/python3.8/site-packages/onnxruntime/training/ortmodule/_fallback.py", line 157, in handle_exception
    raise exception
  File "/opt/conda/envs/ptca/lib/python3.8/site-packages/onnxruntime/training/ortmodule/_training_manager.py", line 280, in forward
    self._build_graph(graph_transformer_config)
  File "/opt/conda/envs/ptca/lib/python3.8/site-packages/onnxruntime/training/ortmodule/_logger.py", line 158, in wrapper
    result = func(graph_execution_manager, *args, **kwargs)
  File "/opt/conda/envs/ptca/lib/python3.8/site-packages/onnxruntime/training/ortmodule/_logger.py", line 273, in wrapper
    result = func(graph_execution_manager, *args, **kwargs)
  File "/opt/conda/envs/ptca/lib/python3.8/site-packages/onnxruntime/training/ortmodule/_training_manager.py", line 361, in _build_graph
    super()._build_graph(graph_transformer_config)
  File "/opt/conda/envs/ptca/lib/python3.8/site-packages/onnxruntime/training/ortmodule/_graph_execution_manager.py", line 184, in _build_graph
    self._graph_builder.build(config)
RuntimeError: /onnxruntime/orttraining/orttraining/python/orttraining_pybind_state.cc:823 onnxruntime::python::addObjectMethodsForTraining(pybind11::module&, onnxruntime::python::ExecutionProviderRegistrationFn)::<lambda(onnxruntime::training::OrtModuleGraphBuilder*, const onnxruntime::training::TrainingGraphTransformerConfiguration&)> [ONNXRuntimeError] : 1 : FAIL : Node (Softmax_2904) Op (Softmax) [ShapeInferenceError] 'axis' must be in [-3 , 2]. Its actual value is: 3
```
2023-08-25 12:26:22 +08:00
..
common [C#, CPP] Introduce Float16/BFloat16 support and tests for C#, C++ (#16506) 2023-07-14 10:46:52 -07:00
contrib_ops [ROCm] add SimplifiedSkipLayerNorm implementation (#17213) 2023-08-22 12:06:58 +08:00
custom_op_registration Support custom ops taking float 8 tensors as inputs and outputs (#16323) 2023-07-06 14:36:06 +02:00
debug_node_inputs_outputs
framework Two fixes involving minimal builds (#17000) 2023-08-23 16:01:22 +10:00
fuzzing
global_thread_pools Allow RunAsync with global TP (#17157) 2023-08-15 14:29:10 -07:00
ir
logging_apis
mlas 4b quantization for weights of LLMs (#16833) 2023-08-07 12:23:55 -07:00
onnx [QNN EP] Re-enable some node tests for QNN (#17237) 2023-08-21 13:58:17 -07:00
opaque_api
optimizer Fix layernorm and softmax axis after upstream (#17255) 2023-08-25 12:26:22 +08:00
perftest Add checks for session options and fix gsubgraph fallback exceptions (#17095) 2023-08-16 10:06:25 -07:00
platform
proto
providers [QNN EP] Support non-quantized Op on HTP (#17194) 2023-08-24 14:57:16 -07:00
python Issue#16990: Cast -> AllToAll -> Cast fails with random output (#17075) 2023-08-22 12:47:23 -07:00
quantization
shared_lib EP context for custom op (#16454) 2023-08-16 13:03:40 -07:00
testdata Two fixes involving minimal builds (#17000) 2023-08-23 16:01:22 +10:00
unittest_main Enable verbose logging in unit test program with environment variable. (#17133) 2023-08-22 12:13:52 -07:00
util [CoreML EP] Add Shape, Gather, and Slice ops (#17153) 2023-08-18 22:34:34 -07:00
wasm
win_getopt
xctest