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 · 55 comments · May be fixed by #53521
Open

Feature Request: GPUOptions for Go binding #22926

mattn opened this issue Oct 12, 2018 · 55 comments · May be fixed by #53521
Labels
good first issue stat:contributions welcome type:feature

Comments

@mattn
Copy link
Contributor

@mattn 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 label Oct 12, 2018
@tensorflowbutler
Copy link
Member

@tensorflowbutler tensorflowbutler commented Oct 12, 2018

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 label Oct 17, 2018
@jhseu jhseu added stat:contributions welcome and removed stat:awaiting response stat:awaiting tensorflower labels Oct 18, 2018
@jhseu jhseu removed their assignment Oct 18, 2018
@frreiss
Copy link
Contributor

@frreiss 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 label Dec 3, 2018
@ymodak
Copy link
Contributor

@ymodak ymodak commented Dec 3, 2018

@asimshankar Can you please take a look? Thanks!

@alextp alextp added the good first issue label Mar 4, 2019
@alextp
Copy link
Contributor

@alextp alextp commented Mar 4, 2019

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

@frreiss
Copy link
Contributor

@frreiss frreiss commented Mar 13, 2019

I am looking into this.

@frreiss
Copy link
Contributor

@frreiss 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 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 mattn commented Apr 5, 2019

#26682 is reverted 6e9cb40#diff-dcd28ad951bd17e9c512d3b564640bab

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

@imrahul361 imrahul361 commented Sep 28, 2020

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

@mattn
Copy link
Contributor Author

@mattn mattn commented Sep 30, 2020

Yes please.

@imrahul361
Copy link

@imrahul361 imrahul361 commented Oct 1, 2020

May I know how to reproduce the issue?

@mattn
Copy link
Contributor Author

@mattn mattn commented Oct 1, 2020

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

#26682 (comment)

@imrahul361
Copy link

@imrahul361 imrahul361 commented Oct 1, 2020

ok no problem I will try some other issues

@AdeshKhandait
Copy link

@AdeshKhandait AdeshKhandait commented Oct 25, 2020

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

@Aditya-Komaravolu
Copy link

@Aditya-Komaravolu Aditya-Komaravolu commented Dec 19, 2020

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

@himanshu007-creator himanshu007-creator commented Jan 1, 2021

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

@RedaAitBabaaziz
Copy link

@RedaAitBabaaziz RedaAitBabaaziz commented Aug 30, 2021

name =input("enter your name : ")
password = input("enter your password : ")
password_length = len(password)
if password_length <= 8:
print("Short paas troop word!")
elif 8 <password_length <= 12:
print("Medium paas word! ")
else:
print("Perfect paas word! ")
print(password_length)

@Gomesz785
Copy link

@Gomesz785 Gomesz785 commented Sep 6, 2021

@RedaAitBabaaziz ?

@engineerrbae
Copy link

@engineerrbae engineerrbae commented Sep 13, 2021

@plopd Thanks. I really look forward to lots of learning. So how to get started?

@Gomesz785
Copy link

@Gomesz785 Gomesz785 commented Sep 16, 2021

Note from the past to fellow coders and beginners:
Ahem.

So this pops up in the good first issue page and a lot of "good first issue finder" websites. You might've came from a link, or other way.

So here is the deal:

I am a TensorFlow Developer - god level: Try it out, if you can understand what these names mean and can spot them in in the "TensorFlow".

I am a TensorFlow Developer: Try to solve it/ or learn the issue.

I am a huge developer of [X language used in TensorFlow]: First learn the issue(more like, learn how the issue relates to the "TensorFlow".

I am a developer of [X language used in TensorFlow]: try it out; learn the issue.

I am a learner in TensorFlow: you can start by learning the code of TensorFlow, then the issue, then the solutions + comments( <- do this before solving it!)

I am a learner of [X language used in TensorFlow]: you can explore but try this issue when you become a I am a learner in TensorFlow or I am a developer of [X language used in TensorFlow]...

I am a learner of programming: first be a I am a learner of [X language used in TensorFlow] or a I am a developer of [X language used in TensorFlow]....

I am a explorer of GitHub/TensorFlow/[X language used in TensorFlow]: you can start by learning the code of TensorFlow, then the issue, then the solutions + comments( <- do this before solving it!)

After choosing what to do from the above; do these:

Understand what is going on here; what's the comments, what's the feature, what are the questions here, how all these PRs and versions align to the issue, Can you make a timeline of the improvements.

So you are fixing the issue: First understand what is "GPUOptions for Go binding" then look the PRs already in progress, then chat with everyone(feel free to chat in other places like Reddit, Stack overflow.

Thanks for the hearts!

@adsampaigncc
Copy link

@adsampaigncc adsampaigncc commented Sep 18, 2021

@Jurek54321
Copy link

@Jurek54321 Jurek54321 commented Oct 3, 2021

Hello-World

@Gomesz785
Copy link

@Gomesz785 Gomesz785 commented Oct 4, 2021

@tensorflowbutler This comment section is just 1 mile away from getting the normal-land spam, isn't there some body to moderate this and take a look at the PRs and like disable commenting if a PR does good?

Examples of not-spam but worthless comments:

  • Hello Gays

  • #22926

  • Hello-World

  • name =input("enter your name : ")
    password = input("enter your password : ")
    password_length = len(password)
    if password_length <= 8:
    print("Short paas troop word!")
    elif 8 <password_length <= 12:
    print("Medium paas word! ")
    else:
    print("Perfect paas word! ")
    print(password_length)
    
  • 52193

  • #22926

  • Request

  • OpenCV VS Tensorflow

    The main difference between OpenCV is the computer vision library and TensorFlow is Machine Learning Tool. definition, differences, application, languages they support

  • Open CV

I am sorry if I got a comment wrong but sure this needs attention from someone (even not for my request/specific-thing but just...)

@nuriAngraini
Copy link

@nuriAngraini nuriAngraini commented Oct 8, 2021

52193

@AgastyaSingh3292
Copy link

@AgastyaSingh3292 AgastyaSingh3292 commented Oct 31, 2021

Is this issue open?

@Gomesz785
Copy link

@Gomesz785 Gomesz785 commented Oct 31, 2021

52193

What are you expecting by commenting this number?

@Gomesz785
Copy link

@Gomesz785 Gomesz785 commented Oct 31, 2021

Is this issue open?

Yes it is.

@Djhelps11
Copy link

@Djhelps11 Djhelps11 commented Nov 27, 2021

Request

@drasticcode
Copy link

@drasticcode drasticcode commented Dec 2, 2021

OpenCV VS Tensorflow

The main difference between OpenCV is the computer vision library and TensorFlow is Machine Learning Tool. definition, differences, application, languages they support

@HaithimNasher
Copy link

@HaithimNasher HaithimNasher commented Dec 2, 2021

Open CV

@Wansh619
Copy link

@Wansh619 Wansh619 commented Jan 31, 2022

Is this issue still open?
And if anyone is not working on it pleaee assign it to me

@Tasfia-Ara
Copy link

@Tasfia-Ara Tasfia-Ara commented Feb 5, 2022

Is this issue still open? I would like to take a stab at it

@Wansh619
Copy link

@Wansh619 Wansh619 commented Feb 5, 2022

@Tasfia-Ara are you new to this open source stuff

@Tasfia-Ara
Copy link

@Tasfia-Ara Tasfia-Ara commented Feb 5, 2022

@Wansh619 Yes this is my first project.

@Wansh619
Copy link

@Wansh619 Wansh619 commented Feb 5, 2022

For me too but there is no response that is this issue stiil open or not

@Tasfia-Ara
Copy link

@Tasfia-Ara Tasfia-Ara commented Feb 5, 2022

I hope someone responds - it also seems that many people tried to solve this, but couldn't

@Wansh619
Copy link

@Wansh619 Wansh619 commented Feb 5, 2022

Are you a student?

@Tasfia-Ara
Copy link

@Tasfia-Ara Tasfia-Ara commented Feb 5, 2022

yeah - I'm a comp sci major

@Wansh619
Copy link

@Wansh619 Wansh619 commented Feb 5, 2022

From which country?
I am from India

@Wansh619
Copy link

@Wansh619 Wansh619 commented Feb 5, 2022

@Tasfia-Ara i was thinking that if you too are new in this so let work together as a tem to solve this issue
By the way do you have any idea how to work on this issue or you too need resources to learn.

@Tasfia-Ara
Copy link

@Tasfia-Ara Tasfia-Ara commented Feb 5, 2022

@Wansh619 I will probably need more resources to learn more about this issue.

@ghost
Copy link

@ghost ghost commented Feb 5, 2022

Hello, I am new here and want to contribute in your project I would like to ask what i should learn to contribute here and please also tell me some resources ....

@0566616453
Copy link

@0566616453 0566616453 commented Feb 15, 2022

Leave a comment

@dbrown3562
Copy link

@dbrown3562 dbrown3562 commented Mar 20, 2022

Hey all! I'm looking to contribute to this project in some way, and have coding skills that include C, C++, Python, and Java. Is there anything that needs to be worked on, as a first-time contributor? If not code, perhaps some changes to documentation? Thanks!

@Saurabhkumar726
Copy link

@Saurabhkumar726 Saurabhkumar726 commented Apr 3, 2022

Anyone can help me in my project .....
project is social media integrated search engine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue stat:contributions welcome type:feature
Projects
None yet