Skip to content

Commit

Permalink
switching to cpu for CI pipelines (#62)
Browse files Browse the repository at this point in the history
CI pipelines won't work with "ti.gpu". Hence, changing to "ti.cpu" (conditionally in case the code is run by the automated CI pipeline).
  • Loading branch information
pjflux2001 authored Oct 6, 2023
1 parent 9779a6b commit ddeb4a8
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
],
"source": [
"## Initialize Taichi\n",
"ti.init(arch=ti.cpu)\n",
"ti.init(arch=ti.cpu if os.path.exists(\"/tmp/flag\") else ti.gpu)\n",
"rng = default_rng()\n",
"\n",
"## Initialize data and agents\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
],
"source": [
"## Initialize Taichi\n",
"ti.init(arch=ti.cpu)\n",
"ti.init(arch=ti.cpu if os.path.exists(\"/tmp/flag\") else ti.gpu)\n",
"rng = default_rng()\n",
"\n",
"## Initialize data and agents\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"outputs": [],
"source": [
"## Initialize Taichi\n",
"ti.init(arch=ti.gpu, device_memory_GB=4.0, dynamic_index=True)\n",
"ti.init(arch=ti.cpu if os.path.exists(\"/tmp/flag\") else ti.gpu)\n",
"rng = default_rng()\n",
"\n",
"## Initialize data and agents\n",
Expand Down
15 changes: 0 additions & 15 deletions experiments/jupyter/production/imgui.ini

This file was deleted.

2 changes: 1 addition & 1 deletion experiments/jupyter/production/polyphy_2DDiscrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(self):
self.rng = default_rng()
self.ppInputData = PPInputData_2DDiscrete(self.input_file, self.rng)
self.ppConfig.register_data(self.ppInputData)
ti.init(arch=ti.gpu)
ti.init(arch=ti.cpu if os.path.exists("/tmp/flag") else ti.gpu)
self.kernels = PPKernels()
self.ppInternalData = PPInternalData_2DDiscrete(self.rng, self.kernels, self.ppConfig)

Expand Down
2 changes: 1 addition & 1 deletion experiments/jupyter/production/polyphy_3DDiscrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(self):
self.rng = default_rng()
self.ppInputData = PPInputData_3DDiscrete(self.input_file, self.rng)
self.ppConfig.register_data(self.ppInputData)
ti.init(arch=ti.gpu, device_memory_GB=4)
ti.init(arch=ti.cpu if os.path.exists("/tmp/flag") else ti.gpu, device_memory_GB=4)
self.kernels = PPKernels()
self.ppInternalData = PPInternalData_3DDiscrete(self.rng, self.kernels, self.ppConfig)

Expand Down

0 comments on commit ddeb4a8

Please sign in to comment.