Skip to content

Commit 829ea59

Browse files
authored
[docs] Add a section on AI-generated content to the developer policy (#91014)
Governments around the world are starting to require labelling for AI-generated content, and some LLVM stakeholders have asked if LLVM contains AI-generated content. Defining a policy on the use of AI tools allows us to answer that question affirmatively, one way of the other. The policy proposed here allows the use of AI tools in LLVM contributions, flowing from the idea that any contribution is fine regardless of how it is made, as long as the contributor has the right to license it under the project license. I gathered input from the community in this RFC and incorporated it into the policy: https://discourse.llvm.org/t/rfc-define-policy-on-ai-tool-usage-in-contributions/78758
1 parent 5804193 commit 829ea59

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

llvm/docs/DeveloperPolicy.rst

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,8 @@ If you have questions or comments about these topics, please ask on the
10771077
please realize that most compiler developers are not lawyers, and therefore you
10781078
will not be getting official legal advice.
10791079

1080+
.. _LLVM Discourse forums: https://discourse.llvm.org
1081+
10801082
Copyright
10811083
---------
10821084

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

1304-
.. _LLVM Discourse forums: https://discourse.llvm.org
1306+
.. _ai contributions:
1307+
1308+
AI generated contributions
1309+
--------------------------
1310+
1311+
Artificial intelligence systems raise many questions around copyright that have
1312+
yet to be answered. Our policy on AI tools is guided by our copyright policy:
1313+
Contributors are responsible for ensuring that they have the right to contribute
1314+
code under the terms of our license, typically meaning that either they, their
1315+
employer, or their collaborators hold the copyright. Using AI tools to
1316+
regenerate copyrighted material does not remove the copyright, and contributors
1317+
are responsible for ensuring that such material does not appear in their
1318+
contributions.
1319+
1320+
As such, the LLVM policy is that contributors are permitted to use artificial
1321+
intelligence tools to produce contributions, provided that they have the right
1322+
to license that code under the project license. Contributions found to violate
1323+
this policy will be removed just like any other offending contribution.
1324+
1325+
While the LLVM project has a liberal policy on AI tool use, contributors are
1326+
considered responsible for their contributions. We encourage contributors to
1327+
review all generated code before sending it for review to verify its
1328+
correctness and to understand it so that they can answer questions during code
1329+
review. Reviewing and maintaining generated code that the original contributor
1330+
does not understand is not a good use of limited project resources.

llvm/docs/FAQ.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ Yes. This is why we distribute LLVM under a less restrictive license than GPL,
2222
as explained in the first question above.
2323

2424

25+
Can I use AI coding tools, such as GitHub co-pilot, to write LLVM patches?
26+
--------------------------------------------------------------------------
27+
Yes, as long as the resulting work can be licensed under the project license, as
28+
covered in the :doc:`DeveloperPolicy`. Using an AI tool to reproduce copyrighted
29+
work does not rinse it of copyright and grant you the right to relicense it.
30+
31+
2532
Source Code
2633
===========
2734

0 commit comments

Comments
 (0)