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

[docs] Add a section on AI-generated content to the developer policy #91014

Merged
merged 7 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion llvm/docs/DeveloperPolicy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,8 @@ If you have questions or comments about these topics, please ask on the
please realize that most compiler developers are not lawyers, and therefore you
will not be getting official legal advice.

.. _LLVM Discourse forums: https://discourse.llvm.org

Copyright
---------

Expand Down Expand Up @@ -1301,4 +1303,28 @@ to move code from (e.g.) libc++ to the LLVM core without concern, but that code
cannot be moved from the LLVM core to libc++ without the copyright owner's
permission.

.. _LLVM Discourse forums: https://discourse.llvm.org
.. _ai contributions:

AI generated contributions
--------------------------

Artificial intelligence systems raise many questions around copyright that have
yet to be answered. Our policy on AI tools is guided by our copyright policy:
Contributors are responsible for ensuring that they have the right to contribute
code under the terms of our license, typically meaning that either they, their
employer, or their collaborators hold the copyright. Using AI tools to
regenerate copyrighted material does not remove the copyright, and contributors
are responsible for ensuring that such material does not appear in their
contributions.

As such, the LLVM policy is that contributors are permitted to use artificial
intelligence tools to produce contributions, provided that they have the right
to license that code under the project license. Contributions found to violate
this policy will be removed just like any other offending contribution.

While the LLVM project has a liberal policy on AI tool use, contributors are
considered responsible for their contributions. We encourage contributors to
review all generated code before sending it for review to verify its
correctness and to understand it so that they can answer questions during code
review. Reviewing and maintaining generated code that the original contributor
does not understand is not a good use of limited project resources.
7 changes: 7 additions & 0 deletions llvm/docs/FAQ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ Yes. This is why we distribute LLVM under a less restrictive license than GPL,
as explained in the first question above.


Can I use AI coding tools, such as GitHub co-pilot, to write LLVM patches?
--------------------------------------------------------------------------
Yes, as long as the resulting work can be licensed under the project license, as
covered in the :doc:`DeveloperPolicy`. Using an AI tool to reproduce copyrighted
work does not rinse it of copyright and grant you the right to relicense it.


Source Code
===========

Expand Down
Loading