It is still entirely possible that the bug is in pytorch. I just mean that it is probably not in this line/function/file. So knowing what this line does likely won’t help. If it’s possible, could you post or send me the code that segfaults?