25 Commits

Author SHA1 Message Date
Tianqi Chen 33dcea1686 [REFACTOR][LINT] Modernize ruff config (#18810)
This PR removes the extra lint violations from the codebase so lint
aligns with the latest style
2026-02-23 07:29:21 -05:00
Tianqi Chen aa2e609136 [LINT] Modernize lint to use pre-commit hooks (#18807)
This PR migrates existing lint to use pre-commit hooks
2026-02-22 11:03:21 -05:00
Tianqi Chen 3c36ce2ec6 [FFI][REFACTOR][ABI] Rename NDArray to Tensor (#18275)
This PR Updates the NDArray => Tensor.

Both tensor and ndarray are commonly used terms.

Because the term Tensor is getting more common in the context of ML,
we do the rename to stay more aligned with torch.Tensor and DLTensor.
2025-09-06 14:33:59 -07:00
tqchen 01ea438e6e [MERGE] Merge main to unity 2023-06-24 2023-06-24 20:01:51 -04:00
Qiang Zhang 95c171458e [RPC] Add Missing Option "port_end" to RPC Proxy (#15116) 2023-06-17 15:43:53 +08:00
Tianqi Chen 89d539d746 [Unity] Update specific builtins for LM (#14617)
This PR updates the specific builtins for LM
and move them to lm_support.cc

The kv_create now takes an initial data and copies it instead of consumes it.
This will enable us to create kv within a VM more easily.
2023-04-14 12:56:16 -07:00
Tianqi Chen a6831ba9c4 [Unity] Enable pod args in WebGPU (#14560)
This PR adds POD argument support in webgpu.
2023-04-10 11:13:56 -07:00
Tianqi Chen 279317d4cd [Unity][WEBGPU] Codegen improvements and WebRuntime (#14187)
This PR makes various improvements web codegen in relax web runtime.

Correct support of shift operators.
Update relax vm to make most use of internal allocators.
Update the webgpu API to the latest spec.
2023-04-01 15:31:38 -04:00
Tianqi Chen c1f304497e [Unity][WEB] Relax vm on web runtime (#14131)
This PR brings initial relax vm support on web runtime
2023-04-01 15:31:37 -04:00
Muyang Li d8fd5bd6bb Fix some typos (#8101)
* fix bugs in the auto scheduler record:

* reformat the code

* reformat the code

* use the os.path.abspath

* change error to warning

* reformat the warning code

* fix some typos

* fix some typos

* fix some typos

* fix the port number typo
2021-05-21 09:30:02 -07:00
Robert Kimball f4a680d80c Replace 0.0.0.0 with 127.0.0.1 for client connections (#7766)
* Rename references to 0.0.0.0 to localhost. Also change references to 127.0.0.1 to localhost so that all references are consistent. 0.0.0.0 is not the same as localhost.
2021-05-02 07:43:12 -04:00
Tianqi Chen d5af4f2cfc [PYTHON][RPC] Make rpc proxy jupyter friendly via PopenWorker. (#7757)
* [PYTHON][RPC] Make rpc proxy jupyter friendly via PopenWorker.

* Rework the contrib tests that was previous broken.
2021-03-31 11:40:09 -07:00
Jared Roesch f13fed55cf [Format] Convert all Python code w/o CI (#6448)
* Add black setup

* Tweak pyproject.toml

* Fix syntax issues

* Fix

* Tweak

* Black all Python code
2020-09-11 22:17:24 +09:00
Tianqi Chen cdc7ae492e [WEB] WebGPU support (#5545)
This PR introduces WebGPU support to tvm.
The WebGPU runtime is directly built in javascript(as WebGPU uses JS as the first class citizen API)
and exposes back to the tvm's runtime via PackedFuncs.

One important note is that `ctx.sync` is not async.
This is due to the fact that WebGPU is a purely async API and we cannot block in the web environment.

So the current best way to use the js api is to wrap things in an async function.
When copy a GPU array to CPU, `await ctx.sync()` need to be called to wait for copy completion.

We use a AsyncIO rpc server to serve the async functions to the clients.
2020-05-09 16:59:18 -07:00
Tianqi Chen 702fd0f0f4 [WEB][RUNTIME] TVM WebAssembly JS Runtime (#5506)
* [WEB] Remove the old web runtime

* [WEB][RUNTIME] TVM WebAssembly Runtime

This PR introduces a brand new TVM web runtime based on the WASM standard API.
Main highlights:

- The new runtime is rewritten using the Typescript.
- The new runtime now directly interfaces with WebAssembly's standard API,
  instead of relying on emscripten's API.
  This change will make the js runtime more portable to runtime variants.
  For example, we could also try to make it interface with the tvm's rust runtime implementation.
- System library can be provided through WASI
  - We also build a hack to enable Emscripten to generate a WASI like
    bundle for runtime environment on the Web.
- The wasm generation now uses the mainlin LLVM.
- Dynamic link(dlopen) is not used due to limitation of wasm,
  instead we rely on the recent new RPC refactor to directly
  restart a new session for each wasm binary sent to the RPC.

* Address review comments

* Skip tensorcore test
2020-05-07 13:47:36 -07:00
Tianqi Chen cffb4fba03 [HEADER] Add Header to Comply with ASF Release Policy (#2982)
* [HEADER] ASF header dir=include

* [HEADER] ASF Header dir=src

* [HEADER] ASF Header -dir=python

* [HEADER] ASF header dir=topi

* [HEADER] ASF Header dir=nnvm

* [HEADER] ASF Header -dir=tutorials

* [HEADER] ASF Header dir=tests

* [HEADER] ASF Header -dir=docker

* fix whitespace

* [HEADER] ASF Header -dir=jvm

* [HEADER] ASF Header -dir=web

* [HEADER] ASF Header --dir=apps

* [HEADER] ASF Header --dir=vta

* [HEADER] ASF Header -dir=go

* temp

* [HEADER] ASF Header --dir=rust

* [HEADER] Add ASF Header --dir=cmake

* [HEADER] ASF Header --dir=docs

* [HEADER] Header for Jenkinsfile

* [HEADER] ASF Header to toml and md

* [HEADER] ASF Header to gradle

* Finalize rat cleanup

* Fix permission

* Fix java test

* temporary remove nnvm onnx test
2019-04-07 21:14:02 -07:00
Alexander Pivovarov 3259e6b36a Fix PRC typo (#2939) 2019-03-31 23:05:12 -07:00
Tianqi Chen 794bf7fe6e Fix Web Build after CMake transition. (#2407) 2019-01-09 12:19:53 -08:00
lihaozhehw bd44fe03ec Python security issue about mktemp() and abspath() (#2202) 2018-11-30 16:05:31 -08:00
Tianqi Chen 81db22c56a [RPC] graduate tvm.contrib.rpc -> tvm.rpc (#1410) 2018-07-09 15:23:41 -07:00
Leyuan Wang dcf18a3c20 [RPC] default use spawn for fork safety (#1240) 2018-06-06 22:52:03 -07:00
Tianqi Chen 3d67ea17d2 [RPC] support tracker in proxy (#1082) 2018-04-05 21:44:07 -07:00
Tianqi Chen 6bd8dbc764 [RPC] Refactor, introduce tracker (#1080)
* [RPC] Refactor, introduce tracker

* [RPC] Change RPC hand shake convention, always get remote key.

* fix lint
2018-04-04 20:40:41 -07:00
Tianqi Chen 8d241b9d86 [RPC] Allow back pressure from writer (#250)
* [RPC] Allow backpressure from writer

* fix

* fix
2017-07-15 18:23:20 -07:00
Tianqi Chen c324494f1a [RUNTIME][RPC] Change RPCServer to Event Driven Code (#243)
* [RUNTIME][RPC] Change RPCServer to Event Driven Code

* fix
2017-07-13 18:44:33 -07:00