Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gpu support for LRN #211

Closed
alexatknit opened this issue Nov 13, 2015 · 17 comments
Closed

Add gpu support for LRN #211

alexatknit opened this issue Nov 13, 2015 · 17 comments
Assignees
Labels
type:feature Feature requests

Comments

@alexatknit
Copy link

When I launch a network that uses local response normalization, it works perfectly on a CPU, but it appears to not have a gpu implementation and results in the following error when I switch to a gpu device:

tensorflow.python.framework.errors.InvalidArgumentError: Cannot assign a device to node 'LRN': Could not satisfy explicit device specification '/gpu:0' [[Node: LRN = LRN[alpha=0.0005, beta=0.75, bias=2, depth_radius=5, _device="/gpu:0"](conv1/conv1)]]

I could probably explicitly deploy this operation on the cpu, but it since this is a sliding window algorithm I'm surprised it doesn't have a gpu implementation.

@mrry
Copy link
Contributor

mrry commented Nov 13, 2015

Thanks for this feature request! In the meantime, if you want to test your model without explicitly specifying the device for each op, you can do:

sess = tf.Session(tf.ConfigProto(allow_soft_placement=True))

...when constructing your session. This allows you to request a GPU device for any of your ops, and it will fall back to running on a CPU if there is no GPU kernel available.

@alexatknit
Copy link
Author

Just in case anyone is using this code, theres a typo. It should be:

sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True))

@girving girving added the stat:contribution welcome Status - Contributions welcome label Mar 8, 2016
@jtoy
Copy link

jtoy commented Mar 23, 2016

just ran into this, anyone working on it?

@vrv
Copy link

vrv commented Mar 23, 2016

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/stream_executor/dnn.h#L822 does exist, if someone wants to plumb that call through, I think we'd have LRN support for GPU :)

@apkuhar
Copy link

apkuhar commented May 10, 2016

Any updates on this? not having this on GPU really slows things down.

@vrv
Copy link

vrv commented May 11, 2016

Right, cudnn has an LRN implementation, so the point is to have it use that one.

@rryan
Copy link
Member

rryan commented May 12, 2016

FYI to anyone looking at contributing a fix for this -- there is some movement internally.

@vrv
Copy link

vrv commented May 12, 2016

Thanks, removing the contributions welcome tag, since this is being worked on.

@vrv vrv removed the stat:contribution welcome Status - Contributions welcome label May 12, 2016
@girving
Copy link
Contributor

girving commented Jun 6, 2016

@vrv: Does the person working on it have a Github username?

@vrv
Copy link

vrv commented Jun 6, 2016

I don't know, @rryan do you know?

@rryan
Copy link
Member

rryan commented Jun 6, 2016

Once Stream Executor support is finished I was planning to work on it -- so you can assign me if you'd like :).

@girving
Copy link
Contributor

girving commented Jun 6, 2016

@rryan: Assigned, thanks!

@alvisememo
Copy link

Is there any news on this bug? Should I better compute it with different operations?

@rryan
Copy link
Member

rryan commented Jul 11, 2016

Sorry for the delay, I carved out some time to work on it this weekend and will be sending it out for review as soon as the GPU tests pass.

@alvisememo
Copy link

Thanks @rryan , looking forward!

@rryan
Copy link
Member

rryan commented Jul 13, 2016

Added in 35df3ed.

@vrv
Copy link

vrv commented Jul 13, 2016

Yay!

@vrv vrv closed this as completed Jul 13, 2016
@aselle aselle added type:feature Feature requests and removed enhancement labels Feb 9, 2017
tensorflow-copybara pushed a commit that referenced this issue Oct 29, 2019
When we removed a pattern, we removed it from worklist but not from
worklistMap. Then, when we tried to add a new pattern on the same Operation
again, the pattern wasn't added since it already existed in the
worklistMap (but not in the worklist).

Closes #211

PiperOrigin-RevId: 277319669
Change-Id: I4d919ea19eb5ef229b1ee001ddd26faba26e6879
tensorflow-copybara pushed a commit that referenced this issue Nov 19, 2019
When we removed a pattern, we removed it from worklist but not from
worklistMap. Then, when we tried to add a new pattern on the same Operation
again, the pattern wasn't added since it already existed in the
worklistMap (but not in the worklist).

Closes #211

PiperOrigin-RevId: 277319669
cjolivier01 pushed a commit to Cerebras/tensorflow that referenced this issue Dec 6, 2019
…pstream-rccl-distribute

add rccl to tf.contrib.distribute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Feature requests
Projects
None yet
Development

No branches or pull requests

9 participants