torch.compiler.assume_constant_result
- torch.compiler.assume_constant_result(fn)
This function is used to mark a function fn as having a constant result. This allows the compiler to optimize away your function. Returns The same function fn
- Parameters:
fn – The function to be marked as having a constant result.