GithubHelp home page GithubHelp logo

Comments (3)

kumariko avatar kumariko commented on June 20, 2024

@sachinprasadhs Was able to reproduce the issue on CPU and GPU please find the gist attached.Thanks!

from tf-keras.

tilakrayal avatar tilakrayal commented on June 20, 2024

@unrealwill,
I tried to execute the code by provinding the alternative x_train and y-train data, and found the difference in the time interval.
Case1: tf.random.uniform((600000,100) -- 35s
Case2: tf.random.uniform((60000,100) -- 3s
Case3 : tf.random.uniform((6000,100) -- 1s

Kindly find the gist of it here and I suspect the computation time was taken longer for the x_train and y_train data when providing the tf.random.uniform((600000,100). Thank you!

from tf-keras.

unrealwill avatar unrealwill commented on June 20, 2024

@tilakrayal
This is not about computation time. It's about the presence of extra GPU to CPU memory transfer : "The green block "MemCpyH2D" " in the picture in the other thread shouldn't be.

It's quite a binary problem, either it's no longer there in new tensorflow versions, in which case you can close the bug, or it's still there and in which case it still needs to be solved by defining the proper missing ops for the int types : tensorflow/tensorflow#54197 (comment)

I no longer use tensorflow so can't test anymore, and don't care anymore. I encountered this problem when I was implementing some InstantNerf neural network with tensorflow : the hashing operations involved used some operations on int32 tensors therefore encountered the problem, which manifested through slow performance due to this extra gpu-cpu transfer. Some elementary ops (like broadcasted addition and mul between integer tensor) that shouldn't necessitate gpu-cpu transfer suddenly do because the kernel is not defined for int tensors. But because it's done transparently, the ops get done but on the cpu so you may miss the probem, everything work, but it really kills performance for no other reasons than a kernel not being defined (But if defining such a basic kernel increase the tf binary size so much it means you have other problems).

from tf-keras.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.