graphlow.core.MeshTopology.free_backend_sparse#
- MeshTopology.free_backend_sparse(name: str | None = None, layout: Literal['csr', 'coo'] = 'coo') None#
Free backend sparse.
Advanced API: for explicit control over backend (GPU/device) memory. Frees materialized sparse tensors from the backend cache. Use when you no longer need the sparse matrices and want to release device memory.
- Parameters:
- namestr | None
Sparse name. If None, free all sparse. - For incidence/adjacency, the name is like “CP”, “CC”. - For derived skeletons, the name is formatted as “[DerivedMatrixName]_[AdjacencyName]”. e.g. “DEGREE_PP”, “NORMALIZED_PP”, “LAPLACIAN_CC”.
- layoutLiteral[“csr”, “coo”]
Layout of the sparse matrix.