[DOCS] Some more fixes (#455)
This commit is contained in:
@@ -34,14 +34,17 @@ def process_sig(app, what, name, obj, options, signature, return_annotation):
|
|||||||
def setup(app):
|
def setup(app):
|
||||||
"""Customize function args retrieving to get args under decorator."""
|
"""Customize function args retrieving to get args under decorator."""
|
||||||
import sphinx
|
import sphinx
|
||||||
import triton
|
import os
|
||||||
|
|
||||||
app.connect("autodoc-process-signature", process_sig)
|
app.connect("autodoc-process-signature", process_sig)
|
||||||
|
os.system("pip install -e ../python")
|
||||||
|
|
||||||
|
|
||||||
def forward_jit_fn(func):
|
def forward_jit_fn(func):
|
||||||
old = func
|
old = func
|
||||||
|
|
||||||
def wrapped(obj, **kwargs):
|
def wrapped(obj, **kwargs):
|
||||||
|
import triton
|
||||||
if isinstance(obj, triton.code_gen.JITFunction):
|
if isinstance(obj, triton.code_gen.JITFunction):
|
||||||
obj = obj.fn
|
obj = obj.fn
|
||||||
return old(obj)
|
return old(obj)
|
||||||
@@ -52,6 +55,7 @@ def setup(app):
|
|||||||
old_documenter = sphinx.ext.autosummary.get_documenter
|
old_documenter = sphinx.ext.autosummary.get_documenter
|
||||||
|
|
||||||
def documenter(app, obj, parent):
|
def documenter(app, obj, parent):
|
||||||
|
import triton
|
||||||
if isinstance(obj, triton.code_gen.JITFunction):
|
if isinstance(obj, triton.code_gen.JITFunction):
|
||||||
obj = obj.fn
|
obj = obj.fn
|
||||||
return old_documenter(app, obj, parent)
|
return old_documenter(app, obj, parent)
|
||||||
@@ -70,7 +74,7 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.autosu
|
|||||||
autosummary_generate = True
|
autosummary_generate = True
|
||||||
|
|
||||||
# versioning config
|
# versioning config
|
||||||
smv_tag_whitelist = r'^(v1.1.1)$'
|
smv_tag_whitelist = r'^(v1.1.2)$'
|
||||||
smv_branch_whitelist = r'^master$'
|
smv_branch_whitelist = r'^master$'
|
||||||
smv_remote_whitelist = None
|
smv_remote_whitelist = None
|
||||||
smv_released_pattern = r'^tags/.*$'
|
smv_released_pattern = r'^tags/.*$'
|
||||||
|
Reference in New Issue
Block a user