Library / SDK
hyperai/tvm-cn avatar
hyperai/tvm-cn

hyperai/tvm-cn: A Chinese Translation of the Apache TVM Docs, Built on Docusaurus

TVM Documentation in Chinese Simplified / TVM 中文文档

3,952 stars794 forksTypeScriptApache-2.0

At a glance

What is it?
tvm-cn is a Docusaurus site that localises the Apache TVM documentation into Simplified Chinese, pinned to TVM v0.10.0. It is a translation and publishing project, not a compiler, and its usefulness depends on how far behind upstream you can tolerate being.
Who is it for?
Adopt tvm-cn if you read Simplified Chinese and want TVM concepts in your own language, or if you want to contribute translations. Do not adopt it as your primary reference for current TVM APIs: it is based on v0.10.0, and the README says the Chinese docs are adjusted as upstream changes, which is a statement of intent rather than a guarantee.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 133 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What tvm-cn is, and the gap it tries to fill

Apache TVM is an open source deep learning compiler that targets CPUs, GPUs, ARM and other hardware backends. Its documentation is written in English. The README of tvm-cn states the motivation plainly: Chinese learning material about TVM is scattered, which makes systematic study hard, so the project translates the documentation on GitHub.

The audience is therefore narrow and specific. It is for engineers who already intend to work with TVM and would rather read its concepts in Simplified Chinese. It is also for people who want to contribute translations, since the README lists submitting issues or pull requests for inaccurate or ambiguous passages as a first-class activity, alongside claiming pages and joining the Chinese community.

One thing to be clear about: tvm-cn does not compile anything. It contains no TVM source, no runtime, no compiler passes. It is a documentation site, and its primary language field on GitHub is TypeScript because the site is a Docusaurus application. If you arrived looking for a TVM build or a Python wheel, this repository is the wrong place, and the README points to the TVM project itself for what TVM actually does.

The pinned version matters more than anything else on this page. The README says the current Chinese documentation is localised from TVM v0.10.0. Every API name, every code sample and every explanation inherits that baseline. TVM has moved on since, and the README acknowledges that the Chinese docs are adjusted as the official version and documentation update. That is a commitment to keep pace, not evidence that a given page has kept pace.

How the site is put together: Docusaurus, versioned docs and a static image tree

The build is a standard Docusaurus 3 site. The package.json declares @docusaurus/core, @docusaurus/preset-classic and @docusaurus/faster at ^3.9.1, with React 19, TypeScript 5.9 and Sass. Math rendering comes from remark-math and rehype-katex, which is a sensible inclusion for a compiler project whose docs contain tensor expressions and formulas. Search styling and a theme come from the @openbayes packages, and there is a docusaurus-plugin-sass in the dependency list.

Versioning is handled the Docusaurus way, and the repository layout shows it. There are docs/, versioned_docs/, versioned_sidebars/ and versions.json at the top level, plus sidebars.ts and docusaurus.config.ts. The README documents the release procedure: if the current version is 0.12.0 and you want to move to 0.13.0, you first freeze the old one, then edit a config field.

Images are not referenced from their original hosts. The README explains the migration rule: an external image is downloaded preserving its full path under static/img/docs/, and the Markdown reference is rewritten to the local path. That keeps the site self-contained and avoids depending on a third party's raw GitHub URLs at render time.

There is a Sphinx path in the repository too, and it is worth reading carefully. The Makefile is a minimal Sphinx makefile with SOURCEDIR = source and BUILDDIR = build, and the README shows sphinx-build -b html docs build under the label "生成 HTML 文件 (Deprecated)". The deprecation label is the important part. The Makefile and the rst2md.sh script are remnants of an earlier pipeline that converted reStructuredText into Markdown; the live build is Docusaurus. Anyone who follows the Makefile expecting a working documentation build should expect to be disappointed, because the README itself marks that route as deprecated.

Running the docs locally with pnpm

The README gives two commands for local development, and the prerequisite is explicit: install Node.js and pnpm first. The package.json requires Node.js 18 or newer through its engines field and pins pnpm 9.12.1 through packageManager, so a mismatched pnpm will produce a warning rather than a silent failure.

From the repository root, install dependencies:

bash
pnpm install

Then start the development server:

bash
pnpm start

The start script maps to docusaurus start, so you get the usual hot-reloading dev server on the default Docusaurus port. Edit a Markdown file under docs/ and the page refreshes. The README points to the Docusaurus documentation for the Markdown conventions the project expects, which is the right place to look before formatting a new page.

For a production build, package.json defines a build script that runs docusaurus build. The Dockerfile then takes that output: it is a two-line nginx:alpine image that copies nginx.conf into the container's conf.d and copies build/ into /usr/share/nginx/html/. In other words, the container does not build the site; it serves an already-built directory. If build/ is missing, the image will serve nothing useful, so the build has to run before the image is assembled.

There is also a typecheck script, tsc, which is worth running before opening a pull request that touches TypeScript configuration or site components.

The version lag is the real limitation

The single constraint that decides whether tvm-cn fits your work is the v0.10.0 baseline. The README states it without hedging, and it also states that the docs are updated as upstream changes. Those two sentences sit in tension, and the tension is not resolved anywhere in the repository. There is no page-by-page status table, no list of which upstream commits have been merged into the translation, and no per-page note saying which TVM version a given page reflects.

In practice that means a page can be accurate about a concept and stale about an API. Compiler documentation tends to mix the two: an explanation of how a scheduling primitive works may survive several releases, while the Python signature next to it may not. A reader who copies a code sample from a translated page has no signal from the page itself about which side of that line it falls on.

The other failure mode is more mundane. Because the site is a translation, an ambiguous or wrong passage in the Chinese text is a translation defect rather than an upstream defect, and the README treats it that way by inviting issues and pull requests for exactly that case. That is a reasonable process, but it means the correction loop runs through volunteer contributors, not through the TVM maintainers. If you need an authoritative answer about current TVM behaviour, the upstream English documentation and the TVM source are the places to look, and tvm-cn is a reading aid on top of them.

Where tvm-cn is simply the wrong tool: if you are debugging a compilation error in a recent TVM release, or checking whether a pass still exists under a given name, a translation pinned to an older version adds a layer of uncertainty. Use it to learn the concepts, and verify the specifics elsewhere.

Compared with reading the upstream TVM docs directly

The obvious alternative is the upstream Apache TVM documentation, which tvm-cn is a translation of. The difference in approach is not subtle. Upstream is the source of truth and tracks the current release; tvm-cn is a derivative that trades currency for language accessibility, and it is maintained by a separate group of contributors under a different repository and a different review process.

That trade-off cuts both ways. Upstream wins on accuracy of API details and on coverage of anything added after v0.10.0. tvm-cn wins on reading speed for anyone more comfortable in Simplified Chinese, and on the community layer the README describes: claiming pages, tracking documentation updates, and discussing TVM with other Chinese-speaking developers. Neither of those is a feature you can measure in a benchmark, and neither is a reason to skip the other.

The practical arrangement is to read tvm-cn first for orientation and keep the upstream page open in a second tab for anything version-sensitive. That is not a compromise specific to this project; it is what any pinned translation asks of its readers.

There is a third option worth naming, which is reading the TVM source itself. It is always current, and for questions about what a pass actually does it is more reliable than either documentation set. It is also slower, which is the entire reason translation projects like this one exist.

Licence and the cost of keeping a translation alive

The repository is licensed under Apache-2.0. That is the same licence family as Apache TVM itself, which makes the relationship between the translation and the original straightforward in licence terms. It does not, however, settle attribution questions about the translated text, and the repository does not address how translator credit is recorded per page. If you plan to redistribute or mirror the content, read the LICENSE file and the upstream TVM licensing terms together rather than assuming the repository licence covers everything on the rendered site.

The maintenance cost is the part that deserves attention before you contribute. The README describes a versioning workflow: freeze the current version with docusaurus docs:version, then update versions.current.label in docusaurus.config.ts. That is cheap. The expensive part is the translation itself, because every upstream documentation change after v0.10.0 creates a potential divergence, and divergence accumulates quietly. A translation project with no per-page version markers has no way to show its own staleness, and tvm-cn does not appear to have one.

The last push to the repository was on 2026-05-20. That is recent enough that the project should not be described as abandoned, but there is no release history and no changelog in the repository, so there is nothing to say how frequently translated pages are refreshed. If you are deciding whether to depend on it, look at the commit history of the specific pages you need rather than at the repository as a whole.

Editorial conclusion

Adopt tvm-cn if you read Simplified Chinese and want TVM concepts in your own language, or if you want to contribute translations. Do not adopt it as your primary reference for current TVM APIs: it is based on v0.10.0, and the README says the Chinese docs are adjusted as upstream changes, which is a statement of intent rather than a guarantee. Before relying on it, open a page you care about, compare it against the same page in the upstream TVM docs, and check whether the corresponding source exists under versioned_docs/. If it does not, treat that page as a translation task rather than a reference.

Frequently asked questions

What does TVM stand for in this project?

The README does not expand the acronym. It describes TVM as an open source deep learning compiler for CPU, GPU, ARM and other hardware architectures, and tvm-cn is its documentation translated into Simplified Chinese.

Is tvm-cn the TVM compiler, or just documentation?

It is documentation. The repository contains a Docusaurus site, translation sources under docs/ and versioned_docs/, and a Dockerfile that serves a prebuilt build/ directory through nginx. No compiler code is present.

Which TVM version is the Chinese documentation based on?

The README states that the current Chinese documentation is localised from TVM v0.10.0, and that it is adjusted as the official version and documentation are updated.

How do I run the tvm-cn documentation site locally?

Install Node.js and pnpm first, then run pnpm install followed by pnpm start from the repository root. The package.json requires Node.js 18 or newer and pins pnpm 9.12.1.

Official sources

  1. hyperai/tvm-cn on GitHub
  2. Issues
  3. License: Apache-2.0
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/hyperai-tvm-cn.svg)](https://hysenlabs.com/projects/hyperai-tvm-cn)