Skip to content

CUDA Eerror:an illegal memory access was encountered #9

Description

@dbwzyh

class ROIPoolFunction(Function): @staticmethod def forward(ctx, feat, rois, pool_h, pool_w, scale, train): ctx.rois = rois ctx.feat_size = feat.size() ctx.pool_h = pool_h ctx.pool_w = pool_w if train: ctx.memory = torch.zeros((rois.size(0), feat.size(1), pool_h, pool_w), dtype=torch.int) else: ctx.memory = torch.zeros(0) if feat.is_cuda: ctx.memory = ctx.memory.cuda() output = roi_pool_cuda.forward_cuda(feat, rois, pool_h, pool_w, scale, ctx.memory) else: output = roi_pool_cpu.forward_cpu(feat, rois, pool_h, pool_w, scale, ctx.memory) return output

ctx.memory = torch.zeros(0)
i found this line will lead to the runtime error :CUDA Eerror:an illegal memory access was encountered

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions