Commit 9e9b2e74 authored by rusty1s's avatar rusty1s
Browse files

removed load_library calls

parent 47745860
import os
import importlib
import os.path as osp
from typing import Optional, Tuple
import torch
from .utils import broadcast
try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_scatter', [osp.dirname(__file__)]).origin)
except AttributeError as e:
if os.getenv('BUILD_DOCS', '0') != '1':
raise AttributeError(e)
@torch.jit.script
def scatter_sum(src: torch.Tensor, index: torch.Tensor, dim: int = -1,
......
import os
import importlib
import os.path as osp
from typing import Optional, Tuple
import torch
try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_segment_coo', [osp.dirname(__file__)]).origin)
except AttributeError as e:
if os.getenv('BUILD_DOCS', '0') != '1':
raise AttributeError(e)
@torch.jit.script
def segment_sum_coo(src: torch.Tensor, index: torch.Tensor,
......
import os
import importlib
import os.path as osp
from typing import Optional, Tuple
import torch
try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_segment_csr', [osp.dirname(__file__)]).origin)
except AttributeError as e:
if os.getenv('BUILD_DOCS', '0') != '1':
raise AttributeError(e)
@torch.jit.script
def segment_sum_csr(src: torch.Tensor, indptr: torch.Tensor,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment