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

Runtime(TiArch arch, TiRuntime runtime, bool should_destroy) should terminate the program when providing improper arch parameter #8039

Open
YuCrazing opened this issue May 18, 2023 · 1 comment
Assignees

Comments

@YuCrazing
Copy link
Contributor

YuCrazing commented May 18, 2023

Describe the bug
When I provide a improper value of arch (for example arch=12) into Runtime(TiArch arch, TiRuntime runtime, bool should_destroy), taichi does not report any errors.

Expected behaviour
I hope taichi could report a fatal error and shut down the program in this situation, because an improper arch could affect the following execution of the program (for example, it could be fatal if Runtim::arch() returns a wrong result).

@github-project-automation github-project-automation bot moved this to Untriaged in Taichi Lang May 18, 2023
@YuCrazing YuCrazing changed the title Runtime(TiArch arch, TiRuntime runtime, bool should_destroy) should give a error when providing improper arch parameter Runtime(TiArch arch, TiRuntime runtime, bool should_destroy) should terminate the program when providing improper arch parameter May 18, 2023
@jim19930609 jim19930609 self-assigned this May 19, 2023
@neozhaoliang neozhaoliang moved this from Untriaged to Todo in Taichi Lang May 19, 2023
@jim19930609
Copy link
Contributor

It actually reports:

#include <cmath>
#include <iostream>
#include <numeric>
#include <taichi/cpp/taichi.hpp>

struct App0_tutorial {

  ti::Runtime runtime_;

  App0_tutorial() {
    runtime_ = ti::Runtime(TiArch(16));
  }

  void run() {
  }
};

int main(int argc, const char** argv) {
  App0_tutorial app;
  app.run();
  return 0;
}
image

@jim19930609 jim19930609 moved this from Todo to Backlog in Taichi Lang May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants