Ashiedu's picture
Add files using upload-large-folder tool
40ef767 verified
Raw
History Blame Contribute Delete
397 Bytes
from typing import Optional
import torch
from .functional import selective_state_update
def selective_update(x: torch.Tensor, out: Optional[torch.Tensor] = None) -> torch.Tensor:
"""Legacy scaffold kernel — adds 1.0 to each element."""
if out is None:
out = torch.empty_like(x)
out.copy_(x + 1.0)
return out
__all__ = ["selective_update", "selective_state_update"]