text:
Error reports

Include step status
✅ Obtain model graph with `torch.export.export`
✅ Translate the graph into ONNX
❌ Run `onnx.checker` on the ONNX model
⚪ Execute the model with ONNX Runtime
⚪ Validate model output accuracy

PyTorch ONNX Conversion Error Report
✅ Obtain model graph with `torch.export.export`
❌ Translate the graph into ONNX
⚪ Run `onnx.checker` on the ONNX model
⚪ Execute the model with ONNX Runtime
⚪ Validate model output accuracy

Error message:
Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 490, in _add_nodes
    _handle_call_function_node_with_lowering(
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 372, in _handle_call_function_node_with_lowering
    raise RuntimeError(
RuntimeError: No ONNX function found for <OpOverload(op='aten.nll_loss2d_forward', overload='default')>. Failure message: No decompositions registered for the real-valued input

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 173, in _torch_onnx_export_adaptor
    ir_model = torch_onnx.exported_program_to_ir(program)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 626, in exported_program_to_ir
    values = _add_nodes(exported_program, model, lower=lower, registry=registry)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 501, in _add_nodes
    raise RuntimeError(
RuntimeError: Error when translating node %nll_loss2d_forward : [num_users=1] = call_function[target=torch.ops.aten.nll_loss2d_forward.default](args = (%_log_softmax, %arg3_1, None, 2, -100), kwargs = {}). See the stack trace for more information.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 228, in _torch_onnx_export_adapter_with_error_report
    ir_model, program = _torch_onnx_export_adaptor(*args, **kwargs, check=True)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 196, in _torch_onnx_export_adaptor
    raise OnnxConversionError(
torch_onnx._patch.OnnxConversionError: Failed to convert the exported program to an ONNX model. This is step 2/2 of exporting the model to ONNX. Please create an issue in the PyTorch GitHub repository against the *onnx* component and attach the full error stack as well as reproduction scripts. You can run `torch_onnx.analyze()` to produce an error report after obtaining an ExportedProgram with `torch.export.export()`.

Exported program:
ExportedProgram:
    class GraphModule(torch.nn.Module):
        def forward(self, arg0_1: "f32[4, 16, 3, 3]", arg1_1: "f32[4]", arg2_1: "f32[5, 16, 10, 10]", arg3_1: "i64[5, 8, 8]"):
            # File: /Users/justinc/Documents/GitHub/torch-onnx/tests/pytorch_test.py:9035 in forward, code: output = self.loss(self.m(self.conv(input)), target)
            convolution: "f32[5, 4, 8, 8]" = torch.ops.aten.convolution.default(arg2_1, arg0_1, arg1_1, [1, 1], [0, 0], [1, 1], False, [0, 0], 1);  arg2_1 = arg0_1 = arg1_1 = None
            _log_softmax: "f32[5, 4, 8, 8]" = torch.ops.aten._log_softmax.default(convolution, 1, False);  convolution = None
            nll_loss2d_forward = torch.ops.aten.nll_loss2d_forward.default(_log_softmax, arg3_1, None, 2, -100);  _log_softmax = arg3_1 = None
            getitem: "f32[]" = nll_loss2d_forward[0];  nll_loss2d_forward = None
            return (getitem,)

Graph signature: ExportGraphSignature(input_specs=[InputSpec(kind=<InputKind.PARAMETER: 2>, arg=TensorArgument(name='arg0_1'), target='conv.weight', persistent=None), InputSpec(kind=<InputKind.PARAMETER: 2>, arg=TensorArgument(name='arg1_1'), target='conv.bias', persistent=None), InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg2_1'), target=None, persistent=None), InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg3_1'), target=None, persistent=None)], output_specs=[OutputSpec(kind=<OutputKind.USER_OUTPUT: 1>, arg=TensorArgument(name='getitem'), target=None)])
Range constraints: {}

Analysis
PyTorch ONNX Conversion Analysis
Model Information
The model has 580 parameters and 0 buffers (non-trainable parameters).
Inputs:

arg2_1: TensorMetadata(shape=torch.Size([5, 16, 10, 10]), dtype=torch.float32, requires_grad=False, stride=(1600, 100, 10, 1), memory_format=torch.contiguous_format, is_quantized=False, qparams={})
arg3_1: TensorMetadata(shape=torch.Size([5, 8, 8]), dtype=torch.int64, requires_grad=False, stride=(64, 8, 1), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

Outputs:

getitem: TensorMetadata(shape=torch.Size([]), dtype=torch.float32, requires_grad=False, stride=(), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

The FX graph has 9 nodes in total. Number of FX nodes per op:

placeholder: 4
call_function: 4
output: 1

Of the call_function nodes, the counts of operators used are:

aten.convolution.default: 1
aten._log_softmax.default: 1
aten.nll_loss2d_forward.default: 1
<built-in function getitem>: 1

ONNX Conversion Information
The model contains operators the dispatcher could not find registered ONNX decompositions for. This may be due to missing implementations, decompositions not registered correctly, or a bug in the dispatcher.
Errors grouped by operator:

aten.nll_loss2d_forward.default:     No decompositions registered for the real-valued input. Example node: %nll_loss2d_forward : [num_users=1] = call_function[target=torch.ops.aten.nll_loss2d_forward.default](args = (%_log_softmax, %arg3_1, None, 2, -100), kwargs = {}). All nodes: [nll_loss2d_forward]
0_1: TensorMetadata(shape=torch.Size([1, 2, 4, 4, 6]), dtype=torch.float32, requires_grad=False, stride=(192, 96, 24, 6, 1), memory_format=torch.contiguous_format, is_quantized=False, qparams={})`

Outputs:

_unsafe_index: TensorMetadata(shape=torch.Size([1, 2, 8, 8, 12]), dtype=torch.float32, requires_grad=False, stride=(1536, 768, 96, 12, 1), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

The FX graph has 18 nodes in total. Number of FX nodes per op:

placeholder: 1
call_function: 16
output: 1

Of the call_function nodes, the counts of operators used are:

aten.arange.default: 3
aten.add.Tensor: 3
aten.mul.Tensor: 3
aten._to_copy.default: 3
aten.unsqueeze.default: 3
aten._unsafe_index.Tensor: 1

ONNX Conversion Information
The model contains operators the dispatcher could not find registered ONNX decompositions for. This may be due to missing implementations, decompositions not registered correctly, or a bug in the dispatcher.
Errors grouped by operator:

aten._unsafe_index.Tensor:     Critical Error in dispatcher:Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 398, in _handle_call_function_node_with_lowering
    outputs = onnx_function(*onnx_args, **onnx_kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/onnxscript/onnxscript/values.py", line 582, in __call__
    return self.func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: aten_arange() got an unexpected keyword argument 'layout'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 490, in _add_nodes
    _handle_call_function_node_with_lowering(
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 400, in _handle_call_function_node_with_lowering
    raise RuntimeError(
RuntimeError: Error when calling function 'TracedOnnxFunction(<function aten_arange at 0x16f4518a0>)' with args '[8]' and kwargs '{'dtype': FLOAT, 'layout': None, 'device': 'cpu', 'pin_memory': False}'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 173, in _torch_onnx_export_adaptor
    ir_model = torch_onnx.exported_program_to_ir(program)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 626, in exported_program_to_ir
    values = _add_nodes(exported_program, model, lower=lower, registry=registry)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 501, in _add_nodes
    raise RuntimeError(
RuntimeError: Error when translating node %arange : [num_users=1] = call_function[target=torch.ops.aten.arange.default](args = (8,), kwargs = {dtype: torch.float32, device: cpu, pin_memory: False}). See the stack trace for more information.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 228, in _torch_onnx_export_adapter_with_error_report
    ir_model, program = _torch_onnx_export_adaptor(*args, **kwargs, check=True)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 196, in _torch_onnx_export_adaptor
    raise OnnxConversionError(
torch_onnx._patch.OnnxConversionError: Failed to convert the exported program to an ONNX model. This is step 2/2 of exporting the model to ONNX. Please create an issue in the PyTorch GitHub repository against the *onnx* component and attach the full error stack as well as reproduction scripts. You can run `torch_onnx.analyze()` to produce an error report after obtaining an ExportedProgram with `torch.export.export()`.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_analysis.py", line 201, in analyze
    onnx_function, message = _dispatching.dispatch(node, registry)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_dispatching.py", line 323, in dispatch
    overload, message = get_matching_overload(
                        ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_dispatching.py", line 249, in get_matching_overload
    first_tensor = _get_first_tensor_in_node_list(arg)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_dispatching.py", line 180, in _get_first_tensor_in_node_list
    if "val" in node.meta and isinstance(node.meta["val"], torch.Tensor):
                ^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'meta'

. Example node: %_unsafe_index : [num_users=1] = call_function[target=torch.ops.aten._unsafe_index.Tensor](args = (%arg0_1, [None, None, %unsqueeze_1, %unsqueeze_2, %_to_copy_2]), kwargs = {}). All nodes: [_unsafe_index]

PyTorch ONNX Conversion Error Report
✅ Obtain model graph with `torch.export.export`
❌ Translate the graph into ONNX
⚪ Run `onnx.checker` on the ONNX model
⚪ Execute the model with ONNX Runtime
⚪ Validate model output accuracy

Error message:
Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 490, in _add_nodes
    _handle_call_function_node_with_lowering(
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 372, in _handle_call_function_node_with_lowering
    raise RuntimeError(
RuntimeError: No ONNX function found for <OpOverload(op='aten.index_put', overload='default')>. Failure message: All overloads did not match the node `%index_put : [num_users=1] = call_function[target=torch.ops.aten.index_put.default](args = (%arg0_1, [%arg1_1], %lift_fresh_copy), kwargs = {})`.
- Failed to match overload `OnnxFunction(<function aten_index_put at 0x1784c82c0>)`: Parameter type not compatible with argument: param=`Parameter(name='self', type_constraint=TypeConstraintParam(name='TReal', allowed_types={Tensor(INT32), Tensor(FLOAT), Tensor(INT16), Tensor(FLOAT16), Tensor(BFLOAT16), Tensor(INT8), Tensor(DOUBLE), Tensor(INT64)}, description=''), required=True, variadic=False, default=_EMPTY_DEFAULT)`, assigned_types=`{}`, arg=`BOOL`
- Failed to match overload `OnnxFunction(<function aten_index_put_bool at 0x1784c8360>)`: Parameter type not compatible with argument: param=`Parameter(name='self', type_constraint=TypeConstraintParam(name='TReal', allowed_types={Tensor(INT32), Tensor(FLOAT), Tensor(INT16), Tensor(FLOAT16), Tensor(BFLOAT16), Tensor(INT8), Tensor(DOUBLE), Tensor(INT64)}, description=''), required=True, variadic=False, default=_EMPTY_DEFAULT)`, assigned_types=`{}`, arg=`BOOL`

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 174, in _torch_onnx_export_adaptor
    ir_model = torch_onnx.exported_program_to_ir(program)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 626, in exported_program_to_ir
    values = _add_nodes(exported_program, model, lower=lower, registry=registry)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 501, in _add_nodes
    raise RuntimeError(
RuntimeError: Error when translating node %index_put : [num_users=1] = call_function[target=torch.ops.aten.index_put.default](args = (%arg0_1, [%arg1_1], %lift_fresh_copy), kwargs = {}). See the stack trace for more information.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 230, in _torch_onnx_export_adapter_with_error_report
    ir_model, program = _torch_onnx_export_adaptor(*args, **kwargs, check=True)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 197, in _torch_onnx_export_adaptor
    raise OnnxConversionError(
torch_onnx._patch.OnnxConversionError: Failed to convert the exported program to an ONNX model. This is step 2/2 of exporting the model to ONNX. Please create an issue in the PyTorch GitHub repository against the *onnx* component and attach the full error stack as well as reproduction scripts. You can run `torch_onnx.analyze()` to produce an error report after obtaining an ExportedProgram with `torch.export.export()`.

Exported program:
ExportedProgram:
    class GraphModule(torch.nn.Module):
        def forward(self, _lifted_tensor_constant0: "b8[]", arg0_1: "b8[100]", arg1_1: "i64[25]"):
            # File: /Users/justinc/Documents/GitHub/torch-onnx/tests/pytorch_test.py:2361 in forward, code: mask[indices] = True
            lift_fresh_copy: "b8[]" = torch.ops.aten.lift_fresh_copy.default(_lifted_tensor_constant0);  _lifted_tensor_constant0 = None
            index_put: "b8[100]" = torch.ops.aten.index_put.default(arg0_1, [arg1_1], lift_fresh_copy);  arg0_1 = arg1_1 = lift_fresh_copy = None
            return (index_put, index_put)

Graph signature: ExportGraphSignature(input_specs=[InputSpec(kind=<InputKind.CONSTANT_TENSOR: 4>, arg=TensorArgument(name='_lifted_tensor_constant0'), target='_lifted_tensor_constant0', persistent=None), InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg0_1'), target=None, persistent=None), InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg1_1'), target=None, persistent=None)], output_specs=[OutputSpec(kind=<OutputKind.USER_INPUT_MUTATION: 6>, arg=TensorArgument(name='index_put'), target='arg0_1'), OutputSpec(kind=<OutputKind.USER_OUTPUT: 1>, arg=TensorArgument(name='index_put'), target=None)])
Range constraints: {}

Analysis
PyTorch ONNX Conversion Analysis
Model Information
The model has 0 parameters and 0 buffers (non-trainable parameters).
Number of parameters per dtype:
defaultdict(<class 'int'>, {})
Number of buffers per dtype:
defaultdict(<class 'int'>, {})
Inputs:

arg0_1: TensorMetadata(shape=torch.Size([100]), dtype=torch.bool, requires_grad=False, stride=(1,), memory_format=torch.contiguous_format, is_quantized=False, qparams={})
arg1_1: TensorMetadata(shape=torch.Size([25]), dtype=torch.int64, requires_grad=False, stride=(1,), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

Outputs:

index_put: TensorMetadata(shape=torch.Size([100]), dtype=torch.bool, requires_grad=False, stride=(1,), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

The FX graph has 6 nodes in total. Number of FX nodes per op:

placeholder: 3
call_function: 2
output: 1

Of the call_function nodes, the counts of operators used are:

aten.lift_fresh_copy.default: 1
aten.index_put.default: 1

ONNX Conversion Information
The model contains operators the dispatcher could not find registered ONNX decompositions for. This may be due to missing implementations, decompositions not registered correctly, or a bug in the dispatcher.
Errors grouped by operator:

aten.index_put.default:     All overloads did not match the node %index_put : [num_users=1] = call_function[target=torch.ops.aten.index_put.default](args = (%arg0_1, [%arg1_1], %lift_fresh_copy), kwargs = {}).

Failed to match overload OnnxFunction(<function aten_index_put at 0x1784c82c0>): Parameter type not compatible with argument: param=Parameter(name='self', type_constraint=TypeConstraintParam(name='TReal', allowed_types={Tensor(INT32), Tensor(FLOAT), Tensor(INT16), Tensor(FLOAT16), Tensor(BFLOAT16), Tensor(INT8), Tensor(DOUBLE), Tensor(INT64)}, description=''), required=True, variadic=False, default=_EMPTY_DEFAULT), assigned_types={}, arg=BOOL
Failed to match overload OnnxFunction(<function aten_index_put_bool at 0x1784c8360>): Parameter type not compatible with argument: param=Parameter(name='self', type_constraint=TypeConstraintParam(name='TReal', allowed_types={Tensor(INT32), Tensor(FLOAT), Tensor(INT16), Tensor(FLOAT16), Tensor(BFLOAT16), Tensor(INT8), Tensor(DOUBLE), Tensor(INT64)}, description=''), required=True, variadic=False, default=_EMPTY_DEFAULT), assigned_types={}, arg=BOOL. Example node: %index_put : [num_users=1] = call_function[target=torch.ops.aten.index_put.default](args = (%arg0_1, [%arg1_1], %lift_fresh_copy), kwargs = {}). All nodes: [index_put]

Profile result

  _     ._   __/__   _ _  _  _ _/_   Recorded: 10:26:29  Samples:  319
 /_//_/// /_\ / //_// / //_'/ //     Duration: 0.587     CPU time: 0.261
/   _/                      v4.6.2

Program: -c

0.587 _torch_onnx_export_adapter_with_error_report  torch_onnx/_patch.py:210
└─ 0.587 _torch_onnx_export_adaptor  torch_onnx/_patch.py:139
   ├─ 0.510 exported_program_to_ir  torch_onnx/_core.py:574
   │  ├─ 0.421 OnnxRegistry.from_torchlib  torch_onnx/_registration.py:114
   │  │  ├─ 0.228 TracedOnnxFunction.function_ir  ../onnxscript/onnxscript/values.py:587
   │  │  │  ├─ 0.175 get_src_and_ast  ../onnxscript/onnxscript/_internal/ast_utils.py:16
   │  │  │  │  ├─ 0.146 getsource  inspect.py:1256
   │  │  │  │  │     [14 frames hidden]  inspect, tokenize, <built-in>, <string>
   │  │  │  │  └─ 0.029 parse  ast.py:33
   │  │  │  │        [2 frames hidden]  ast, <built-in>
   │  │  │  └─ 0.050 Converter.translate_function_signature  ../onnxscript/onnxscript/converter.py:1463
   │  │  │     └─ 0.050 Converter._translate_function_signature_common  ../onnxscript/onnxscript/converter.py:1378
   │  │  │        ├─ 0.025 is_valid_type  ../onnxscript/onnxscript/type_annotation.py:172
   │  │  │        │  └─ 0.025 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │        │     ├─ 0.015 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │        │     │  └─ 0.007 <listcomp>  ../onnxscript/onnxscript/type_annotation.py:150
   │  │  │        │     │     └─ 0.007 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │        │     │        └─ 0.007 _is_tensor_type  ../onnxscript/onnxscript/type_annotation.py:123
   │  │  │        │     └─ 0.006 <listcomp>  ../onnxscript/onnxscript/type_annotation.py:150
   │  │  │        │        └─ 0.006 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │        ├─ 0.011 is_attr_type  ../onnxscript/onnxscript/type_annotation.py:168
   │  │  │        │  └─ 0.011 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │        └─ 0.007 pytype_to_attrtype  ../onnxscript/onnxscript/type_annotation.py:83
   │  │  │           └─ 0.007 _remove_annotation  ../onnxscript/onnxscript/type_annotation.py:70
   │  │  │              └─ 0.007 get_origin  typing.py:2424
   │  │  └─ 0.181 OpSignature.from_function  torch_onnx/_schemas.py:398
   │  │     ├─ 0.071 get_type_hints  typing.py:2300
   │  │     │     [8 frames hidden]  typing, <built-in>
   │  │     ├─ 0.067 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │  └─ 0.060 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │     ├─ 0.037 _is_optional  torch_onnx/_schemas.py:185
   │  │     │     │  └─ 0.037 get_args  typing.py:2454
   │  │     │     │        [2 frames hidden]  typing
   │  │     │     └─ 0.018 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │        └─ 0.012 [self]  torch_onnx/_schemas.py
   │  │     ├─ 0.028 [self]  torch_onnx/_schemas.py
   │  │     └─ 0.010 signature  inspect.py:3278
   │  │           [4 frames hidden]  inspect
   │  ├─ 0.049 create_onnx_friendly_decomposition_table  torch_onnx/_decomp.py:39
   │  │  ├─ 0.037 core_aten_decompositions  torch/_decomp/__init__.py:253
   │  │  │     [5 frames hidden]  torch
   │  │  └─ 0.008 OpOverload.__hash__  torch/_ops.py:596
   │  └─ 0.036 wrapper  torch/export/exported_program.py:80
   │        [22 frames hidden]  torch
   └─ 0.076 export  torch/export/__init__.py:73
         [56 frames hidden]  torch, contextlib, traceback

PyTorch ONNX Conversion Error Report
✅ Obtain model graph with `torch.export.export`
✅ Translate the graph into ONNX
❌ Run `onnx.checker` on the ONNX model
⚪ Execute the model with ONNX Runtime
⚪ Validate model output accuracy

Error message:
Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 292, in _torch_onnx_export_adapter_with_error_report
    onnx.checker.check_model(proto, full_check=True)
  File "/Users/justinc/Documents/GitHub/torch-onnx/venv/lib/python3.11/site-packages/onnx/checker.py", line 179, in check_model
    C.check_model(
onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:Cast, node name: node_Cast_0): [ShapeInferenceError] Inferred shape and existing shape differ in rank: (2) vs (0)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 296, in _torch_onnx_export_adapter_with_error_report
    raise OnnxCheckerError(
torch_onnx._patch.OnnxCheckerError: Conversion successful but the ONNX model fails ONNX checker. Please create an issue in the PyTorch GitHub repository against the *onnx* component and attach the full error stack as well as reproduction scripts.

Exported program:
ExportedProgram:
    class GraphModule(torch.nn.Module):
        def forward(self, arg0_1: "b8[2, 2]"):
            # File: /Users/justinc/Documents/GitHub/torch-onnx/tests/pytorch_test.py:9451 in forward, code: return x.all()
            all_1: "b8[]" = torch.ops.aten.all.default(arg0_1);  arg0_1 = None
            return (all_1,)

Graph signature: ExportGraphSignature(input_specs=[InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg0_1'), target=None, persistent=None)], output_specs=[OutputSpec(kind=<OutputKind.USER_OUTPUT: 1>, arg=TensorArgument(name='all_1'), target=None)])
Range constraints: {}

Analysis
PyTorch ONNX Conversion Analysis
Model Information
The model has 0 parameters and 0 buffers (non-trainable parameters).
Number of parameters per dtype:
defaultdict(<class 'int'>, {})
Number of buffers per dtype:
defaultdict(<class 'int'>, {})
Inputs:

arg0_1: TensorMetadata(shape=torch.Size([2, 2]), dtype=torch.bool, requires_grad=False, stride=(2, 1), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

Outputs:

all_1: TensorMetadata(shape=torch.Size([]), dtype=torch.bool, requires_grad=False, stride=(), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

The FX graph has 3 nodes in total. Number of FX nodes per op:

placeholder: 1
call_function: 1
output: 1

Of the call_function nodes, the counts of operators used are:

aten.all.default: 1

ONNX Conversion Information
All operators in the model have registered ONNX decompositions.
Profile result

  _     ._   __/__   _ _  _  _ _/_   Recorded: 10:30:52  Samples:  1171
 /_//_/// /_\ / //_// / //_'/ //     Duration: 2.612     CPU time: 1.174
/   _/                      v4.6.2

Program: -c

2.611 _torch_onnx_export_adapter_with_error_report  torch_onnx/_patch.py:210
└─ 2.611 _torch_onnx_export_adaptor  torch_onnx/_patch.py:139
   ├─ 1.940 export  torch/export/__init__.py:73
   │     [92 frames hidden]  torch, contextlib, tokenize, <string>...
   └─ 0.670 exported_program_to_ir  torch_onnx/_core.py:574
      ├─ 0.577 OnnxRegistry.from_torchlib  torch_onnx/_registration.py:114
      │  ├─ 0.269 OpSignature.from_function  torch_onnx/_schemas.py:398
      │  │  ├─ 0.120 get_type_hints  typing.py:2300
      │  │  │     [4 frames hidden]  typing, <built-in>
      │  │  ├─ 0.089 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
      │  │  │  └─ 0.077 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
      │  │  │     └─ 0.068 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
      │  │  │        └─ 0.064 TensorType.__hash__  ../onnxscript/onnxscript/ir/_core.py:1291
      │  │  │           └─ 0.064 TensorType.__repr__  ../onnxscript/onnxscript/ir/_core.py:1299
      │  │  │              └─ 0.062 DataType.__repr__  ../onnxscript/onnxscript/ir/_enums.py:94
      │  │  │                 └─ 0.050 [self]  ../onnxscript/onnxscript/ir/_enums.py
      │  │  └─ 0.039 _get_attr_type  torch_onnx/_schemas.py:204
      │  └─ 0.267 TracedOnnxFunction.function_ir  ../onnxscript/onnxscript/values.py:587
      │     ├─ 0.214 get_src_and_ast  ../onnxscript/onnxscript/_internal/ast_utils.py:16
      │     │  ├─ 0.168 getsource  inspect.py:1256
      │     │  │     [5 frames hidden]  inspect, tokenize
      │     │  └─ 0.043 parse  ast.py:33
      │     │        [2 frames hidden]  ast, <built-in>
      │     └─ 0.044 Converter.translate_function_signature  ../onnxscript/onnxscript/converter.py:1463
      │        └─ 0.044 Converter._translate_function_signature_common  ../onnxscript/onnxscript/converter.py:1378
      ├─ 0.039 wrapper  torch/export/exported_program.py:80
      │     [2 frames hidden]  torch
      └─ 0.036 create_onnx_friendly_decomposition_table  torch_onnx/_decomp.py:39
         └─ 0.033 _get_registered_ops  torch_onnx/_decomp.py:12

PyTorch ONNX Conversion Report
✅ Obtain model graph with `torch.export.export`
✅ Translate the graph into ONNX
✅ Run `onnx.checker` on the ONNX model
✅ Execute the model with ONNX Runtime
✅ Validate model output accuracy

Exported program:
ExportedProgram:
    class GraphModule(torch.nn.Module):
        def forward(self, arg0_1: "f32[10, 10, 10]", arg1_1: "f32[10, 10, 10]", arg2_1: "f32[20, 5, 10, 10, 10]"):
            # File: /Users/justinc/Documents/GitHub/torch-onnx/venv/lib/python3.11/site-packages/torch/_dynamo/external_utils.py:36 in inner, code: return fn(*args, **kwargs)
            native_layer_norm = torch.ops.aten.native_layer_norm.default(arg2_1, [10, 10, 10], arg0_1, arg1_1, 1e-05);  arg2_1 = arg0_1 = arg1_1 = None
            getitem: "f32[20, 5, 10, 10, 10]" = native_layer_norm[0];  native_layer_norm = None
            return (getitem,)

Graph signature: ExportGraphSignature(input_specs=[InputSpec(kind=<InputKind.PARAMETER: 2>, arg=TensorArgument(name='arg0_1'), target='weight', persistent=None), InputSpec(kind=<InputKind.PARAMETER: 2>, arg=TensorArgument(name='arg1_1'), target='bias', persistent=None), InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg2_1'), target=None, persistent=None)], output_specs=[OutputSpec(kind=<OutputKind.USER_OUTPUT: 1>, arg=TensorArgument(name='getitem'), target=None)])
Range constraints: {}

Profile result

  _     ._   __/__   _ _  _  _ _/_   Recorded: 10:31:18  Samples:  285
 /_//_/// /_\ / //_// / //_'/ //     Duration: 0.682     CPU time: 0.310
/   _/                      v4.6.2

Program: -c

0.681 _torch_onnx_export_adapter_with_error_report  torch_onnx/_patch.py:210
└─ 0.681 _torch_onnx_export_adaptor  torch_onnx/_patch.py:139
   ├─ 0.496 exported_program_to_ir  torch_onnx/_core.py:574
   │  ├─ 0.403 OnnxRegistry.from_torchlib  torch_onnx/_registration.py:114
   │  │  ├─ 0.257 TracedOnnxFunction.function_ir  ../onnxscript/onnxscript/values.py:587
   │  │  │  ├─ 0.188 get_src_and_ast  ../onnxscript/onnxscript/_internal/ast_utils.py:16
   │  │  │  │  ├─ 0.174 getsource  inspect.py:1256
   │  │  │  │  │     [8 frames hidden]  inspect, tokenize, <built-in>, <string>
   │  │  │  │  └─ 0.009 parse  ast.py:33
   │  │  │  │        [2 frames hidden]  ast, <built-in>
   │  │  │  └─ 0.068 Converter.translate_function_signature  ../onnxscript/onnxscript/converter.py:1463
   │  │  │     └─ 0.068 Converter._translate_function_signature_common  ../onnxscript/onnxscript/converter.py:1378
   │  │  │        └─ 0.057 is_valid_type  ../onnxscript/onnxscript/type_annotation.py:172
   │  │  │           └─ 0.057 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │              └─ 0.054 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │                 └─ 0.051 <listcomp>  ../onnxscript/onnxscript/type_annotation.py:150
   │  │  │                    └─ 0.051 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │                       └─ 0.049 _is_tensor_type  ../onnxscript/onnxscript/type_annotation.py:123
   │  │  │                          └─ 0.048 [self]  ../onnxscript/onnxscript/type_annotation.py
   │  │  └─ 0.137 OpSignature.from_function  torch_onnx/_schemas.py:398
   │  │     ├─ 0.088 get_type_hints  typing.py:2300
   │  │     │     [11 frames hidden]  typing, <built-in>
   │  │     ├─ 0.033 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │  └─ 0.030 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │     └─ 0.027 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │        ├─ 0.013 TensorType.__hash__  ../onnxscript/onnxscript/ir/_core.py:1291
   │  │     │        │  └─ 0.010 TensorType.__repr__  ../onnxscript/onnxscript/ir/_core.py:1299
   │  │     │        │     └─ 0.008 [self]  ../onnxscript/onnxscript/ir/_core.py
   │  │     │        └─ 0.009 [self]  torch_onnx/_schemas.py
   │  │     └─ 0.009 signature  inspect.py:3278
   │  │           [4 frames hidden]  inspect
   │  ├─ 0.073 wrapper  torch/export/exported_program.py:80
   │  │     [62 frames hidden]  torch, <built-in>
   │  └─ 0.018 create_onnx_friendly_decomposition_table  torch_onnx/_decomp.py:39
   │     └─ 0.007 core_aten_decompositions  torch/_decomp/__init__.py:253
   │           [2 frames hidden]  torch
   └─ 0.185 export  torch/export/__init__.py:73
         [69 frames hidden]  torch, contextlib, traceback, <built-in>

PyTorch ONNX Conversion Error Report
✅ Obtain model graph with `torch.export.export`
✅ Translate the graph into ONNX
❌ Run `onnx.checker` on the ONNX model
⚪ Execute the model with ONNX Runtime
⚪ Validate model output accuracy

Error message:
Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 292, in _torch_onnx_export_adapter_with_error_report
    onnx.checker.check_model(proto, full_check=True)
  File "/Users/justinc/Documents/GitHub/torch-onnx/venv/lib/python3.11/site-packages/onnx/checker.py", line 179, in check_model
    C.check_model(
onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:Cast, node name: node_Cast_0): [ShapeInferenceError] Inferred shape and existing shape differ in rank: (2) vs (0)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 296, in _torch_onnx_export_adapter_with_error_report
    raise OnnxCheckerError(
torch_onnx._patch.OnnxCheckerError: Conversion successful but the ONNX model fails ONNX checker. Please create an issue in the PyTorch GitHub repository against the *onnx* component and attach the full error stack as well as reproduction scripts.

Exported program:
ExportedProgram:
    class GraphModule(torch.nn.Module):
        def forward(self, arg0_1: "b8[2, 2]"):
            # File: /Users/justinc/Documents/GitHub/torch-onnx/tests/pytorch_test.py:9451 in forward, code: return x.all()
            all_1: "b8[]" = torch.ops.aten.all.default(arg0_1);  arg0_1 = None
            return (all_1,)

Graph signature: ExportGraphSignature(input_specs=[InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg0_1'), target=None, persistent=None)], output_specs=[OutputSpec(kind=<OutputKind.USER_OUTPUT: 1>, arg=TensorArgument(name='all_1'), target=None)])
Range constraints: {}

ONNX model:
<
    ir_version=9,
    opset_imports={'': 18},
    producer_name='torch',
    producer_version='2.3.1',
    domain=None,
    model_version=None,
>
graph(
    name=main_graph,
    inputs=(
        %"arg0_1"<BOOL,[2,2]>
    ),
    outputs=(
        %"val_all_1"<BOOL,[]>
    ),
) {
    0 |  # node_Cast_0
         %"val_all_1"<BOOL,[]> ⬅ ::Cast(%"arg0_1") {to=9}
    return %"val_all_1"<BOOL,[]>
}```

## Analysis

PyTorch ONNX Conversion Analysis

## Model Information

The model has 0 parameters and 0 buffers (non-trainable parameters).
Number of parameters per dtype:
    defaultdict(<class 'int'>, {})
Number of buffers per dtype:
    defaultdict(<class 'int'>, {})

Inputs:
- `arg0_1`: `TensorMetadata(shape=torch.Size([2, 2]), dtype=torch.bool, requires_grad=False, stride=(2, 1), memory_format=torch.contiguous_format, is_quantized=False, qparams={})`

Outputs:
- `all_1`: `TensorMetadata(shape=torch.Size([]), dtype=torch.bool, requires_grad=False, stride=(), memory_format=torch.contiguous_format, is_quantized=False, qparams={})`

The FX graph has 3 nodes in total. Number of FX nodes per op:
- `placeholder`: 1
- `call_function`: 1
- `output`: 1

Of the call_function nodes, the counts of operators used are:

- `aten.all.default`: 1

## ONNX Conversion Information

All operators in the model have registered ONNX decompositions.

## Profile result

_     ._   /   _ _  _  _ /   Recorded: 10:34:51  Samples:  1165
////// /\ / //// / //_'/ //     Duration: 3.177     CPU time: 1.208
/   _/                      v4.6.2
Program: -c
3.176 _torch_onnx_export_adapter_with_error_report  torch_onnx/_patch.py:210
└─ 3.176 _torch_onnx_export_adaptor  torch_onnx/_patch.py:139
├─ 2.397 export  torch/export/init.py:73
│     [97 frames hidden]  torch, contextlib, importlib, functoo...
└─ 0.779 exported_program_to_ir  torch_onnx/_core.py:574
├─ 0.650 OnnxRegistry.from_torchlib  torch_onnx/_registration.py:114
│  ├─ 0.305 TracedOnnxFunction.function_ir  ../onnxscript/onnxscript/values.py:587
│  │  ├─ 0.218 get_src_and_ast  ../onnxscript/onnxscript/_internal/ast_utils.py:16
│  │  │  ├─ 0.186 getsource  inspect.py:1256
│  │  │  │     [7 frames hidden]  inspect, tokenize
│  │  │  └─ 0.032 parse  ast.py:33
│  │  │        [2 frames hidden]  ast,
│  │  └─ 0.074 Converter.translate_function_signature  ../onnxscript/onnxscript/converter.py:1463
│  │     └─ 0.074 Converter._translate_function_signature_common  ../onnxscript/onnxscript/converter.py:1378
│  │        └─ 0.048 is_valid_type  ../onnxscript/onnxscript/type_annotation.py:172
│  │           └─ 0.047 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
│  │              └─ 0.035 get_origin  typing.py:2424
│  ├─ 0.298 OpSignature.from_function  torch_onnx/_schemas.py:398
│  │  ├─ 0.115 _get_attr_type  torch_onnx/_schemas.py:204
│  │  │  └─ 0.115 get_origin  typing.py:2424
│  │  │        [2 frames hidden]  typing,
│  │  ├─ 0.091 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
│  │  │  ├─ 0.044 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
│  │  │  │  └─ 0.038 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
│  │  │  └─ 0.036 isinstance
│  │  └─ 0.054 get_type_hints  typing.py:2300
│  └─ 0.041 _get_overload  torch_onnx/_registration.py:57
│     └─ 0.037 OpOverloadPacket.getattr  torch/_ops.py:800
├─ 0.058 create_onnx_friendly_decomposition_table  torch_onnx/_decomp.py:39
│  └─ 0.056 _get_registered_ops  torch_onnx/_decomp.py:12
│     └─ 0.047 OpOverloadPacket.getattr  torch/_ops.py:800
└─ 0.049 wrapper  torch/export/exported_program.py:80
[9 frames hidden]  torch

PyTorch ONNX Conversion Error Report
✅ Obtain model graph with `torch.export.export`
❌ Translate the graph into ONNX
⚪ Run `onnx.checker` on the ONNX model
⚪ Execute the model with ONNX Runtime
⚪ Validate model output accuracy

Error message:
Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 490, in _add_nodes
    _handle_call_function_node_with_lowering(
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 372, in _handle_call_function_node_with_lowering
    raise RuntimeError(
RuntimeError: No ONNX function found for <OpOverload(op='aten.grid_sampler_3d', overload='default')>. Failure message: No decompositions registered for the real-valued input

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 174, in _torch_onnx_export_adaptor
    ir_model = torch_onnx.exported_program_to_ir(program)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 626, in exported_program_to_ir
    values = _add_nodes(exported_program, model, lower=lower, registry=registry)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 501, in _add_nodes
    raise RuntimeError(
RuntimeError: Error when translating node %grid_sampler_3d : [num_users=1] = call_function[target=torch.ops.aten.grid_sampler_3d.default](args = (%arg0_1, %arg1_1, 0, 0, True), kwargs = {}). See the stack trace for more information.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 230, in _torch_onnx_export_adapter_with_error_report
    ir_model, program = _torch_onnx_export_adaptor(*args, **kwargs, check=True)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 197, in _torch_onnx_export_adaptor
    raise OnnxConversionError(
torch_onnx._patch.OnnxConversionError: Failed to convert the exported program to an ONNX model. This is step 2/2 of exporting the model to ONNX. Please create an issue in the PyTorch GitHub repository against the *onnx* component and attach the full error stack as well as reproduction scripts. You can run `torch_onnx.analyze()` to produce an error report after obtaining an ExportedProgram with `torch.export.export()`.

Exported program:
ExportedProgram:
    class GraphModule(torch.nn.Module):
        def forward(self, arg0_1: "f32[1, 1, 2, 3, 2]", arg1_1: "f32[1, 3, 2, 4, 3]"):
            # File: /Users/justinc/Documents/GitHub/torch-onnx/tests/pytorch_test.py:13040 in forward, code: return torch.nn.functional.grid_sample(
            grid_sampler_3d: "f32[1, 1, 3, 2, 4]" = torch.ops.aten.grid_sampler_3d.default(arg0_1, arg1_1, 0, 0, True);  arg0_1 = arg1_1 = None
            return (grid_sampler_3d,)

Graph signature: ExportGraphSignature(input_specs=[InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg0_1'), target=None, persistent=None), InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg1_1'), target=None, persistent=None)], output_specs=[OutputSpec(kind=<OutputKind.USER_OUTPUT: 1>, arg=TensorArgument(name='grid_sampler_3d'), target=None)])
Range constraints: {}

Analysis
PyTorch ONNX Conversion Analysis
Model Information
The model has 0 parameters and 0 buffers (non-trainable parameters).
Number of parameters per dtype:
defaultdict(<class 'int'>, {})
Number of buffers per dtype:
defaultdict(<class 'int'>, {})
Inputs:

arg0_1: TensorMetadata(shape=torch.Size([1, 1, 2, 3, 2]), dtype=torch.float32, requires_grad=False, stride=(12, 12, 6, 2, 1), memory_format=torch.channels_last_3d, is_quantized=False, qparams={})
arg1_1: TensorMetadata(shape=torch.Size([1, 3, 2, 4, 3]), dtype=torch.float32, requires_grad=False, stride=(72, 24, 12, 3, 1), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

Outputs:

grid_sampler_3d: TensorMetadata(shape=torch.Size([1, 1, 3, 2, 4]), dtype=torch.float32, requires_grad=False, stride=(24, 24, 8, 4, 1), memory_format=torch.channels_last_3d, is_quantized=False, qparams={})

The FX graph has 4 nodes in total. Number of FX nodes per op:

placeholder: 2
call_function: 1
output: 1

Of the call_function nodes, the counts of operators used are:

aten.grid_sampler_3d.default: 1

ONNX Conversion Information
The model contains operators the dispatcher could not find registered ONNX decompositions for. This may be due to missing implementations, decompositions not registered correctly, or a bug in the dispatcher.
Errors grouped by operator:

aten.grid_sampler_3d.default:     No decompositions registered for the real-valued input. Example node: %grid_sampler_3d : [num_users=1] = call_function[target=torch.ops.aten.grid_sampler_3d.default](args = (%arg0_1, %arg1_1, 0, 0, True), kwargs = {}). All nodes: [grid_sampler_3d]

Profile result

  _     ._   __/__   _ _  _  _ _/_   Recorded: 10:35:03  Samples:  303
 /_//_/// /_\ / //_// / //_'/ //     Duration: 0.652     CPU time: 0.256
/   _/                      v4.6.2

Program: -c

0.652 _torch_onnx_export_adapter_with_error_report  torch_onnx/_patch.py:210
└─ 0.652 _torch_onnx_export_adaptor  torch_onnx/_patch.py:139
   ├─ 0.459 exported_program_to_ir  torch_onnx/_core.py:574
   │  ├─ 0.440 OnnxRegistry.from_torchlib  torch_onnx/_registration.py:114
   │  │  ├─ 0.277 TracedOnnxFunction.function_ir  ../onnxscript/onnxscript/values.py:587
   │  │  │  ├─ 0.164 get_src_and_ast  ../onnxscript/onnxscript/_internal/ast_utils.py:16
   │  │  │  │  ├─ 0.115 getsource  inspect.py:1256
   │  │  │  │  │     [11 frames hidden]  inspect, tokenize, <built-in>, linecache
   │  │  │  │  └─ 0.045 parse  ast.py:33
   │  │  │  │        [2 frames hidden]  ast, <built-in>
   │  │  │  └─ 0.108 Converter.translate_function_signature  ../onnxscript/onnxscript/converter.py:1463
   │  │  │     ├─ 0.096 Converter._translate_function_signature_common  ../onnxscript/onnxscript/converter.py:1378
   │  │  │     │  ├─ 0.026 is_attr_type  ../onnxscript/onnxscript/type_annotation.py:168
   │  │  │     │  │  └─ 0.026 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │     │  │     ├─ 0.014 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │     │  │     └─ 0.010 _is_primitive_attr_type  ../onnxscript/onnxscript/type_annotation.py:79
   │  │  │     │  │        └─ 0.010 _GenericAlias.__hash__  typing.py:1378
   │  │  │     │  ├─ 0.021 Converter._bind  ../onnxscript/onnxscript/converter.py:278
   │  │  │     │  │  └─ 0.019 [self]  ../onnxscript/onnxscript/converter.py
   │  │  │     │  ├─ 0.018 is_valid_type  ../onnxscript/onnxscript/type_annotation.py:172
   │  │  │     │  │  └─ 0.018 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │     │  │     └─ 0.013 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │     │  │        └─ 0.012 <listcomp>  ../onnxscript/onnxscript/type_annotation.py:150
   │  │  │     │  │           └─ 0.012 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │     │  │              └─ 0.009 _is_tensor_type  ../onnxscript/onnxscript/type_annotation.py:123
   │  │  │     │  │                 └─ 0.007 [self]  ../onnxscript/onnxscript/type_annotation.py
   │  │  │     │  ├─ 0.010 Converter._source_of  ../onnxscript/onnxscript/converter.py:238
   │  │  │     │  │  └─ 0.009 [self]  ../onnxscript/onnxscript/converter.py
   │  │  │     │  ├─ 0.010 Converter._eval_constant_expr  ../onnxscript/onnxscript/converter.py:451
   │  │  │     │  └─ 0.010 [self]  ../onnxscript/onnxscript/converter.py
   │  │  │     └─ 0.011 [self]  ../onnxscript/onnxscript/converter.py
   │  │  └─ 0.154 OpSignature.from_function  torch_onnx/_schemas.py:398
   │  │     ├─ 0.067 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │  └─ 0.056 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │     └─ 0.053 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │        ├─ 0.034 TensorType.__hash__  ../onnxscript/onnxscript/ir/_core.py:1291
   │  │     │        │  └─ 0.025 TensorType.__repr__  ../onnxscript/onnxscript/ir/_core.py:1299
   │  │     │        │     ├─ 0.016 [self]  ../onnxscript/onnxscript/ir/_core.py
   │  │     │        │     └─ 0.009 DataType.__repr__  ../onnxscript/onnxscript/ir/_enums.py:94
   │  │     │        └─ 0.017 [self]  torch_onnx/_schemas.py
   │  │     ├─ 0.062 get_type_hints  typing.py:2300
   │  │     │     [10 frames hidden]  typing, <built-in>
   │  │     └─ 0.012 signature  inspect.py:3278
   │  │           [4 frames hidden]  inspect
   │  ├─ 0.010 wrapper  torch/export/exported_program.py:80
   │  │     [6 frames hidden]  torch
   │  └─ 0.007 create_onnx_friendly_decomposition_table  torch_onnx/_decomp.py:39
   └─ 0.193 export  torch/export/__init__.py:73
         [78 frames hidden]  torch, contextlib, ast, <built-in>, <...

PyTorch ONNX Conversion Error Report
✅ Obtain model graph with `torch.export.export`
❌ Translate the graph into ONNX
⚪ Run `onnx.checker` on the ONNX model
⚪ Execute the model with ONNX Runtime
⚪ Validate model output accuracy

Error message:
Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 490, in _add_nodes
    _handle_call_function_node_with_lowering(
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 372, in _handle_call_function_node_with_lowering
    raise RuntimeError(
RuntimeError: No ONNX function found for <OpOverload(op='aten.index_put', overload='default')>. Failure message: All overloads did not match the node `%index_put : [num_users=1] = call_function[target=torch.ops.aten.index_put.default](args = (%arg0_1, [%arg1_1], %lift_fresh_copy), kwargs = {})`.
- Failed to match overload `OnnxFunction(<function aten_index_put at 0x1436c82c0>)`: Parameter type not compatible with argument: param=`Parameter(name='self', type_constraint=TypeConstraintParam(name='TReal', allowed_types={Tensor(BFLOAT16), Tensor(INT8), Tensor(INT32), Tensor(INT64), Tensor(FLOAT), Tensor(DOUBLE), Tensor(FLOAT16), Tensor(INT16)}, description=''), required=True, variadic=False, default=_EMPTY_DEFAULT)`, assigned_types=`{}`, arg=`BOOL`
- Failed to match overload `OnnxFunction(<function aten_index_put_bool at 0x1436c8360>)`: Parameter type not compatible with argument: param=`Parameter(name='self', type_constraint=TypeConstraintParam(name='TReal', allowed_types={Tensor(BFLOAT16), Tensor(INT8), Tensor(INT32), Tensor(INT64), Tensor(FLOAT), Tensor(DOUBLE), Tensor(FLOAT16), Tensor(INT16)}, description=''), required=True, variadic=False, default=_EMPTY_DEFAULT)`, assigned_types=`{}`, arg=`BOOL`

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 174, in _torch_onnx_export_adaptor
    ir_model = torch_onnx.exported_program_to_ir(program)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 626, in exported_program_to_ir
    values = _add_nodes(exported_program, model, lower=lower, registry=registry)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 501, in _add_nodes
    raise RuntimeError(
RuntimeError: Error when translating node %index_put : [num_users=1] = call_function[target=torch.ops.aten.index_put.default](args = (%arg0_1, [%arg1_1], %lift_fresh_copy), kwargs = {}). See the stack trace for more information.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 230, in _torch_onnx_export_adapter_with_error_report
    ir_model, program = _torch_onnx_export_adaptor(*args, **kwargs, check=True)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 197, in _torch_onnx_export_adaptor
    raise OnnxConversionError(
torch_onnx._patch.OnnxConversionError: Failed to convert the exported program to an ONNX model. This is step 2/2 of exporting the model to ONNX. Please create an issue in the PyTorch GitHub repository against the *onnx* component and attach the full error stack as well as reproduction scripts. You can run `torch_onnx.analyze()` to produce an error report after obtaining an ExportedProgram with `torch.export.export()`.

Exported program:
ExportedProgram:
    class GraphModule(torch.nn.Module):
        def forward(self, _lifted_tensor_constant0: "b8[]", arg0_1: "b8[100]", arg1_1: "i64[25]"):
            # File: /Users/justinc/Documents/GitHub/torch-onnx/tests/pytorch_test.py:2361 in forward, code: mask[indices] = True
            lift_fresh_copy: "b8[]" = torch.ops.aten.lift_fresh_copy.default(_lifted_tensor_constant0);  _lifted_tensor_constant0 = None
            index_put: "b8[100]" = torch.ops.aten.index_put.default(arg0_1, [arg1_1], lift_fresh_copy);  arg0_1 = arg1_1 = lift_fresh_copy = None
            return (index_put, index_put)

Graph signature: ExportGraphSignature(input_specs=[InputSpec(kind=<InputKind.CONSTANT_TENSOR: 4>, arg=TensorArgument(name='_lifted_tensor_constant0'), target='_lifted_tensor_constant0', persistent=None), InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg0_1'), target=None, persistent=None), InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg1_1'), target=None, persistent=None)], output_specs=[OutputSpec(kind=<OutputKind.USER_INPUT_MUTATION: 6>, arg=TensorArgument(name='index_put'), target='arg0_1'), OutputSpec(kind=<OutputKind.USER_OUTPUT: 1>, arg=TensorArgument(name='index_put'), target=None)])
Range constraints: {}

Analysis
PyTorch ONNX Conversion Analysis
Model Information
The model has 0 parameters and 0 buffers (non-trainable parameters).
Number of parameters per dtype:
defaultdict(<class 'int'>, {})
Number of buffers per dtype:
defaultdict(<class 'int'>, {})
Inputs:

arg0_1: TensorMetadata(shape=torch.Size([100]), dtype=torch.bool, requires_grad=False, stride=(1,), memory_format=torch.contiguous_format, is_quantized=False, qparams={})
arg1_1: TensorMetadata(shape=torch.Size([25]), dtype=torch.int64, requires_grad=False, stride=(1,), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

Outputs:

index_put: TensorMetadata(shape=torch.Size([100]), dtype=torch.bool, requires_grad=False, stride=(1,), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

The FX graph has 6 nodes in total. Number of FX nodes per op:

placeholder: 3
call_function: 2
output: 1

Of the call_function nodes, the counts of operators used are:

aten.lift_fresh_copy.default: 1
aten.index_put.default: 1

ONNX Conversion Information
The model contains operators the dispatcher could not find registered ONNX decompositions for. This may be due to missing implementations, decompositions not registered correctly, or a bug in the dispatcher.
Errors grouped by operator:

aten.index_put.default:     All overloads did not match the node %index_put : [num_users=1] = call_function[target=torch.ops.aten.index_put.default](args = (%arg0_1, [%arg1_1], %lift_fresh_copy), kwargs = {}).

Failed to match overload OnnxFunction(<function aten_index_put at 0x1436c82c0>): Parameter type not compatible with argument: param=Parameter(name='self', type_constraint=TypeConstraintParam(name='TReal', allowed_types={Tensor(BFLOAT16), Tensor(INT8), Tensor(INT32), Tensor(INT64), Tensor(FLOAT), Tensor(DOUBLE), Tensor(FLOAT16), Tensor(INT16)}, description=''), required=True, variadic=False, default=_EMPTY_DEFAULT), assigned_types={}, arg=BOOL
Failed to match overload OnnxFunction(<function aten_index_put_bool at 0x1436c8360>): Parameter type not compatible with argument: param=Parameter(name='self', type_constraint=TypeConstraintParam(name='TReal', allowed_types={Tensor(BFLOAT16), Tensor(INT8), Tensor(INT32), Tensor(INT64), Tensor(FLOAT), Tensor(DOUBLE), Tensor(FLOAT16), Tensor(INT16)}, description=''), required=True, variadic=False, default=_EMPTY_DEFAULT), assigned_types={}, arg=BOOL. Example node: %index_put : [num_users=1] = call_function[target=torch.ops.aten.index_put.default](args = (%arg0_1, [%arg1_1], %lift_fresh_copy), kwargs = {}). All nodes: [index_put]

Profile result

  _     ._   __/__   _ _  _  _ _/_   Recorded: 10:35:13  Samples:  305
 /_//_/// /_\ / //_// / //_'/ //     Duration: 0.678     CPU time: 0.241
/   _/                      v4.6.2

Program: -c

0.678 _torch_onnx_export_adapter_with_error_report  torch_onnx/_patch.py:210
└─ 0.678 _torch_onnx_export_adaptor  torch_onnx/_patch.py:139
   ├─ 0.548 exported_program_to_ir  torch_onnx/_core.py:574
   │  ├─ 0.480 OnnxRegistry.from_torchlib  torch_onnx/_registration.py:114
   │  │  ├─ 0.268 TracedOnnxFunction.function_ir  ../onnxscript/onnxscript/values.py:587
   │  │  │  ├─ 0.171 get_src_and_ast  ../onnxscript/onnxscript/_internal/ast_utils.py:16
   │  │  │  │  ├─ 0.144 getsource  inspect.py:1256
   │  │  │  │  │     [10 frames hidden]  inspect, tokenize, <built-in>, <string>
   │  │  │  │  └─ 0.027 parse  ast.py:33
   │  │  │  │        [2 frames hidden]  ast, <built-in>
   │  │  │  └─ 0.086 Converter.translate_function_signature  ../onnxscript/onnxscript/converter.py:1463
   │  │  │     └─ 0.085 Converter._translate_function_signature_common  ../onnxscript/onnxscript/converter.py:1378
   │  │  │        ├─ 0.059 is_valid_type  ../onnxscript/onnxscript/type_annotation.py:172
   │  │  │        │  └─ 0.059 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │        │     └─ 0.056 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │        │        └─ 0.054 <listcomp>  ../onnxscript/onnxscript/type_annotation.py:150
   │  │  │        │           └─ 0.054 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │        │              └─ 0.049 _is_tensor_type  ../onnxscript/onnxscript/type_annotation.py:123
   │  │  │        │                 ├─ 0.041 TensorType.__subclasscheck__  <frozen abc>:121
   │  │  │        │                 │     [2 frames hidden]  <frozen abc>
   │  │  │        │                 └─ 0.008 [self]  ../onnxscript/onnxscript/type_annotation.py
   │  │  │        └─ 0.018 is_attr_type  ../onnxscript/onnxscript/type_annotation.py:168
   │  │  │           └─ 0.018 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │              └─ 0.010 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │                 └─ 0.009 <listcomp>  ../onnxscript/onnxscript/type_annotation.py:150
   │  │  │                    └─ 0.007 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  ├─ 0.196 OpSignature.from_function  torch_onnx/_schemas.py:398
   │  │  │  ├─ 0.118 get_type_hints  typing.py:2300
   │  │  │  │     [13 frames hidden]  typing, <built-in>
   │  │  │  ├─ 0.049 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │  │  │  └─ 0.044 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │  │  │     ├─ 0.026 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │  │  │     │  ├─ 0.014 [self]  torch_onnx/_schemas.py
   │  │  │  │     │  └─ 0.008 DataType.__call__  enum.py:686
   │  │  │  │     └─ 0.007 [self]  torch_onnx/_schemas.py
   │  │  │  └─ 0.020 signature  inspect.py:3278
   │  │  │        [4 frames hidden]  inspect
   │  │  └─ 0.009 [self]  torch_onnx/_registration.py
   │  └─ 0.060 wrapper  torch/export/exported_program.py:80
   │        [32 frames hidden]  torch
   └─ 0.130 export  torch/export/__init__.py:73
         [55 frames hidden]  torch, contextlib, <built-in>

PyTorch ONNX Conversion Error Report
✅ Obtain model graph with `torch.export.export`
❌ Translate the graph into ONNX
⚪ Run `onnx.checker` on the ONNX model
⚪ Execute the model with ONNX Runtime
⚪ Validate model output accuracy

Error message:
Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 490, in _add_nodes
    _handle_call_function_node_with_lowering(
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 372, in _handle_call_function_node_with_lowering
    raise RuntimeError(
RuntimeError: No ONNX function found for <OpOverload(op='aten.grid_sampler_3d', overload='default')>. Failure message: No decompositions registered for the real-valued input

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 174, in _torch_onnx_export_adaptor
    ir_model = torch_onnx.exported_program_to_ir(program)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 626, in exported_program_to_ir
    values = _add_nodes(exported_program, model, lower=lower, registry=registry)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_core.py", line 501, in _add_nodes
    raise RuntimeError(
RuntimeError: Error when translating node %grid_sampler_3d : [num_users=1] = call_function[target=torch.ops.aten.grid_sampler_3d.default](args = (%arg0_1, %arg1_1, 0, 0, True), kwargs = {}). See the stack trace for more information.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 230, in _torch_onnx_export_adapter_with_error_report
    ir_model, program = _torch_onnx_export_adaptor(*args, **kwargs, check=True)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/justinc/Documents/GitHub/torch-onnx/src/torch_onnx/_patch.py", line 197, in _torch_onnx_export_adaptor
    raise OnnxConversionError(
torch_onnx._patch.OnnxConversionError: Failed to convert the exported program to an ONNX model. This is step 2/2 of exporting the model to ONNX. Please create an issue in the PyTorch GitHub repository against the *onnx* component and attach the full error stack as well as reproduction scripts. You can run `torch_onnx.analyze()` to produce an error report after obtaining an ExportedProgram with `torch.export.export()`.

Exported program:
ExportedProgram:
    class GraphModule(torch.nn.Module):
        def forward(self, arg0_1: "f32[1, 1, 2, 3, 2]", arg1_1: "f32[1, 3, 2, 4, 3]"):
            # File: /Users/justinc/Documents/GitHub/torch-onnx/tests/pytorch_test.py:13040 in forward, code: return torch.nn.functional.grid_sample(
            grid_sampler_3d: "f32[1, 1, 3, 2, 4]" = torch.ops.aten.grid_sampler_3d.default(arg0_1, arg1_1, 0, 0, True);  arg0_1 = arg1_1 = None
            return (grid_sampler_3d,)

Graph signature: ExportGraphSignature(input_specs=[InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg0_1'), target=None, persistent=None), InputSpec(kind=<InputKind.USER_INPUT: 1>, arg=TensorArgument(name='arg1_1'), target=None, persistent=None)], output_specs=[OutputSpec(kind=<OutputKind.USER_OUTPUT: 1>, arg=TensorArgument(name='grid_sampler_3d'), target=None)])
Range constraints: {}

Analysis
PyTorch ONNX Conversion Analysis
Model Information
The model has 0 parameters and 0 buffers (non-trainable parameters).
Number of parameters per dtype:
defaultdict(<class 'int'>, {})
Number of buffers per dtype:
defaultdict(<class 'int'>, {})
Inputs:

arg0_1: TensorMetadata(shape=torch.Size([1, 1, 2, 3, 2]), dtype=torch.float32, requires_grad=False, stride=(12, 12, 6, 2, 1), memory_format=torch.contiguous_format, is_quantized=False, qparams={})
arg1_1: TensorMetadata(shape=torch.Size([1, 3, 2, 4, 3]), dtype=torch.float32, requires_grad=False, stride=(72, 24, 12, 3, 1), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

Outputs:

grid_sampler_3d: TensorMetadata(shape=torch.Size([1, 1, 3, 2, 4]), dtype=torch.float32, requires_grad=False, stride=(24, 24, 8, 4, 1), memory_format=torch.contiguous_format, is_quantized=False, qparams={})

The FX graph has 4 nodes in total. Number of FX nodes per op:

placeholder: 2
call_function: 1
output: 1

Of the call_function nodes, the counts of operators used are:

aten.grid_sampler_3d.default: 1

ONNX Conversion Information
The model contains operators the dispatcher could not find registered ONNX decompositions for. This may be due to missing implementations, decompositions not registered correctly, or a bug in the dispatcher.
Errors grouped by operator:

aten.grid_sampler_3d.default:     No decompositions registered for the real-valued input. Example node: %grid_sampler_3d : [num_users=1] = call_function[target=torch.ops.aten.grid_sampler_3d.default](args = (%arg0_1, %arg1_1, 0, 0, True), kwargs = {}). All nodes: [grid_sampler_3d]

Profile result

  _     ._   __/__   _ _  _  _ _/_   Recorded: 10:35:23  Samples:  286
 /_//_/// /_\ / //_// / //_'/ //     Duration: 0.600     CPU time: 0.245
/   _/                      v4.6.2

Program: -c

0.600 _torch_onnx_export_adapter_with_error_report  torch_onnx/_patch.py:210
└─ 0.600 _torch_onnx_export_adaptor  torch_onnx/_patch.py:139
   ├─ 0.512 exported_program_to_ir  torch_onnx/_core.py:574
   │  ├─ 0.436 OnnxRegistry.from_torchlib  torch_onnx/_registration.py:114
   │  │  ├─ 0.283 TracedOnnxFunction.function_ir  ../onnxscript/onnxscript/values.py:587
   │  │  │  ├─ 0.193 get_src_and_ast  ../onnxscript/onnxscript/_internal/ast_utils.py:16
   │  │  │  │  ├─ 0.167 getsource  inspect.py:1256
   │  │  │  │  │     [13 frames hidden]  inspect, tokenize, <string>, <built-in>
   │  │  │  │  └─ 0.024 parse  ast.py:33
   │  │  │  │        [2 frames hidden]  ast, <built-in>
   │  │  │  └─ 0.088 Converter.translate_function_signature  ../onnxscript/onnxscript/converter.py:1463
   │  │  │     └─ 0.087 Converter._translate_function_signature_common  ../onnxscript/onnxscript/converter.py:1378
   │  │  │        ├─ 0.075 is_valid_type  ../onnxscript/onnxscript/type_annotation.py:172
   │  │  │        │  └─ 0.075 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │        │     ├─ 0.061 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │        │     │  └─ 0.060 <listcomp>  ../onnxscript/onnxscript/type_annotation.py:150
   │  │  │        │     │     └─ 0.060 is_value_type  ../onnxscript/onnxscript/type_annotation.py:131
   │  │  │        │     │        └─ 0.060 _is_tensor_type  ../onnxscript/onnxscript/type_annotation.py:123
   │  │  │        │     │           └─ 0.059 TensorType.__instancecheck__  <frozen abc>:117
   │  │  │        │     │                 [3 frames hidden]  <frozen abc>, <built-in>
   │  │  │        │     └─ 0.010 _remove_annotation  ../onnxscript/onnxscript/type_annotation.py:70
   │  │  │        │        └─ 0.006 get_origin  typing.py:2424
   │  │  │        └─ 0.006 Converter._eval_constant_expr  ../onnxscript/onnxscript/converter.py:451
   │  │  └─ 0.145 OpSignature.from_function  torch_onnx/_schemas.py:398
   │  │     ├─ 0.053 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │  ├─ 0.037 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │  │  ├─ 0.018 _get_allowed_types_from_type_annotation  torch_onnx/_schemas.py:255
   │  │     │  │  │  └─ 0.006 [self]  torch_onnx/_schemas.py
   │  │     │  │  └─ 0.014 _is_optional  torch_onnx/_schemas.py:185
   │  │     │  │     └─ 0.011 [self]  torch_onnx/_schemas.py
   │  │     │  └─ 0.015 DataType.__call__  enum.py:686
   │  │     │        [2 frames hidden]  enum
   │  │     ├─ 0.042 signature  inspect.py:3278
   │  │     │     [5 frames hidden]  inspect
   │  │     └─ 0.039 get_type_hints  typing.py:2300
   │  │           [9 frames hidden]  typing, <built-in>
   │  ├─ 0.040 wrapper  torch/export/exported_program.py:80
   │  │     [20 frames hidden]  torch
   │  └─ 0.033 create_onnx_friendly_decomposition_table  torch_onnx/_decomp.py:39
   │     └─ 0.028 _get_registered_ops  torch_onnx/_decomp.py:12
   │        └─ 0.025 OnnxRegistry.is_registered  torch_onnx/_registration.py:232
   │           └─ 0.025 OnnxRegistry.get_decomps  torch_onnx/_registration.py:209
   │              └─ 0.024 [self]  torch_onnx/_registration.py
   └─ 0.088 export  torch/export/__init__.py:73
         [76 frames hidden]  torch, contextlib, ast, traceback

repo: justinchuby/torch-onnx


text:
Newsfeed New Pattern Issue

I have a model called 'POSTNEWS' and it has been registered with actstream alongside USER model. I want to achieve the same or similar newsfeed pattern like Twitter.
I created a template that shows all item in 'POSTNEWS', so when a user visits url '/timeline/', all items in 'POSTNEWS' model will be displayed in template 'allnews.html'.
Now, I want this-  when a user lets call the user 'Jack', visits /timeline/, he should only see his items and items of people he is following and items of people who are following him.
Can I achieve this process with this package? I read through the docs but I'm yet to understand or know how to go about this.

yes you should. to get more faster response for your support queries post on the gitter chat channel first

source: gharchive/issue

authors: auvipy bobozar

repo: justquick/django-activity-stream

license_type: permissive

license_source: bigquery


text:
Fixed createTLSConfig function

Return full TLS configuration when ca, cert, key, and insecure flag are set.
Related to this issue: https://github.com/justwatchcom/elasticsearch_exporter/issues/158
Tested on elasticsearch:6.4.2 + search-guard-6:6.4.2-23.1 TLS plugin

Hi @username1366,
thanks for the PR, looks good

source: gharchive/pull-request


text:
update to juttle 0.7.0

Bump the package.json to the new adapter API.
Add a check for nested fields in the query parsing.
Update the changelog for the pending release.

@mstemm

lgtm.

I think a more appropriate place for the check would be Linter. It is scans the filter AST before everything else with an explicit purpose to validate it and there are already similar checks there.

I moved the check to the linter as suggested by @dmajda. Will merge and publish now.

authors: demmer dmajda mstemm

repo: juttle/juttle-influx-adapter


text:
Resolve how to handle error messages in backends

Backends need to be able to produce custom error messages but at the same time integrate into the overall Juttle error handling & messaging scheme.

I see a couple of ways how to handle this:

Don’t allow adapters to extend the Juttle message list. In practice, this means the adapters would use various predefined messages (e.g. RT-NUMBER-ERROR) for option handling and other common situations, but for everything else they would use a generic RT-ADAPTER-ERROR with a custom message (i.e. the definition in messages.json would look like "RT-ADAPTER-ERROR": "Adapter error: {message}").

The advantage of this approach is simplicity. The disadvantages are scattering the messages around the codebase and different style of error reporting in Juttle core and in adapters.

Allow adapters to define their own namespaced messages. For example, juttle-graphite-adapter would implicitly define a message namespace with the same name and Juttle would automatically load messages defined in adapter’s lib/messages.json file into it. Juttle core messages would live in namespace juttle. When creating an error/warning, it would be possible to specify the namespace for message lookup, the default being juttle.

This approach is clean and structured and it ensures errors would be defined and reported the same way across the codebase. On the other hand, it’s not that simple.

Allow adapters to define their own messages without namespaces. Same as 2. except that all messages would be in the same namespace and we’d use prefixes. For example, JUTTLE-INVALID-FILTER would be a Juttle core error but JUTTLE-GRAPHITE-ADAPTER-INVALID-FILTER would be an adapter error.

This approach is simpler than 2. but isn’t as structured.

All these options assume that we generally don’t want adapters to throw plain JavaScript errors (not descending from JuttleError). This is in line with the approach used in Juttle core where plain JavaScript errors generally signal internal errors and bugs while JuttleErrors are used for “expected” problems.
@demmer @bkutil Thoughts?

My instinct is that we should do a combination of (1) and (3).
What I mean by that is that we can support two approaches and leave it up to the adapter implementer how they want to handle their custom errors.
For adapters that expect to have a number of different custom error types and for which users might find the error codes useful / descriptive, we should do (3) allow the error namespace to be extended with additional messages. To avoid inadvertent conflicts we would make it an error to override a message (i.e. reuse a code) so by convention each adapter should prefix its custom message with the name of the adapter. Over time, common errors that apply to multiple adapters would migrate into the juttle core.
At the same time, we could support (1) but in a somewhat nicer way in that adapters could just use the existing RT-CUSTOM-ERROR or we could define a new JUTTLE-GENERIC-ERROR in which the adapter can still control the full error message at runtime while indicating that the error is expected and not an internal javascript Error.

There is one more option which I’d call “2. with magic” :-)
There would still be a separate namespace for each adapter, but inside the adapter code the default namespace would be the one of the adapter with juttle as a fallback. So the adapter author would just write his/her messages.json file, use codes from it or generic Juttle ones, and won’t have to know about the namespaces at all — everything would just work. And we could still add a generic error code for the simple cases.
The biggest advantage of this approach against 3. is avoiding prefixes in the messages (= shorter codes).
The implementation would be easy — we’d just need to wrap calls into the adapter with message lookup path change (from “look in juttle” to “look in juttle-foo-adapter, then in juttle”).
Normally I don’t like “magic” solutions much, but here the workflow is really smooth, so the more I think about it the more I like it…

IIUC, there are a couple of objectives:

Adapters and core uses the same error classes and same semantics - key defining the meaning of the error.
Using namespaces / key prefixes to avoid conflicts
Flexible/easy definition of new errors by the adapter authors.

The first approach satisfies 3, but not 1 and 2.
The second approach satisfies 1. and 2, with added lookups of namespaces, it also satisfies 3.
The third approach satisfies 1., 2 and 3. to a degree.
Now, if the complexity of lookups in the second approach is low (IMHO won't be much more than for 3. - IIUC, we will just search for a message in a different namespace, instead of using a different key), I'd say lets go for that. It will lead to cleaner error keys, compared to the third approach, which will have the prefix repeated in every key.

@demmer What do you think about my “2. with magic” proposal?

In a discussion with @demmer we decided to go with a variant of the “2. with magic” approach.
There would be separate namespaces for adapter messages. The semantics of “look in juttle-foo-adapter namespace, then in juttle namespace” would be implemented by helpers for building exceptions in adapters. Beside being less “magic”, this implementation will also work correctly in async code (which can build & throw exceptions well after the original adapter call finished).

authors: bkutil demmer dmajda dmehra

repo: juttle/juttle


text:
Runtime error: Unexpected value '[object Object]' imported by the module 'AppModule'. Please add a @NgModule annotation.

I am using angular-cli. I am using this generator and I am very happy with it except that I have a runtime error when I build my app using --prod. I have set all the "dependencies" for @angular/... to "4.1.3" in my app's package.json. I have set all the "devDependencies" for @angular/... to "4.1.3" in my library's package.json and "peerDependencies" for @angular/core to "4.1.3" in src/package.json. But it does not solve the problem. Can anyone offer any help? Thanks.
{Edit} I am using the instructions in the "Consuming your library during development" section to npm link because we do not yet have our own package repo. Could this be the problem?

For anyone who might also encounter this problem...
"NgModule from one node_modules does not equal NgModule from another node_modules even if they're the same version"
... and there is the problem.
To solve this...
you need to have a central location for all your app and lib dependencies, for example, a global npm cache.
For each shared dependency, go into the global cache's node_modules/[dependency] folder, node_modules/@angular/core for example, and create an npm link by executing sudo npm link.
Then delete the @angular folder that exists in all of your app and lib node_modules folders and from the node_modules folders execute sudo npm link [dependency], so sudo npm link @angular/core for example, for each dependency.
Rebuild your libs, then rebuild your apps.

thanks for the solution. I hope we'll get a easier way to solve that soon !

Thank you for reporting.
See #113 for a solution. Closing this issue but feel free to re-open if needed 👍

license: mit


text:
🛑 SALUD SOCIAL is down

In 057d995, SALUD SOCIAL (https://saludsocial.tonoip.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: SALUD SOCIAL is back up in 810d378.

repo: jveyes/upptime

license: MIT

license_source: github-api


text:
🛑 SALUD SOCIAL is down

In 9d043b8, SALUD SOCIAL (https://saludsocial.tonoip.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: SALUD SOCIAL is back up in 8c20358.


text:
Locating .java_pid in Aurora/Mesos

First of all, a huge shout out for making async-profiler so awesome! We've been using it quite successfully in our dedicated Mesos pools (#147 made it super easy!). As of 1.5, I was eager to try the new --all-user option, which opens so many possibilities for us! Now we can run it in a shared Mesos pool! Well, must be able to.
I did some experimenting today and I think, jattach having a little hard time locating a java_pid file for my process. Here are some details:
Worth mentioning that before I run jattach the first time, there is no java_pid file in the process tmp (which conveniently located one level up). 495647 is my process (I'm, csl-perf, the owner).
sandbox $ ls -la ../tmp/
total 964
drwxrwxrwt 3 root     root               54 Feb  8 19:59 .
drwxr-xr-x 7 root     root             4096 Feb  8 19:59 ..
drwxr-xr-x 2 csl-perf serviceaccount     19 Feb  8 19:59 hsperfdata_csl-perf
-rw-r--r-- 1 csl-perf serviceaccount 605737 Feb  8 20:00 perf-495647.map

After a first unsuccessful attempt of jattach, the pid file is being created. I understand that jattach has a retry logic in it, and if it able to locate a pid-file, it should just attach.
sandbox $ ./async-profiler/profiler.sh -d 10 -f out.txt 495647
Could not start attach mechanism: No such file or directory
sandbox $ ls -la ../tmp/
total 964
drwxrwxrwt 3 root     root               76 Feb  8 20:00 .
drwxr-xr-x 7 root     root             4096 Feb  8 19:59 ..
drwxr-xr-x 2 csl-perf serviceaccount     19 Feb  8 19:59 hsperfdata_csl-perf
srw------- 1 csl-perf serviceaccount      0 Feb  8 20:00 .java_pid495647
-rw-r--r-- 1 csl-perf serviceaccount 621647 Feb  8 20:00 perf-495647.map

Some details:
sandbox $ lsof -p 495647 | grep java_pid
lsof: WARNING: can't stat() tracefs file system /sys/kernel/debug/tracing

sandbox $ readlink -f /proc/495647/root/tmp
/tmp

sandbox $ ls -la /proc/495647/fd | grep java_pid // nothing there

And strace jattach:
async-profiler $ strace build/jattach 495647 load build/libasyncProfiler.so true start,event=alloc,file=t.svg,svg
execve("build/jattach", ["build/jattach", "495647", "load", "build/libasyncProfiler.so", "true", "start,event=alloc,file=t.svg,svg"], [/* 25 vars */]) = 0
brk(NULL)                               = 0x1e21000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd06a0c7000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=56806, ...}) = 0
mmap(NULL, 56806, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd06a0b9000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P%\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2173512, ...}) = 0
mmap(NULL, 3981792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd069ada000
mprotect(0x7fd069c9d000, 2093056, PROT_NONE) = 0
mmap(0x7fd069e9c000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c2000) = 0x7fd069e9c000
mmap(0x7fd069ea2000, 16864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fd069ea2000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd06a0b8000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd06a0b6000
arch_prctl(ARCH_SET_FS, 0x7fd06a0b6740) = 0
mprotect(0x7fd069e9c000, 16384, PROT_READ) = 0
mprotect(0x602000, 4096, PROT_READ)     = 0
mprotect(0x7fd06a0c8000, 4096, PROT_READ) = 0
munmap(0x7fd06a0b9000, 56806)           = 0
geteuid()                               = 2138
getegid()                               = 1058
readlink("/proc/495647/root", "/", 950) = 1
brk(NULL)                               = 0x1e21000
brk(0x1e42000)                          = 0x1e42000
brk(NULL)                               = 0x1e42000
open("/proc/495647/status", O_RDONLY)   = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd06a0c6000
read(3, "Name:\tjava\nUmask:\t0022\nState:\tS "..., 1024) = 1024
read(3, "1\nvoluntary_ctxt_switches:\t3\nnon"..., 1024) = 59
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x7fd06a0c6000, 4096)            = 0
stat("/proc/self/ns/mnt", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
stat("/proc/495647/ns/mnt", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
open("/proc/495647/ns/mnt", O_RDONLY)   = 3
setns(3, 0)                             = -1 EPERM (Operation not permitted)
close(3)                                = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd06a0c6000
write(1, "WARNING: couldn't enter target p"..., 53WARNING: couldn't enter target process mnt namespace
) = 53
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7fd069b102f0}, {SIG_DFL, [], 0}, 8) = 0
stat("/tmp/.java_pid495647", 0x7ffffba0eec0) = -1 ENOENT (No such file or directory)
creat("/proc/495647/cwd/.attach_pid495647", 0660) = 3
close(3)                                = 0
stat("/proc/495647/cwd/.attach_pid495647", {st_mode=S_IFREG|0640, st_size=0, ...}) = 0
geteuid()                               = 2138
kill(495647, SIGQUIT)                   = 0
nanosleep({0, 20000000}, NULL)          = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 40000000}, NULL)          = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 60000000}, NULL)          = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 80000000}, NULL)          = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 100000000}, NULL)         = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 120000000}, NULL)         = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 140000000}, NULL)         = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 160000000}, NULL)         = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 180000000}, NULL)         = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 200000000}, NULL)         = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 220000000}, NULL)         = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 240000000}, NULL)         = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 260000000}, NULL)         = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
nanosleep({0, 280000000}, NULL)         = 0
stat("/tmp/.java_pid495647", 0x7ffffba0ea00) = -1 ENOENT (No such file or directory)
unlink("/proc/495647/cwd/.attach_pid495647") = 0
dup(2)                                  = 3
fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd06a0c5000
write(3, "Could not start attach mechanism"..., 60Could not start attach mechanism: No such file or directory
) = 60
close(3)                                = 0
munmap(0x7fd06a0c5000, 4096)            = 0
exit_group(1)                           = ?
+++ exited with 1 +++

I belive this is the relevan part:
open("/proc/495647/ns/mnt", O_RDONLY)   = 3
setns(3, 0)                             = -1 EPERM (Operation not permitted)
close(3)                                = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd06a0c6000
write(1, "WARNING: couldn't enter target p"..., 53WARNING: couldn't enter target process mnt namespace
) = 53

Some details about it:
async-profiler $ ls -la /proc/495647/ns/mnt
lrwxrwxrwx 1 csl-perf serviceaccount 0 Feb  8 20:00 /proc/495647/ns/mnt -> mnt:[4026533548]

I, csl-perf, still seems to be the owner there.
Would appreciate for any pointers on how to debug this further.
UDPATE: Simlimking ../tmp to /tmp surely helps. I guess my question is more if it's possible to locate .java_pid automatically, which works for us in dedicated pool.
I want to see what strace looks like when I run it within a dedicated host, where it's known to be able to attach. Will post my findings in the comment.s

Here is strace for a dedicated host (it's able to connect successfully). Note: dedicated host seems to create a .java_pid under root's tmp:
sandbox $ ls -la /tmp
total 6008
drwxrwxrwt  5 root       root              4096 Feb  8 21:45 .
dr-xr-xr-x 19 root       root              4096 Jul 28  2018 ..
srw-------  1 csl-perf   serviceaccount       0 Feb  8 21:44 .java_pid502447

async-profiler $ strace build/jattach 502447 load build/libasyncProfiler.so true start,event=alloc,file=t.svg,svg
execve("build/jattach", ["build/jattach", "502447", "load", "build/libasyncProfiler.so", "true", "start,event=alloc,file=t.svg,svg"], [/* 25 vars */]) = 0
brk(NULL)                               = 0xbdb000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0e7c93b000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=58148, ...}) = 0
mmap(NULL, 58148, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0e7c92c000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340$\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2151672, ...}) = 0
mmap(NULL, 3981792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0e7c34e000
mprotect(0x7f0e7c510000, 2097152, PROT_NONE) = 0
mmap(0x7f0e7c710000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c2000) = 0x7f0e7c710000
mmap(0x7f0e7c716000, 16864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0e7c716000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0e7c92b000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0e7c929000
arch_prctl(ARCH_SET_FS, 0x7f0e7c929740) = 0
mprotect(0x7f0e7c710000, 16384, PROT_READ) = 0
mprotect(0x602000, 4096, PROT_READ)     = 0
mprotect(0x7f0e7c93c000, 4096, PROT_READ) = 0
munmap(0x7f0e7c92c000, 58148)           = 0
geteuid()                               = 2138
getegid()                               = 1058
readlink("/proc/502447/root", "/", 950) = 1
brk(NULL)                               = 0xbdb000
brk(0xbfc000)                           = 0xbfc000
brk(NULL)                               = 0xbfc000
open("/proc/502447/status", O_RDONLY)   = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0e7c93a000
read(3, "Name:\tjava\nUmask:\t0022\nState:\tS "..., 1024) = 1020
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x7f0e7c93a000, 4096)            = 0
stat("/proc/self/ns/mnt", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
stat("/proc/502447/ns/mnt", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
open("/proc/502447/ns/mnt", O_RDONLY)   = 3
setns(3, 0)                             = -1 EPERM (Operation not permitted)
close(3)                                = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0e7c93a000
write(1, "WARNING: couldn't enter target p"..., 53WARNING: couldn't enter target process mnt namespace
) = 53
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f0e7c384280}, {SIG_DFL, [], 0}, 8) = 0
stat("/tmp/.java_pid502447", {st_mode=S_IFSOCK|0600, st_size=0, ...}) = 0
socket(AF_LOCAL, SOCK_STREAM, 0)        = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/tmp/.java_pid502447"}, 110) = 0
write(1, "Connected to remote JVM\n", 24Connected to remote JVM
) = 24
write(3, "1\0", 2)                      = 2
write(3, "load\0", 5)                   = 5
write(3, "build/libasyncProfiler.so\0", 26) = 26
write(3, "true\0", 5)                   = 5
write(3, "start,event=alloc,file=t.svg,svg"..., 33) = 33
write(1, "Response code = ", 16Response code = )        = 16
read(3, "-1\n", 8191)                   = 3
write(1, "-1\n", 3-1
)                     = 3
read(3, "", 8192)                       = 0
write(1, "\n", 1
)                       = 1
close(3)                                = 0
exit_group(-1)                          = ?
+++ exited with 255 +++

Turns out it has the same warning yet able to make progress and locate pid file under root's tmp.

Hi!
It seems like Java process runs in a different mount namespace. In order to find files in that namespace the other process (jattach) needs to join that namespace via setns call. However, this syscall requires CAP_SYS_ADMIN capability, which is usually possessed only by root.
Can you run jattach under sudo ?
What does cat /proc/<javapid>/mountinfo say?

Thanks for the quick response, Andrei!
I don't even have to run under root, all I need to do is to make a simlink to my sandbox's /tmp folder:
ln -s /var/lib/mesos/slaves/7f559923-c588-4928-b967-58f186201480-S807/frameworks/201205082337-0000000003-0000/executors/foobarbaz/runs/latest/tmp/.java_pid32579 /tmp/.java_pid32579

After this, I can run async-profiler w/o any problem.
Here is the mountinfo if that helps:
sandbox $ cat /proc/32579/mountinfo
358 346 8:1 / / rw,noatime master:1 - xfs /dev/sda1 rw,attr2,nobarrier,inode64,noquota
441 358 0:6 / /dev rw,nosuid master:2 - devtmpfs devtmpfs rw,size=131870252k,nr_inodes=32967563,mode=755
463 441 0:19 / /dev/shm rw master:3 - tmpfs tmpfs rw
592 441 0:20 / /dev/pts rw,relatime master:4 - devpts devpts rw,gid=5,mode=620,ptmxmode=000
603 441 0:36 / /dev/hugepages rw,relatime master:24 - hugetlbfs hugetlbfs rw,pagesize=2M
612 441 0:17 / /dev/mqueue rw,relatime master:25 - mqueue mqueue rw
614 358 0:4 / /proc rw,relatime master:5 - proc proc rw
615 614 0:35 / /proc/sys/fs/binfmt_misc rw,relatime master:22 - autofs systemd-1 rw,fd=24,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=22650
616 358 0:18 / /sys rw,relatime master:6 - sysfs sysfs rw
617 616 0:7 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime master:7 - securityfs securityfs rw
618 616 0:22 / /sys/fs/cgroup ro,nosuid,nodev,noexec master:8 - tmpfs tmpfs ro,mode=755
619 618 0:23 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime master:9 - cgroup cgroup rw,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd
620 618 0:25 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime master:10 - cgroup cgroup rw,devices
623 618 0:26 / /sys/fs/cgroup/net_cls,net_prio rw,nosuid,nodev,noexec,relatime master:11 - cgroup cgroup rw,net_cls,net_prio
624 618 0:27 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime master:12 - cgroup cgroup rw,freezer
625 618 0:28 / /sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime master:13 - cgroup cgroup rw,cpu,cpuacct
626 618 0:29 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime master:14 - cgroup cgroup rw,perf_event
628 618 0:30 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime master:15 - cgroup cgroup rw,memory
629 618 0:31 / /sys/fs/cgroup/pids rw,nosuid,nodev,noexec,relatime master:16 - cgroup cgroup rw,pids
630 618 0:32 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime master:17 - cgroup cgroup rw,blkio
633 618 0:33 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime master:18 - cgroup cgroup rw,cpuset
636 618 0:34 / /sys/fs/cgroup/hugetlb rw,nosuid,nodev,noexec,relatime master:19 - cgroup cgroup rw,hugetlb
637 616 0:24 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime master:20 - pstore pstore rw
639 616 0:8 / /sys/kernel/debug rw,relatime master:23 - debugfs debugfs rw
641 639 0:11 / /sys/kernel/debug/tracing rw,relatime master:62 - tracefs tracefs rw
642 358 0:21 / /run rw,nosuid,nodev master:21 - tmpfs tmpfs rw,mode=755
643 642 0:21 /netns /run/netns rw,nosuid,nodev master:100 - tmpfs tmpfs rw,mode=755
644 643 0:3 net:[4026533379] /run/netns/315042 rw master:134 - nsfs nsfs rw
645 643 0:3 net:[4026533159] /run/netns/55250 rw master:149 - nsfs nsfs rw
646 643 0:3 net:[4026533718] /run/netns/421199 rw master:133 - nsfs nsfs rw
648 643 0:3 net:[4026533661] /run/netns/375139 rw master:137 - nsfs nsfs rw
649 643 0:3 net:[4026533606] /run/netns/516393 rw master:146 - nsfs nsfs rw
659 643 0:3 net:[4026534006] /run/netns/209030 rw master:150 - nsfs nsfs rw
662 643 0:3 net:[4026533725] /run/netns/129932 rw master:135 - nsfs nsfs rw
669 643 0:3 net:[4026533841] /run/netns/339292 rw master:143 - nsfs nsfs rw
672 643 0:3 net:[4026533493] /run/netns/12711 rw master:102 - nsfs nsfs rw
675 643 0:3 net:[4026533551] /run/netns/12715 rw master:141 - nsfs nsfs rw
677 643 0:3 net:[4026534003] /run/netns/6660 rw master:152 - nsfs nsfs rw
690 643 0:3 net:[4026533781] /run/netns/458489 rw master:136 - nsfs nsfs rw
699 643 0:3 net:[4026533437] /run/netns/490519 rw master:101 - nsfs nsfs rw
703 358 253:1 / /var/lib/mesos_containers rw,noatime master:26 - ext3 /dev/mapper/vg_mesos-lv_mesos_containers rw,nobarrier,errors=remount-ro,data=ordered
705 358 253:2 / /var/lib/mesos rw,noatime master:27 - xfs /dev/mapper/vg_mesos-lv_mesos rw,attr2,nobarrier,inode64,prjquota
707 358 253:0 / /var/tmp rw,noatime master:28 - ext3 /dev/mapper/vg_mesos-lv_var_tmp rw,nobarrier,errors=remount-ro,data=ordered
718 358 0:37 / /var/lib/tss/keys rw,nosuid,nodev,relatime master:96 - fuse tssfs rw,user_id=994,group_id=992,allow_other
725 643 0:3 net:[4026533778] /run/netns/29808 rw master:142 - nsfs nsfs rw
766 358 253:2 /slaves/7f559923-c588-4928-b967-58f186201480-S807/frameworks/201205082337-0000000003-0000/executors/foobarbaz/runs/3afe8a0a-b7f4-48b6-86fc-bdcdcaab985e/tmp /tmp rw,noatime master:27 - xfs /dev/mapper/vg_mesos-lv_mesos rw,attr2,nobarrier,inode64,prjquota
768 705 253:0 /aurora /var/lib/mesos/slaves/7f559923-c588-4928-b967-58f186201480-S807/frameworks/201205082337-0000000003-0000/executors/foobarbaz/runs/3afe8a0a-b7f4-48b6-86fc-bdcdcaab985e/var/tmp/aurora rw,noatime master:28 - ext3 /dev/mapper/vg_mesos-lv_var_tmp rw,nobarrier,errors=remount-ro,data=ordered
769 707 253:2 /slaves/7f559923-c588-4928-b967-58f186201480-S807/frameworks/201205082337-0000000003-0000/executors/foobarbaz/runs/3afe8a0a-b7f4-48b6-86fc-bdcdcaab985e/var/tmp /var/tmp rw,noatime master:27 - xfs /dev/mapper/vg_mesos-lv_mesos rw,attr2,nobarrier,inode64,prjquota
772 769 253:0 /aurora /var/tmp/aurora rw,noatime master:28 - ext3 /dev/mapper/vg_mesos-lv_var_tmp rw,nobarrier,errors=remount-ro,data=ordered
792 642 0:38 / /run/user/2138 rw,nosuid,nodev,relatime master:144 - tmpfs tmpfs rw,size=26376296k,mode=700,uid=2138,gid=1058
921 642 0:39 / /run/user/0 rw,nosuid,nodev,relatime master:153 - tmpfs tmpfs rw,size=26376296k,mode=700

Looks like it should be possible to derive tmp folder location from there?
ls -la /var/lib/mesos/slaves/7f559923-c588-4928-b967-58f186201480-S807/frameworks/201205082337-0000000003-0000/executors/foobarbaz/runs/3afe8a0a-b7f4-48b6-86fc-bdcdcaab985e/tmp

drwxrwxrwt 3 root     root              4096 Feb  8 22:06 .
drwxr-xr-x 7 root     root              4096 Feb  8 21:56 ..
-rw-r--r-- 1 csl-perf serviceaccount     151 Feb  8 22:04 async-profiler.72105.32579
-rw-r--r-- 1 csl-perf serviceaccount  716789 Feb  8 22:05 async-profiler.72780.32579
-rw-r--r-- 1 csl-perf serviceaccount  693569 Feb  8 22:06 async-profiler.73529.32579
drwxr-xr-x 2 csl-perf serviceaccount      18 Feb  8 21:56 hsperfdata_csl-perf
srw------- 1 csl-perf serviceaccount       0 Feb  8 21:58 .java_pid32579
-rw-r--r-- 1 csl-perf serviceaccount 1191588 Feb  8 22:09 perf-32579.map

The the following line in /proc/pid/mountinfo suggests the real location of /tmp mount:
766 358 253:2 /slaves/7f559923-c588-4928-b967-58f186201480-S807/frameworks/201205082337-0000000003-0000/executors/foobarbaz/runs/3afe8a0a-b7f4-48b6-86fc-bdcdcaab985e/tmp /tmp rw,noatime master:27 - xfs /dev/mapper/vg_mesos-lv_mesos rw,attr2,nobarrier,inode64,prjquota

So is the directory /slaves/7f559923-c588-4928-b967-58f186201480-S807/frameworks/201205082337-0000000003-0000/executors/foobarbaz/runs/3afe8a0a-b7f4-48b6-86fc-bdcdcaab985e/tmp accessible from your shell (I mean by this exact path)?

Yea, I looked it up too. It's not, but if you prefix it with /var/lib/mesos it's accessible - not exactly sure why it works this way.

It seems to be mounting / to /var/lib/mesos (see a couple of lines above). Maybe that's from where that's prefix is coming from?
I checked again, there is no /slaves/... folder (in the root) on my host.

I'm afraid things are even more complicated. It's not always enough to parse just /proc/pid/mountinfo, but it is also necessary to look into /proc/self/mountinfo and then try to match one with another. And I can imagine a situation when this won't work either.
Probably we can fall back to your original suggestion to override /tmp path with some jattach argument (or better with environment variable)?

Oh yeah, I like it - it's very simple. This could be a very reasonable path forward. Either an env variable or just a plain process argument would totally work for us!

/tmp directory of the target process can now be overridden with JATTACH_PATH environment variable. I've choosen env variable instead of command-line argument to avoid passing arguments between jattach and profiler.sh script.

Thanks @apangin! This looks great - I'm going to give it a try next time we update our async-profiler binaries.

authors: apangin vkostyukov

repo: jvm-profiling-tools/async-profiler