Skip to content

Commit

Permalink
[example] Make implicit_fem fallback to CPU when CUDA is not available (
Browse files Browse the repository at this point in the history
  • Loading branch information
strongoier committed Jul 25, 2022
1 parent 6c950c9 commit b6a322a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/taichi/examples/simulation/implicit_fem.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
parser.add_argument('place_holder', nargs='*')
args = parser.parse_args()

ti.init(arch=ti.gpu, dynamic_index=True)
ti.init(arch=ti.cuda, dynamic_index=True)

if args.gui == 'auto':
if _ti_core.GGUI_AVAILABLE:
if _ti_core.GGUI_AVAILABLE and ti.lang.impl.current_cfg().arch == ti.cuda:
args.gui = 'ggui'
else:
args.gui = 'cpu'
Expand Down

0 comments on commit b6a322a

Please sign in to comment.