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

[cli] Remove the never used 'tid' command #1494

Merged
merged 5 commits into from Jul 16, 2020

Conversation

archibate
Copy link
Collaborator

@archibate archibate commented Jul 14, 2020

Related issue = #

[Click here for the format server]


  1. Remove the tid command:
    We already have ti debug and the debug argument in main seems useless...
    In fact, it's already not functional at all:
root@archlinux ~/taichi (git)-[remove-tid-useless-bin-hook] # tid
[Taichi] mode=development
[Taichi] preparing sandbox at /tmp/taichi-6z2hiodm
[Taichi] <dev mode>, llvm 10.0.0, commit a93efc54, python 3.8.3
Traceback (most recent call last):
  File "/root/taichi/bin/tid", line 4, in <module>
    exit(taichi.main(debug=True))
TypeError: main() got an unexpected keyword argument 'debug'
  1. Use #!/usr/bin/env python3 instead of #!${PYTHON_EXECUTABLE}:
    Well, what if one use anaconda python3?
    The PYTHON_EXECUTABLE is determinated by the buildbots, I don't think it's always the same as end-users...
    In contrast, /usr/bin/env will automatically search for python3 in current PATH, which will make ti command work in anaconda python3.
    @k-ye Just to confirm, is /usr/bin/env always available on Mac?

  2. Make Linux users without CUDA able to use ti dist.
    I thought our Linux buildbot have constant CUDA support? So no need for this confirm?

@archibate archibate changed the title [cli] Remove the never used 'tid' command & make 'ti' command work in anaconda [cli] Remove the never used 'tid' command Jul 14, 2020
Copy link
Member

@rexwangcc rexwangcc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

  1. It seems tid works in my environment:
(py-taichi-dev) ➜  ~ tid
[Taichi] mode=development
[Taichi] preparing sandbox at /var/folders/jr/_8tzt9ys77z10wt2kx09vyg40000gn/T/taichi-dsvhetv7
[Taichi] <dev mode>, llvm 8.0.1, commit f920fe99, python 3.7.3

*******************************************
**      Taichi Programming Language      **
*******************************************

***************** Debug Mode *****************

usage:
    baseline            |-> Archive current benchmark result as baseline

but if it's not being used by any stuff, 👍 to remove it for clarity.

  1. I believe most Unix systems provided env in /usr/bin, including macOS, but I'm not sure if itimproves the protability as I haven't checked how PYTHON_EXECUTABLE_PATH is generated now.

@codecov

This comment has been minimized.

Comment on lines -52 to -55
if not gpu:
print('Linux release must ship with the CUDA backend.')
sys.exit(-1)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm: @yuanming-hu Does this have fatal drawback?
I just want to run ti dist on my non-CUDA laptop.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this given that v0.6.19 is already released, ff2 revert me if you don't like this.

@archibate archibate added the LGTM label Jul 15, 2020
@archibate archibate merged commit 43c32b8 into taichi-dev:master Jul 16, 2020
@yuanming-hu yuanming-hu mentioned this pull request Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants