You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But is there no way to use only c++ without python code?.
And that code generate all same serialized_options like below :(
Create serialized options which allow TF to use a certain percentage of GPU memory and allow TF to expand this memory if required.
GPU memory to be used: 10.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 20.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 30.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 40.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 50.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 60.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 70.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 80.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 90.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
On Thu, Mar 11, 2021, 01:40 Seungtaek Kim ***@***.***> wrote:
@serizba <https://github.com/serizba>
Thanks for ur helps :)
But is there no way to use only c++ without python code?.
And that code generate all same serialized_options like below :(
Create serialized options which allow TF to use a certain percentage of GPU memory and allow TF to expand this memory if required.
GPU memory to be used: 10.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 20.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 30.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 40.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 50.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 60.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 70.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 80.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 90.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#102 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALDTHXU47NP4UTISOOU3H3TDBQU3ANCNFSM4Y2OL37A>
.
if i set gpu_memory_allow_growth = false, it has took 7386MiB/8192MiB memory in rtx 2080 super.
otherwise if i set true, it has took 7002MiB / 8192MiB. Still takes to much..
My model has only 3M number of params. hmm..
Can you try TF_CreateConfig function? Btw, it is currently experimental. https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/c_api_experimental.h#L93 …
On Thu, Mar 11, 2021, 01:40 Seungtaek Kim @.***> wrote: @serizbahttps://github.com/serizba Thanks for ur helps :) But is there no way to use only c++ without python code?. And that code generate all same serialized_options like below :( Create serialized options which allow TF to use a certain percentage of GPU memory and allow TF to expand this memory if required. GPU memory to be used: 10.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1} GPU memory to be used: 20.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1} GPU memory to be used: 30.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1} GPU memory to be used: 40.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1} GPU memory to be used: 50.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1} GPU memory to be used: 60.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1} GPU memory to be used: 70.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1} GPU memory to be used: 80.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1} GPU memory to be used: 90.0 %, {0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1} — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#102 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALDTHXU47NP4UTISOOU3H3TDBQU3ANCNFSM4Y2OL37A .
i tested that code, and it works. And now it shows different serialized result like that sample :)
i have one more question about this serialized options.
this serialized results r same on every system or tf version?.
i serialized with tf 2.4 with rtx 2080 super, and that result is same with ur samples in that commit #105.
thanks for ur help :)
Create serialized options which allow TF to use a certain percentage of GPU memory and allow TF to expand this memory if required.
GPU memory to be used: 10.0 %
{0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f,0x20,0x1}
GPU memory to be used: 20.0 %
{0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xc9,0x3f,0x20,0x1}
GPU memory to be used: 30.000000000000004 %
{0x32,0xb,0x9,0x34,0x33,0x33,0x33,0x33,0x33,0xd3,0x3f,0x20,0x1}
GPU memory to be used: 40.0 %
{0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xd9,0x3f,0x20,0x1}
GPU memory to be used: 50.0 %
{0x32,0xb,0x9,0x0,0x0,0x0,0x0,0x0,0x0,0xe0,0x3f,0x20,0x1}
GPU memory to be used: 60.00000000000001 %
{0x32,0xb,0x9,0x34,0x33,0x33,0x33,0x33,0x33,0xe3,0x3f,0x20,0x1}
GPU memory to be used: 70.0 %
{0x32,0xb,0x9,0x67,0x66,0x66,0x66,0x66,0x66,0xe6,0x3f,0x20,0x1}
GPU memory to be used: 80.0 %
{0x32,0xb,0x9,0x9a,0x99,0x99,0x99,0x99,0x99,0xe9,0x3f,0x20,0x1}
GPU memory to be used: 90.0 %
{0x32,0xb,0x9,0xcd,0xcc,0xcc,0xcc,0xcc,0xcc,0xec,0x3f,0x20,0x1}
The protocol buffer format should be platform independent. The only possibility of incompatibility is that the protocol buffer library is updated to a non-backward compatible version, which is very unlikely.
Activity
serizba commentedon Mar 9, 2021
Hi @seungtaek94 ,
Yes, you can specify the context options. First you need to obtain them in a serialized way, check this to see how.
Then you can set the global context with a new one with your defined options.
Hope it helps!
seungtaek94 commentedon Mar 11, 2021
@serizba
Thanks for ur helps :)
But is there no way to use only c++ without python code?.
And that code generate all same serialized_options like below :(
ljn917 commentedon Mar 11, 2021
seungtaek94 commentedon Mar 11, 2021
@ljn917 , I just tried ur comment function
TF_CreateConfiglike below:but it doesnt help for me..
if i set
gpu_memory_allow_growth = false, it has took7386MiB/8192MiBmemory in rtx 2080 super.otherwise if i set
true, it has took7002MiB / 8192MiB. Still takes to much..My model has only 3M number of params. hmm..
serizba commentedon Mar 11, 2021
And how much GPU memory does it take when you run it on python?
seungtaek94 commentedon Mar 11, 2021
@serizba
7405MiB / 8192MiB7024MiB / 8192MiB(memory_limit=2048):
3273MiB / 8192MiB(memory_limit=1024):
2254MiB / 8192MiB(memory_limit=512):
1744MiB / 8192MiB(memory_limit=256):
OOMljn917 commentedon Mar 11, 2021
@seungtaek94 Can you test #105?
seungtaek94 commentedon Mar 11, 2021
@ljn917
i tested that code, and it works. And now it shows different serialized result like that sample :)
i have one more question about this serialized options.
this serialized results r same on every system or tf version?.
i serialized with tf 2.4 with rtx 2080 super, and that result is same with ur samples in that commit #105.
thanks for ur help :)
ljn917 commentedon Mar 11, 2021
The protocol buffer format should be platform independent. The only possibility of incompatibility is that the protocol buffer library is updated to a non-backward compatible version, which is very unlikely.
seungtaek94 commentedon Mar 11, 2021
thanks for all answer :)