Skip to content

Commit

Permalink
fix: Strengthen join condition between kernels and images (#2993) (#2996
Browse files Browse the repository at this point in the history
)

Co-authored-by: Sanghun Lee <[email protected]>
  • Loading branch information
lablup-octodog and fregataa authored Oct 29, 2024
1 parent 8b8ea76 commit a8c6e9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/2993.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Strengthen join condition between kernels and images to prevent incorrect matches
2 changes: 1 addition & 1 deletion src/ai/backend/manager/models/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ class KernelRow(Base):
image_row = relationship(
"ImageRow",
foreign_keys="KernelRow.image",
primaryjoin="KernelRow.image == ImageRow.name",
primaryjoin="and_(KernelRow.image == ImageRow.name, KernelRow.architecture == ImageRow.architecture)",
)
agent_row = relationship("AgentRow", back_populates="kernels")
group_row = relationship("GroupRow", back_populates="kernels")
Expand Down

0 comments on commit a8c6e9c

Please sign in to comment.