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
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions cmake/PythonNumpyPybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ endif()

# Creating python enters
file(MAKE_DIRECTORY bin)
file(WRITE ${CMAKE_SOURCE_DIR}/bin/ti "#!${PYTHON_EXECUTABLE_PATH}\nimport taichi\nexit(taichi.main())")
file(WRITE ${CMAKE_SOURCE_DIR}/bin/tid "#!${PYTHON_EXECUTABLE_PATH}\nimport taichi\nexit(taichi.main(debug=True))")
file(WRITE ${CMAKE_SOURCE_DIR}/bin/ti "#!/usr/bin/env python3\nimport taichi\nexit(taichi.main())")
execute_process(COMMAND chmod +x ${CMAKE_SOURCE_DIR}/bin/ti)
execute_process(COMMAND chmod +x ${CMAKE_SOURCE_DIR}/bin/tid)
execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/bin/ti ${CMAKE_SOURCE_DIR}/bin/taichi)


Expand Down
4 changes: 0 additions & 4 deletions python/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ def get_python_executable():
print('Only the wheel with clang will be released to PyPI.')
sys.exit(-1)

if not gpu:
print('Linux release must ship with the CUDA backend.')
sys.exit(-1)

Comment on lines -52 to -55
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.

with open('../setup.py') as fin:
with open('setup.py', 'w') as fout:
project_name = 'taichi'
Expand Down
10 changes: 1 addition & 9 deletions python/taichi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def register(func):

@registerableCLI
class TaichiMain:
def __init__(self, debug: bool = False, test_mode: bool = False):
def __init__(self, test_mode: bool = False):
self.banner = f"\n{'*' * 43}\n** Taichi Programming Language **\n{'*' * 43}"
print(self.banner)

Expand All @@ -62,9 +62,6 @@ def __init__(self, debug: bool = False, test_mode: bool = False):
raise ValueError(
"Environment variable TI_DEBUG can only have value 0 or 1."
)
if debug:
print(f"\n{'*' * 17} Debug Mode {'*' * 17}\n")
os.environ['TI_DEBUG'] = '1'

parser = argparse.ArgumentParser(description="Taichi CLI",
usage=self._usage())
Expand Down Expand Up @@ -1012,10 +1009,5 @@ def main():
return cli()


def main_debug():
cli = TaichiMain(debug=True)
return cli()


if __name__ == "__main__":
sys.exit(main())
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
entry_points={
'console_scripts': [
'ti=taichi.main:main',
'tid=taichi.main:main_debug',
],
},
classifiers=classifiers,
Expand Down