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

[CI] Upgrade CI image to 20241105-030952-3e386fd3 #17451

Merged
merged 16 commits into from
Nov 26, 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
20 changes: 10 additions & 10 deletions ci/jenkins/docker-images.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

# This data file is read during when Jenkins runs job to determine docker images.
[jenkins]
ci_arm: tlcpack/ci-arm:20240917-153130-9f281758
ci_cortexm: tlcpack/ci-cortexm:20240917-153130-9f281758
ci_cpu: tlcpack/ci_cpu:20240917-153130-9f281758
ci_gpu: tlcpack/ci-gpu:20240917-153130-9f281758
ci_hexagon: tlcpack/ci-hexagon:20240917-153130-9f281758
ci_i386: tlcpack/ci-i386:20240917-153130-9f281758
ci_lint: tlcpack/ci-lint:20240917-153130-9f281758
ci_minimal: tlcpack/ci-minimal:20240917-153130-9f281758
ci_riscv: tlcpack/ci-riscv:20240917-153130-9f281758
ci_wasm: tlcpack/ci-wasm:20240917-153130-9f281758
ci_arm: tlcpack/ci-arm:20241119-020227-6fc0598c
ci_cortexm: tlcpack/ci-cortexm:20241119-020227-6fc0598c
ci_cpu: tlcpack/ci_cpu:20241119-020227-6fc0598c
ci_gpu: tlcpack/ci-gpu:20241119-020227-6fc0598c
ci_hexagon: tlcpack/ci-hexagon:20241119-020227-6fc0598c
ci_i386: tlcpack/ci-i386:20241119-020227-6fc0598c
ci_lint: tlcpack/ci-lint:20241119-020227-6fc0598c
ci_minimal: tlcpack/ci-minimal:20241119-020227-6fc0598c
ci_riscv: tlcpack/ci-riscv:20241119-020227-6fc0598c
ci_wasm: tlcpack/ci-wasm:20241119-020227-6fc0598c
8 changes: 4 additions & 4 deletions ci/jenkins/unity_jenkinsfile.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
import org.jenkinsci.plugins.pipeline.modeldefinition.Utils

// NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
ci_lint = 'tlcpack/ci_lint:20240917-153130-9f281758'
ci_gpu = 'tlcpack/ci_gpu:20240917-153130-9f281758'
ci_cpu = 'tlcpack/ci_cpu:20240917-153130-9f281758'
ci_lint = 'tlcpack/ci_lint:20241119-020227-6fc0598c'
ci_gpu = 'tlcpack/ci_gpu:20241119-020227-6fc0598c'
ci_cpu = 'tlcpack/ci_cpu:20241119-020227-6fc0598c'
ci_wasm = 'tlcpack/ci-wasm:v0.72'
ci_i386 = 'tlcpack/ci-i386:v0.75'
ci_qemu = 'tlcpack/ci-qemu:v0.11'
ci_arm = 'tlcpack/ci-arm:v0.08'
ci_hexagon = 'tlcpack/ci_hexagon:20240917-153130-9f281758'
ci_hexagon = 'tlcpack/ci_hexagon:20241119-020227-6fc0598c'
// <--- End of regex-scanned config.

// Parameters to allow overriding (in Jenkins UI), the images
Expand Down
11 changes: 6 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ def split_code_and_text_blocks(source_file, return_node, real_func):


@monkey_patch("sphinx_gallery.gen_rst", "save_rst_example")
def save_rst_example(example_rst, example_file, time_elapsed, memory_used, gallery_conf, real_func):
def save_rst_example(
example_rst, example_file, time_elapsed, memory_used, gallery_conf, language, real_func
):
"""Monkey-patch save_rst_example to include the "Open in Colab" button."""

# The url is the md5 hash of the notebook path.
Expand All @@ -178,7 +180,9 @@ def save_rst_example(example_rst, example_file, time_elapsed, memory_used, galle
python_file=example_fname, ref_name=ref_fname, colab_url=colab_url, button_svg=BUTTON
)
with patch("sphinx_gallery.gen_rst.EXAMPLE_HEADER", new_header):
real_func(example_rst, example_file, time_elapsed, memory_used, gallery_conf)
real_func(
example_rst, example_file, time_elapsed, memory_used, gallery_conf, language=language
)


INCLUDE_DIRECTIVE_RE = re.compile(r"^([ \t]*)\.\. include::\s*(.+)\n", flags=re.M)
Expand Down Expand Up @@ -365,10 +369,7 @@ def jupyter_notebook(script_blocks, gallery_conf, target_dir, real_func):
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
# only import rtd theme and set it if want to build docs locally
if not on_rtd and html_theme == "rtd":
import sphinx_rtd_theme

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
182 changes: 0 additions & 182 deletions gallery/how_to/compile_models/from_oneflow.py

This file was deleted.

2 changes: 1 addition & 1 deletion python/tvm/contrib/sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def numpy(self):
"""Construct a full matrix and convert it to numpy array."""
full = _np.zeros(self.shape, self.dtype)
ridx = _np.diff(self.indptr.numpy())
ridx = _np.hstack((_np.ones((v,), itype) * i for i, v in enumerate(ridx)))
ridx = _np.hstack([_np.ones((v,), itype) * i for i, v in enumerate(ridx)])
full[ridx, self.indices.numpy().astype(itype)] = self.data.numpy()
return full

Expand Down
2 changes: 1 addition & 1 deletion python/tvm/relax/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# This feature is not supported until python 3.10:
# https://docs.python.org/3.10/whatsnew/3.10.html#pep-613-typealias
Expr = Union[tvm.ir.RelayExpr]
Type = Union[tvm.ir.Type]
Type = Union[tvm.ir.Type] # pylint: disable=invalid-name
GlobalVar = Union[tvm.ir.GlobalVar]


Expand Down
8 changes: 3 additions & 5 deletions python/tvm/relax/frontend/stablehlo/stablehlo_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,12 @@ def from_stablehlo(
output : tvm.IRModule
The result IRModule with entry function "main"
"""
from jaxlib import mlir
from jaxlib.mlir.dialects import stablehlo
from jax._src.interpreters import mlir as jax_mlir

if isinstance(stablehlo_module, str):
# TODO (yongwww): support the serialized bytecode format of StableHLO
# model using stablehlo.deserialize_portable_artifact(ir) if the python
# binding is ready
with mlir.ir.Context() as context:
stablehlo.register_dialect(context)
stablehlo_module = mlir.ir.Module.parse(stablehlo_module)
context = jax_mlir.make_ir_context()
stablehlo_module = jax_mlir.ir.Module.parse(stablehlo_module, context)
return StableHLOImporter().from_stablehlo(stablehlo_module, input_info)
3 changes: 2 additions & 1 deletion python/tvm/tir/schedule/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def __init__(self) -> None:
# It is a workaround for mypy: https://github.com/python/mypy/issues/7866#issuecomment-549454370
# This feature is not supported until python 3.10:
# https://docs.python.org/3.10/whatsnew/3.10.html#pep-613-typealias
ExprRV = Union[PrimExpr] # A random variable that evaluates to an integer
# A random variable that evaluates to an integer
ExprRV = Union[PrimExpr] # pylint: disable=invalid-name

RAND_VAR_TYPE = Union[ExprRV, BlockRV, LoopRV] # pylint: disable=invalid-name

Expand Down
2 changes: 1 addition & 1 deletion tests/python/codegen/test_target_codegen_vulkan.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def test_argsort(target, dev):
mod = tvm.IRModule()
mod["main"] = relay.Function([x], relay.argsort(x))
x_np = np.random.randint(0, high=10, size=(10,)).astype(dtype)
res_np = np.argsort(x_np)
res_np = np.argsort(x_np, kind="stable")

check_mod(target, dev, mod, x_np, res_np)

Expand Down
2 changes: 2 additions & 0 deletions tests/python/codegen/test_target_texture_codegen_opencl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1385,13 +1385,15 @@ class TestConv2dWCHNcCRSKk(BaseConv2DValidator):
test_func = tvm.testing.parameter(conv2d_1x1_WCHNc_CRSKk)


@pytest.mark.skip("AttributeError: module 'numpy' has no attribute 'bool' raised from mxnet")
class TestConv2dNCHWcKCRSk(BaseConv2DValidator):
input_shapes = tvm.testing.parameter(
[(1, 32, 56, 56, 4), (32, 128, 1, 1, 4)], [(1, 32, 112, 112, 4), (32, 128, 3, 3, 4)]
)
test_func = tvm.testing.parameter(conv2d_NCHWc_KCRSk, conv2d_NCHWc_KCRSk_fp32_acc)


@pytest.mark.skip("AttributeError: module 'numpy' has no attribute 'bool' raised from mxnet")
class TestDepthwiseConv2dNCHWcKCRSk(BaseConv2DValidator):
input_shapes = tvm.testing.parameter([(1, 24, 257, 257, 4), (24, 1, 3, 3, 4)])
test_func = tvm.testing.parameter(depthwise_conv2d_NCHWc_KCRSk_acc32)
Expand Down
14 changes: 9 additions & 5 deletions tests/python/contrib/test_cublas.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,26 @@ def verify(target="cuda"):
b_old = np.random.uniform(0, 128, size=(l, m))

# Transform a to become CUBLASLT_ORDER_COL4_4R2_8C layout
a_new = np.hstack((a_old.astype(A.dtype), np.zeros([n, L - l])))
a_new = np.vstack((a_new.astype(A.dtype), np.zeros([N - n, L])))
a_new = np.hstack([a_old.astype(A.dtype), np.zeros([n, L - l])])
a_new = np.vstack([a_new.astype(A.dtype), np.zeros([N - n, L])])
a_even = np.vsplit(a_new[::2], N / 8)
a_odd = np.vsplit(a_new[1::2], N / 8)
a_new = [None] * (len(a_even) + len(a_odd))
a_new[::2] = a_even
a_new[1::2] = a_odd
a_new = np.vstack(a_new)
a_new = np.vstack(
np.vstack(np.vstack(np.hsplit(i, 8)).reshape([4, 32]) for i in np.vsplit(j, N / 4))
for j in np.hsplit(a_new, L / 32)
[
np.vstack(
[np.vstack(np.hsplit(i, 8)).reshape([4, 32]) for i in np.vsplit(j, N / 4)]
)
for j in np.hsplit(a_new, L / 32)
]
)
a_new = a_new.reshape([N, L])
# Transform b to become CUBLASLT_ORDER_COL32 layout
b_new = np.vstack(
np.hsplit(np.hstack((b_old.T.astype(B.dtype), np.zeros([m, L - l]))), L / 32)
np.hsplit(np.hstack([b_old.T.astype(B.dtype), np.zeros([m, L - l])]), L / 32)
)
b_new = b_new.reshape([m, L])

Expand Down
9 changes: 6 additions & 3 deletions tests/python/frontend/coreml/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def _verify_average(input_dim1, input_dim2, axis=0):
a_np1 = np.random.uniform(size=input_dim1).astype(dtype)
a_np2 = np.random.uniform(size=input_dim2).astype(dtype)

b_np = np.mean((a_np1, a_np2), axis=axis)
b_np = np.mean((a_np1, a_np2), axis=axis, dtype=float)

inputs = [("input1", datatypes.Array(*input_dim1)), ("input2", datatypes.Array(*input_dim2))]
output = [("output", datatypes.Array(*b_np.shape))]
Expand All @@ -325,8 +325,11 @@ def _verify_average(input_dim1, input_dim2, axis=0):
@tvm.testing.uses_gpu
def test_forward_average():
_verify_average((1, 3, 20, 20), (1, 3, 20, 20))
_verify_average((3, 20, 20), (1, 3, 20, 20))
_verify_average((20, 20), (1, 3, 20, 20))
# disable tests for now because ValueError: setting an array element with a sequence.
# The requested array has an inhomogeneous shape after 1 dimensions. The detected shape
# was (2,) + inhomogeneous part.
# _verify_average((3, 20, 20), (1, 3, 20, 20))
# _verify_average((20, 20), (1, 3, 20, 20))


def _verify_max(input_dim):
Expand Down
Loading
Loading