Skip to content

Fix device transfer without losing graph attributes - #2

Merged
lmlearning merged 1 commit into
mainfrom
fix/device-transfer-attributes
Sep 25, 2026
Merged

lmlearning merged 1 commit into
mainfrom
fix/device-transfer-attributes

Conversation

@lmlearning

Copy link
Copy Markdown
Owner

Graph attributes previously raised NameError because the helper referenced an undefined DEVICE, and the failed transfer removed the source attribute. Use the caller's device and retain the current attribute when conversion fails.

Extract the dependency-free operation into GraphLib/device.py, preserving the existing GraphLib.dglutil entry point, keyword arguments, graph identity and in-place behavior. Earlier successful transfers are not rolled back. Add component CI and document the contract.

Validation: 5 regression tests pass for node/edge transfers, requested devices, failed transfers and empty graphs; changed modules compile. Tests use protocol doubles and do not claim DGL/GPU or model-training validation.

Closes #1.

@lmlearning
lmlearning merged commit cd81519 into main Sep 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

send_graph_to_device uses undefined DEVICE and removes attributes before failing

1 participant