Skip to content

AttributeError: module 'hadamard_cuda' has no attribute 'hadamard_transform' #4

@Ashokvardhan

Description

@Ashokvardhan

Hi,

It seems I am unable to use the hadamard_transform_cuda function for some reason. I checked that there is no issue with the installation. When I ran python setup.py install, I get the following:

``running install
running bdist_egg
running egg_info
writing hadamard_cuda.egg-info/PKG-INFO
writing dependency_links to hadamard_cuda.egg-info/dependency_links.txt
writing top-level names to hadamard_cuda.egg-info/top_level.txt
reading manifest file 'hadamard_cuda.egg-info/SOURCES.txt'
writing manifest file 'hadamard_cuda.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying hadamard_cuda.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying hadamard_cuda.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying hadamard_cuda.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying hadamard_cuda.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/hadamard_cuda-0.0.0-py3.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing hadamard_cuda-0.0.0-py3.6.egg
Copying hadamard_cuda-0.0.0-py3.6.egg to /home/ashok/anaconda3/envs/okay/lib/python3.6/site-packages
Adding hadamard-cuda 0.0.0 to easy-install.pth file

Installed /home/ashok/anaconda3/envs/okay/lib/python3.6/site-packages/hadamard_cuda-0.0.0-py3.6.egg
Processing dependencies for hadamard-cuda==0.0.0
Finished processing dependencies for hadamard-cuda==0.0.0``

However, when I access the function hadamard_transform_cuda , I get the following error:

`import torch
import hadamard_cuda
from hadamard import *
a = torch.randn(5,2).cuda()

hadamard_transform_cuda(a)

Traceback (most recent call last):
File "", line 1, in
File "/home/ashok/reed_muller/Neural_Plotkin/reed_muller_modules/hadamard.py", line 68, in hadamard_transform_cuda
output = HadamardTransformCuda.apply(u)
File "/home/ashok/reed_muller/Neural_Plotkin/reed_muller_modules/hadamard.py", line 49, in forward
return hadamard_cuda.hadamard_transform(u)
AttributeError: module 'hadamard_cuda' has no attribute 'hadamard_transform'`

My conda environment has the following configurations: python=3.6, pytorch 1.0.0, cudatoolkit=10.0, gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions