You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2023/08/01 19:38:13 UTC

[tvm] branch unity updated: [Unity]: fix error on enum (#15451)

This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/unity by this push:
     new ef00a96394 [Unity]: fix error on enum (#15451)
ef00a96394 is described below

commit ef00a96394a2ea5fc30926716f29717cac3577f8
Author: 兰天游 <dt...@gmail.com>
AuthorDate: Wed Aug 2 03:38:06 2023 +0800

    [Unity]: fix error on enum (#15451)
---
 web/src/runtime.ts | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/web/src/runtime.ts b/web/src/runtime.ts
index 1ae3f1211b..25bb04e99a 100644
--- a/web/src/runtime.ts
+++ b/web/src/runtime.ts
@@ -374,7 +374,7 @@ export class DLDevice {
 /**
  * The data type code in DLDataType
  */
-export const enum DLDataTypeCode {
+export enum DLDataTypeCode {
   Int = 0,
   UInt = 1,
   Float = 2,
@@ -896,7 +896,7 @@ export class TVMString extends TVMObject {
   }
 }
 
-export const enum VMAllocatorKind {
+export enum VMAllocatorKind {
   NAIVE_ALLOCATOR = 1,
   POOLED_ALLOCATOR = 2,
 }
@@ -949,7 +949,7 @@ export class VirtualMachine implements Disposable {
 }
 
 /** Code used as the first argument of the async callback. */
-const enum AyncCallbackCode {
+enum AsyncCallbackCode {
   kReturn = 4,
   kException = 5,
 }
@@ -1886,7 +1886,7 @@ export class Instance implements Disposable {
       const callback = this.detachFromCurrentScope(args[args.length - 1] as PackedFunc);
       const promise: Promise<any> = func(...fargs);
       promise.then((rv: any) => {
-        callback(this.scalar(AyncCallbackCode.kReturn, "int32"), rv);
+        callback(this.scalar(AsyncCallbackCode.kReturn, "int32"), rv);
         callback.dispose();
       });
     };
@@ -1894,10 +1894,10 @@ export class Instance implements Disposable {
   }
 
   /**
-   * Asynchrously load webgpu pipelines when possible.
+   * Asynchronously load webgpu pipelines when possible.
    * @param mod The input module.
    */
-  async asyncLoadWebGPUPiplines(mod: Module): Promise<void> {
+  async asyncLoadWebGPUPipelines(mod: Module): Promise<void> {
     if (this.lib.webGPUContext == undefined) throw Error("WebGPU not initialied");
     const webgpuContext = this.lib.webGPUContext;