Adding a comment.

This commit is contained in:
Nicolas Patry 2024-01-26 10:30:01 +00:00
parent 97d9ff3a71
commit 7de9141164

View File

@ -185,6 +185,9 @@ class QuantLinear(nn.Module):
"g_idx": self.g_idx,
}
temp_dq = temp_dq.get_scratch_slice(self.temp_dq_size())
# We NEED to keep a pointer on Python side, otherwise the garbage collector will mess with us,
# and `Memory access fault by GPU node-2` will EAT you.
self.temp_dq = temp_dq
self.q_handle = ext_make_q_matrix(self.q_tensors, temp_dq)