[go: nahoru, domu]

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

Feature Request: GPUOptions for Go binding #22926

Open
mattn opened this issue Oct 12, 2018 · 95 comments
Open

Feature Request: GPUOptions for Go binding #22926

mattn opened this issue Oct 12, 2018 · 95 comments
Labels
good first issue Good first issue for newcomers. stat:contribution welcome Status - Contributions welcome type:feature Feature requests

Comments

@mattn
Copy link
Contributor
mattn commented Oct 12, 2018

Current implementation of Go binding can not specify options.

GPUOptions struct is in internal package. And go generate doesn't work for protobuf directory. So we can't specify GPUOptions for NewSession.

@tensorflowbutler tensorflowbutler added the stat:awaiting response Status - Awaiting response from author label Oct 12, 2018
@tensorflowbutler
Copy link
Member

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce
Mobile device

@ymodak ymodak assigned jhseu and unassigned ymodak Oct 17, 2018
@ymodak ymodak added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Oct 17, 2018
@jhseu jhseu added stat:contribution welcome Status - Contributions welcome and removed stat:awaiting response Status - Awaiting response from author stat:awaiting tensorflower Status - Awaiting response from tensorflower labels Oct 18, 2018
@jhseu jhseu removed their assignment Oct 18, 2018
@frreiss
Copy link
Contributor
frreiss commented Dec 3, 2018

This problem appears to be broader than just specifying GPUOptions for TensorFlow sessions. There is no native Go API for passing any options when creating a session. The user must create the binary representation of a ConfigProto protocol buffer outside of the TensorFlow Go API.

See, for example, the test case TestSessionConfig in session_test.go:

func TestSessionConfig(t *testing.T) {
	// Exercise SessionOptions.
	// Arguably, a better API would be for SessionOptions.Config to be the
	// type generated by the protocol buffer compiler. But for now, the
	// tensorflow package continues to be independent of protocol buffers
	// and this test exercises the option since the implementation has a
	// nuanced conversion to C types.
	//
	// Till then, the []byte form of Config here was generated using a toy
	// tensorflow Python program:
	/*
	 import tensorflow
	 c = tensorflow.ConfigProto()
	 c.intra_op_parallelism_threads = 1
	 print c.SerializeToString()
	*/
	graph := NewGraph()
	c, err := Const(graph, "Const", int32(14))
	if err != nil {
		t.Fatal(err)
	}
	opts := SessionOptions{Config: []byte("(\x01")}
[...]

Would the TensorFlow maintainers accept a non-Google contribution that added the ability to specify session options using pure Go code? This functionality would require generating instances of the ConfigProto protocol buffer defined in config.proto. I can see two ways to generate these protocol buffers: Either add a build target to generate Go bindings for the files in tensorflow/core/protobuf; or add Go wrappers for the generated C++ code in tensorflow/core/protobuf/config.pb.h

@ymodak ymodak added the type:feature Feature requests label Dec 3, 2018
@ymodak
Copy link
Contributor
ymodak commented Dec 3, 2018

@asimshankar Can you please take a look? Thanks!

@alextp alextp added the good first issue Good first issue for newcomers. label Mar 4, 2019
@alextp
Copy link
Contributor
alextp commented Mar 4, 2019

@frreiss we'll definitely accept a Go-only API to configure tensorflow.

@frreiss
Copy link
Contributor
frreiss commented Mar 13, 2019

I am looking into this.

@frreiss
Copy link
Contributor
frreiss commented Mar 13, 2019

Created PR #26682 with a Go API to create ConfigOptions protocol buffer messages. I made the changes as narrow in scope as I could.

@mattn
Copy link
Contributor Author
mattn commented Mar 30, 2019

Closed by #26682

@frreiss Thank you

@mattn mattn closed this as completed Mar 30, 2019
@mattn
Copy link
Contributor Author
mattn commented Apr 5, 2019

#26682 is reverted 6e9cb40#diff-dcd28ad951bd17e9c512d3b564640bab

@mattn mattn reopened this Apr 5, 2019
@imrahul361
Copy link

is this issue open? Can i work on it? @mattn

@mattn
Copy link
Contributor Author
mattn commented Sep 30, 2020

Yes please.

@imrahul361
Copy link

May I know how to reproduce the issue?

@mattn
Copy link
Contributor Author
mattn commented Oct 1, 2020

Sorry, I don't know why the changes was reverted.

#26682 (comment)

@imrahul361
Copy link

ok no problem I will try some other issues

@AdeshKhandait
Copy link

Hi,Adesh I am beginner i don't where start Can anybody help me?????

@Aditya-Komaravolu
Copy link

Hello!
I am newbie to open source contribution and really interested to contribute!! . But I have very very less knowledge about it . Can anyone help me please?

@himanshu007-creator
Copy link

can someone guide me what to do? i will be really thankful 👍

@Mike-gag
Copy link
Mike-gag commented Mar 7, 2023

Is the issue still open? I have a solution in mind

@dabenor
Copy link
dabenor commented Mar 11, 2023

@Mike-gag I'd love to help contribute as well, do you want to collaborate on the fix?

@Mike-gag
Copy link

@dabenor sure! dm me

@dabenor
Copy link
dabenor commented Mar 12, 2023

@Mike-gag I don't think I can DM on here, but my email is on my profile. Shoot me an email and let's connect on this

@Khayoon
Copy link
Khayoon commented Mar 12, 2023

Is this feature still not integrated? I will gladly help! Can you designate it to me?

@pranjalisr
Copy link

f you want your generated code placed in a specific directory, use an absolute path:

mkdir -p /some/absolute/path
protoc my.proto --go_out=/some/absolute/path

@SaikumarGatla
Copy link

hey can anyone please help me really want to contribute plzzzzzzzzzz

@anishlukk123
Copy link

i think this issue was resolved but feel free to look at other issues

@AyushABD-17
Copy link

is this problem solved , I am_ new to machine learning can anyone help to understand the problem

@YBelikov
Copy link

hi!
does this issue still actual? Or you can close it?

@nagendras176
Copy link

Can I try to contribute to this

@sus194
Copy link
sus194 commented Jul 6, 2023

hi, does this still need fixing?

@harshavardhan-b20
Copy link
Contributor

Hello,

I'm excited about contributing to this issue and believe it aligns well with my skills and interests. Could you please assign me to work on this? I'm ready to dive in, discuss the details, and start contributing.

Thank you!
Harshavardhan Bellamkonda

@rajveer43
Copy link

@harshavardhan-b20 we can collaborate and work on this, would like to work together? lets dive in together

@harshavardhan-b20
Copy link
Contributor

@rajveer43 Sure, I'm happy to have the opportunity to collaborate with you on this! Working together to improve the GPUOptions binding for Go sounds like an interesting endeavor. Let's dive into the details and start making meaningful contributions. Your enthusiasm and willingness to contribute is greatly appreciated. Looking forward to a productive and successful cooperation! 

@rajveer43
Copy link

I am new to Go, so Learning by doing! let me know when can we start?

@JAYANTHNITW
Copy link

Hello, opensource community!!, This is Jayanth I am new to opensource, I would like to contribute in tensorflow project! Can anyone guide me to contribute on any good first issue pls!, Thank you

@Antonyj12
Copy link

Hi OpenSource community,I am Antony very new to this platform.I would like to contribute in tensorflow. Any help would be appreciated

@groovitz
Copy link
groovitz commented Nov 9, 2023

Hi folks, I am Varad and I am new to open source contribution. I would really like to contribute to the tensorflow project. I would be really grateful if someone can guide me with contributing to this project. Thank you for your time!

@devanshi-jain
Copy link

Hi folks, I am Varad and I am new to open source contribution. I would really like to contribute to the tensorflow project. I would be really grateful if someone can guide me with contributing to this project. Thank you for your time!

^^^^

@rayyan21d
Copy link

Hi everyone👋, I am Rayyan Uddin. I recently started learning ML and found Tf to be extremely helpful.
I am glad such a community exits so that we can focus on developing applications. I would love to contribute to Open Source and can't be more excited to be a part of history.

@AlwaysHumble
Copy link

Hi Everyone, I am Karan. I wanted to start contributing to open-source and tensor-flow is a great place to start. Please do help me by telling me whether this issue is still open or not and further guide me on how to proceed further on this issue.

@keshavbnsl102
Copy link

Hi, I am keshav. I would also like to contribute to this issue. It would really help if someone can give a summary of what has happened so far in this issue.

@Bhalchandra-patil03
Copy link

HI , I am Bhalchandra patil , a artificial intelligence undergrad ,i am new to open source contribution , I would like to contribute in tensorflow project! Can anyone guide me to contribute on any good first issue pls!, Thank you

@diaconumadalina
Copy link

Hello everyone, I'm Mada, and I'm eager to begin contributing to open-source projects. TensorFlow seems like an excellent place to start. Could someone please help me determine if a specific issue is still open, and if so, guide me on how to proceed with it? I appreciate any assistance provided.

@manojgowda5
Copy link

..

@AnmolArora15
Copy link

Hi, I am Anmol, I am currently learning more about Deep Learning and Computer Vision. I am new to the Open Source Contribution. I want to learn more about the technology and want to be part of the Open Source Community by actively contributing to it. Can anyone guide me, on how I can contribute to a good first issue, Thank you.

@mohmmadAyesh
Copy link

Hi my friends I am mohmmad Ayesh I want to contribute in tensor flow repo or any open sources but I new to contributing in other open sources have javascript experience with react basic can any one guide me thanks

@shah9678
Copy link

I am looking into this problem

@willyg23
Copy link

Hey I'm Will, and would love to contribute to TensorFlow. If anyone can recommend some starter issues to me that'd be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good first issue for newcomers. stat:contribution welcome Status - Contributions welcome type:feature Feature requests
Projects
None yet