Skip to content

Illegal Memory Access When Using OneHot with CUDA #71

@ari-holtzman

Description

@ari-holtzman

This code:

require 'cutorch'
require 'dpnn'
local v = torch.CudaTensor.zeros(torch.CudaTensor.new(), 5)
v[3] = 1
local one_hot = nn.OneHot(5):cuda()
one_hot:forward(v)

Gives me this error:

THCudaCheck FAIL file=/tmp/luarocks_cutorch-scm-1-75/cutorch/lib/THC/generic/THCStorage.c line=147 error=77 : an illegal memory access was encountered

Am I missing something really, really obvious or is this a really weird bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions