Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
env:
PR_TITLE: ${{ github.event.pull_request.title }}

- name: PR Project Card Creation
if: github.event.action == 'opened' || github.event.action == 'edited'
run: python misc/ci_create_pr_card.py
env:
GITHUB_TOKEN: ${{ secrets.GARDENER_PAT }}
GH_EVENT: ${{ toJson(github.event) }}
# - name: PR Project Card Creation
# if: github.event.action == 'opened' || github.event.action == 'edited'
# run: python misc/ci_create_pr_card.py
# env:
# GITHUB_TOKEN: ${{ secrets.GARDENER_PAT }}
# GH_EVENT: ${{ toJson(github.event) }}
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
disable=all
enable=
C0121,C0200,C0209,C0321,C0325,C0415,
W0101,W0108,W0202,W0235,W0401,W0404,W0611,W0621,W0622,W612,W1309,
W0101,W0108,W0235,W0401,W0404,W0611,W0621,W0622,W1309,
E1101,
R0201,R0205,R0402,R1703,R1705,R1710,R1732
R0205,R0402,R1703,R1705,R1710,R1732
8 changes: 4 additions & 4 deletions python/taichi/examples/graph/mpm88_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ def init_particles(
J[i] = 1


F_x = ti.Vector.ndarray(2, ti.f32, shape=(n_particles))
F_v = ti.Vector.ndarray(2, ti.f32, shape=(n_particles))
F_x = ti.Vector.ndarray(2, ti.f32, shape=n_particles)
F_v = ti.Vector.ndarray(2, ti.f32, shape=n_particles)

F_C = ti.Matrix.ndarray(2, 2, ti.f32, shape=(n_particles))
F_J = ti.ndarray(ti.f32, shape=(n_particles))
F_C = ti.Matrix.ndarray(2, 2, ti.f32, shape=n_particles)
F_J = ti.ndarray(ti.f32, shape=n_particles)
F_grid_v = ti.Vector.ndarray(2, ti.f32, shape=(n_grid, n_grid))
F_grid_m = ti.ndarray(ti.f32, shape=(n_grid, n_grid))

Expand Down
12 changes: 6 additions & 6 deletions python/taichi/examples/real_func/rendering/taichi_ngp.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,25 +175,25 @@ def __init__(self, scale, cascades, grid_size, base_res, log2_T, res, level, exp

# rays intersection parameters
# t1, t2 need to be initialized to -1.0
self.hits_t = ti.Vector.field(n=2, dtype=data_type, shape=(self.N_rays))
self.hits_t = ti.Vector.field(n=2, dtype=data_type, shape=self.N_rays)
self.hits_t.fill(-1.0)
self.center = tf_vec3(0.0, 0.0, 0.0)
self.xyz_min = -tf_vec3(scale, scale, scale)
self.xyz_max = tf_vec3(scale, scale, scale)
self.half_size = (self.xyz_max - self.xyz_min) / 2

self.noise_buffer = ti.Vector.field(2, dtype=data_type, shape=(self.N_rays))
self.noise_buffer = ti.Vector.field(2, dtype=data_type, shape=self.N_rays)
self.gen_noise_buffer()

self.rays_o = ti.Vector.field(n=3, dtype=data_type, shape=(self.N_rays))
self.rays_d = ti.Vector.field(n=3, dtype=data_type, shape=(self.N_rays))
self.rays_o = ti.Vector.field(n=3, dtype=data_type, shape=self.N_rays)
self.rays_d = ti.Vector.field(n=3, dtype=data_type, shape=self.N_rays)

# use the pre-compute direction and scene pose
self.directions = ti.Matrix.field(n=1, m=3, dtype=data_type, shape=(self.N_rays,))
self.pose = ti.Matrix.field(n=3, m=4, dtype=data_type, shape=())

# density_bitfield is used for point sampling
self.density_bitfield = ti.field(ti.uint32, shape=(cascades * grid_size**3 // 32))
self.density_bitfield = ti.field(ti.uint32, shape=cascades * grid_size**3 // 32)

# count the number of rays that still alive
self.counter = ti.field(ti.i32, shape=())
Expand Down Expand Up @@ -252,7 +252,7 @@ def __init__(self, scale, cascades, grid_size, base_res, log2_T, res, level, exp

# results buffers
self.opacity = ti.field(ti.f32, shape=(self.N_rays,))
self.depth = ti.field(ti.f32, shape=(self.N_rays))
self.depth = ti.field(ti.f32, shape=self.N_rays)
self.rgb = ti.Vector.field(3, dtype=ti.f32, shape=(self.N_rays,))

# GUI render buffer (data type must be float32)
Expand Down
12 changes: 6 additions & 6 deletions python/taichi/examples/rendering/taichi_ngp.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,25 +175,25 @@ def __init__(self, scale, cascades, grid_size, base_res, log2_T, res, level, exp

# rays intersection parameters
# t1, t2 need to be initialized to -1.0
self.hits_t = ti.Vector.field(n=2, dtype=data_type, shape=(self.N_rays))
self.hits_t = ti.Vector.field(n=2, dtype=data_type, shape=self.N_rays)
self.hits_t.fill(-1.0)
self.center = tf_vec3(0.0, 0.0, 0.0)
self.xyz_min = -tf_vec3(scale, scale, scale)
self.xyz_max = tf_vec3(scale, scale, scale)
self.half_size = (self.xyz_max - self.xyz_min) / 2

self.noise_buffer = ti.Vector.field(2, dtype=data_type, shape=(self.N_rays))
self.noise_buffer = ti.Vector.field(2, dtype=data_type, shape=self.N_rays)
self.gen_noise_buffer()

self.rays_o = ti.Vector.field(n=3, dtype=data_type, shape=(self.N_rays))
self.rays_d = ti.Vector.field(n=3, dtype=data_type, shape=(self.N_rays))
self.rays_o = ti.Vector.field(n=3, dtype=data_type, shape=self.N_rays)
self.rays_d = ti.Vector.field(n=3, dtype=data_type, shape=self.N_rays)

# use the pre-compute direction and scene pose
self.directions = ti.Matrix.field(n=1, m=3, dtype=data_type, shape=(self.N_rays,))
self.pose = ti.Matrix.field(n=3, m=4, dtype=data_type, shape=())

# density_bitfield is used for point sampling
self.density_bitfield = ti.field(ti.uint32, shape=(cascades * grid_size**3 // 32))
self.density_bitfield = ti.field(ti.uint32, shape=cascades * grid_size**3 // 32)

# count the number of rays that still alive
self.counter = ti.field(ti.i32, shape=())
Expand Down Expand Up @@ -252,7 +252,7 @@ def __init__(self, scale, cascades, grid_size, base_res, log2_T, res, level, exp

# results buffers
self.opacity = ti.field(ti.f32, shape=(self.N_rays,))
self.depth = ti.field(ti.f32, shape=(self.N_rays))
self.depth = ti.field(ti.f32, shape=self.N_rays)
self.rgb = ti.Vector.field(3, dtype=ti.f32, shape=(self.N_rays,))

# GUI render buffer (data type must be float32)
Expand Down
18 changes: 9 additions & 9 deletions python/taichi/examples/simulation/eulerfluid2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ def swap(self):
self.cur, self.nxt = self.nxt, self.cur


velocityField = ti.Vector.field(2, float, shape=(eulerSimParam["shape"]))
_new_velocityField = ti.Vector.field(2, float, shape=(eulerSimParam["shape"]))
colorField = ti.Vector.field(3, float, shape=(eulerSimParam["shape"]))
_new_colorField = ti.Vector.field(3, float, shape=(eulerSimParam["shape"]))
velocityField = ti.Vector.field(2, float, shape=eulerSimParam["shape"])
_new_velocityField = ti.Vector.field(2, float, shape=eulerSimParam["shape"])
colorField = ti.Vector.field(3, float, shape=eulerSimParam["shape"])
_new_colorField = ti.Vector.field(3, float, shape=eulerSimParam["shape"])

curlField = ti.field(float, shape=(eulerSimParam["shape"]))
curlField = ti.field(float, shape=eulerSimParam["shape"])

divField = ti.field(float, shape=(eulerSimParam["shape"]))
pressField = ti.field(float, shape=(eulerSimParam["shape"]))
_new_pressField = ti.field(float, shape=(eulerSimParam["shape"]))
divField = ti.field(float, shape=eulerSimParam["shape"])
pressField = ti.field(float, shape=eulerSimParam["shape"])
_new_pressField = ti.field(float, shape=eulerSimParam["shape"])

velocities_pair = TexPair(velocityField, _new_velocityField)
pressure_pair = TexPair(pressField, _new_pressField)
Expand All @@ -96,7 +96,7 @@ def advection(vf: ti.template(), qf: ti.template(), new_qf: ti.template()):
coord_cur = ti.Vector([i, j]) + ti.Vector([0.5, 0.5])
vel_cur = vf[i, j]
coord_prev = coord_cur - vel_cur * eulerSimParam["dt"]
q_prev = bilerp(qf, coord_prev[0], coord_prev[1], (eulerSimParam["shape"]))
q_prev = bilerp(qf, coord_prev[0], coord_prev[1], eulerSimParam["shape"])
new_qf[i, j] = q_prev


Expand Down
4 changes: 2 additions & 2 deletions python/taichi/examples/simulation/snow_phaseField.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def __init__(
self.temperature_equi = 1.0 # temperature of equilibrium state

### parameters for RK4 method
self.dtRatio_rk4 = ti.field(ti.f64, shape=(4))
self.dtRatio_rk4 = ti.field(ti.f64, shape=4)
self.dtRatio_rk4.from_numpy(np.array([0.0, 0.5, 0.5, 1.0]))
self.weights_rk4 = ti.field(ti.f64, shape=(4))
self.weights_rk4 = ti.field(ti.f64, shape=4)
self.weights_rk4.from_numpy(np.array([1.0 / 6.0, 1.0 / 3.0, 1.0 / 3.0, 1.0 / 6.0]))

self.showFrameFrequency = int(4 * 1.0e-4 / self.dt)
Expand Down
1 change: 0 additions & 1 deletion python/taichi/lang/common_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ def _assign(self, other):
:class:`~taichi.lang.expr.Expr`: The expression after assigning."""
return ops.assign(self, other)

# pylint: disable=R0201
def _augassign(self, x, op):
"""Generate the computing expression between self and the given operand of given operator and assigned to self.

Expand Down