Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc clarification] Added unidirectional text for LayerNorm #5686

Merged

Conversation

AlexandreEichenberger
Copy link
Contributor

@AlexandreEichenberger AlexandreEichenberger commented Oct 19, 2023

Description

Doc only, added clarification that scale and B can be uni-directionally expanded to X. Current def is not explicit on this point.

Motivation and Context

Clarification of docs to be more explicit.
Issue discussed here #5666

Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
onnx/defs/nn/defs.cc Fixed Show fixed Hide fixed
onnx/defs/nn/defs.cc Fixed Show fixed Hide fixed
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!.

docs/Changelog-ml.md Outdated Show resolved Hide resolved
@justinchuby
Copy link
Contributor

Looks like there’s some unrelated changes?

onnx/defs/nn/defs.cc Outdated Show resolved Hide resolved
@justinchuby justinchuby added operator Issues related to ONNX operators spec clarification Clarification of the ONNX spec needed auto update doc Generate md/proto files automatically using the CI pipeline labels Oct 19, 2023
@justinchuby
Copy link
Contributor

I added auto gen doc to see if it would fix the generated file issues.

Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@justinchuby justinchuby left a comment

Choose a reason for hiding this comment

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

@AlexandreEichenberger
Copy link
Contributor Author

The documentation indicated to run tools/update_doc.sh but that resulted in failures (in addition, still rely on python instead of python3. I then try to do a build, but since we are using a slightly different protobuf for onnx-mlir, did not want to install anything. I finally saw a suggestion to do a python3 onnx/defs/gen_doc.py which seems to have generated the right doc.

Being very new to doc update, it might be nice to have an entry somewhere in the doc "I just want to clarify a documentation issue, here is how to proceed". If you let me know what is the approved approach to that, happy to update the doc.

@justinchuby
Copy link
Contributor

justinchuby commented Oct 19, 2023

The new auto update doc label will handle documentation updates nicely now :) Locally tools/update_doc.sh should work. Could you post the error?

@justinchuby justinchuby added this pull request to the merge queue Oct 19, 2023
Merged via the queue into onnx:main with commit bbe7011 Oct 19, 2023
37 checks passed
@AlexandreEichenberger
Copy link
Contributor Author

First it's still using python which I don't have. So I just ln -s python3, which might be the cause of the issues. Below is the log

alexe@AChampignon onnx % tools/update_doc.sh
===> recompile onnx
running develop
/opt/homebrew/lib/python3.11/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
running egg_info
writing onnx.egg-info/PKG-INFO
writing dependency_links to onnx.egg-info/dependency_links.txt
writing entry points to onnx.egg-info/entry_points.txt
writing requirements to onnx.egg-info/requires.txt
writing top-level names to onnx.egg-info/top_level.txt
reading manifest file 'onnx.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c' under directory 'onnx'
warning: no files found matching '*' under directory 'third_party'
adding license file 'LICENSE'
writing manifest file 'onnx.egg-info/SOURCES.txt'
running build_ext
running cmake_build
Extra cmake args: ['-DONNX_USE_PROTOBUF_SHARED_LIBS=ON']
Using cmake args: ['/opt/homebrew/bin/cmake', '-DPYTHON_INCLUDE_DIR=/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11', '-DPYTHON_EXECUTABLE=/opt/homebrew/opt/python@3.11/bin/python3.11', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-311-darwin.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '-DONNX_USE_PROTOBUF_SHARED_LIBS=ON', '/Users/alexe/Data/onnx/onnx']
-- ONNX_PROTOC_EXECUTABLE: /usr/local/bin/protoc
-- Protobuf_VERSION: 3.20.3
Generated: /Users/alexe/Data/onnx/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
Generated: /Users/alexe/Data/onnx/onnx/.setuptools-cmake-build/onnx/onnx-operators-ml.proto
Generated: /Users/alexe/Data/onnx/onnx/.setuptools-cmake-build/onnx/onnx-data.proto
-- Could NOT find pybind11 (missing: pybind11_DIR)
CMake Error at CMakeLists.txt:561 (message):
  cannot find pybind


-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
  File "/Users/alexe/Data/onnx/onnx/setup.py", line 327, in <module>
    setuptools.setup(
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
    super().run_command(command)
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/Users/alexe/Data/onnx/onnx/setup.py", line 259, in run
    return super().run()
           ^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/command/develop.py", line 34, in run
    self.install_for_development()
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/command/develop.py", line 109, in install_for_development
    self.run_command('build_ext')
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
    super().run_command(command)
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/Users/alexe/Data/onnx/onnx/setup.py", line 264, in run
    self.run_command("cmake_build")
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
    super().run_command(command)
  File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/Users/alexe/Data/onnx/onnx/setup.py", line 235, in run
    subprocess.check_call(cmake_args)
  File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/homebrew/bin/cmake', '-DPYTHON_INCLUDE_DIR=/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11', '-DPYTHON_EXECUTABLE=/opt/homebrew/opt/python@3.11/bin/python3.11', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-311-darwin.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '-DONNX_USE_PROTOBUF_SHARED_LIBS=ON', '/Users/alexe/Data/onnx/onnx']' returned non-zero exit status 1.

@justinchuby
Copy link
Contributor

The error is cannot find pybind. Perhaps pybind was not in the search path?

@gramalingam
Copy link
Contributor

Also worth checking if the git submodules have been updated, since pybind is a submodule, IIRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto update doc Generate md/proto files automatically using the CI pipeline operator Issues related to ONNX operators spec clarification Clarification of the ONNX spec needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants