You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "BaseMax (via GitHub)" <gi...@apache.org> on 2023/08/18 14:46:02 UTC

[GitHub] [tvm] BaseMax opened a new pull request, #15590: Fix equality comparison and code consistency in runtime.ts

BaseMax opened a new pull request, #15590:
URL: https://github.com/apache/tvm/pull/15590

   Hi Apache Team,
   
   I'm thrilled to submit my seventh contribution to Apache! I've addressed the issue of weak comparing ==  inside the runtime.ts. Paying attention to such details is vital for code quality, and I'm committed to enhancing the project.
   
   I've made some changes to the `runtime.ts` file to ensure consistent usage of equality comparison and improve code readability. Here's a summary of the changes made in this pull request:
   
   1. Changed `==` to `===` for equality comparison in the following places:
      - In `endScope()`: Changed `if (this.autoDisposeScope.length == 0)` to `if (this.autoDisposeScope.length === 0)`
      - In `attachToCurrentScope()`: Changed `if (this.autoDisposeScope.length == 0)` to `if (this.autoDisposeScope.length === 0)`
      - In `DLDevice` constructor: Changed `if (tp == "string")` to `if (tp === "string")`
      - In `DLDevice` constructor: Changed `} else if (tp == "number")` to `} else if (tp === "number")`
      - In `sync()`: Changed `if (this.deviceType == DeviceStrToEnum.webgpu)` to `if (this.deviceType === DeviceStrToEnum.webgpu)`
      - In `NDArray` constructor: Changed `if (this.dtype == "float32")` to `if (this.dtype === "float32")`
      - In `Instance` class: Various changes to ensure consistent equality comparison using `===`
   
   2. Improved code consistency and readability in several places.
   
   These changes enhance the codebase by using strict equality comparison and maintaining consistent coding style.
   
   -- MAX


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao closed pull request #15590: Fix equality comparison and code consistency in runtime.ts

Posted by "junrushao (via GitHub)" <gi...@apache.org>.
junrushao closed pull request #15590: Fix equality comparison and code consistency in runtime.ts
URL: https://github.com/apache/tvm/pull/15590


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao commented on pull request #15590: Fix equality comparison and code consistency in runtime.ts

Posted by "junrushao (via GitHub)" <gi...@apache.org>.
junrushao commented on PR #15590:
URL: https://github.com/apache/tvm/pull/15590#issuecomment-1694731877

   Moved to #15621


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tqchen commented on pull request #15590: Fix equality comparison and code consistency in runtime.ts

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen commented on PR #15590:
URL: https://github.com/apache/tvm/pull/15590#issuecomment-1693410512

   Thanks @BaseMax , do you mind sending the PR to the unity branch https://github.com/apache/tvm/tree/unity this is where most of our latest webgpu dev resides


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #15590: Fix equality comparison and code consistency in runtime.ts

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #15590:
URL: https://github.com/apache/tvm/pull/15590#issuecomment-1684028471

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * No users to auto-tag found, no teams are specified in PR title <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org