Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0566C5475B for ; Wed, 6 Mar 2024 13:42:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B03A1131C6; Wed, 6 Mar 2024 13:42:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gMpud4Fp"; dkim-atps=neutral Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id C72A91131C6 for ; Wed, 6 Mar 2024 13:42:20 +0000 (UTC) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-412f556b3baso5016575e9.2 for ; Wed, 06 Mar 2024 05:42:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709732539; x=1710337339; darn=lists.freedesktop.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=+g0DLO2dGGQDdWuhd1YGhjhREO6yfsCX8QjKdhYZa2w=; b=gMpud4FpIqDkTyU+efCE285P5bvSlis63gQBKaWuEjCnAQdsyCl6KC+RDpLVkdFM+K lOo/F4C6yj1dqMfi6aPuAaXBwkd9nXMN0+LmS3d3R4S/ZP2SB68TA+kLmJXVjVS/7/Au Aid5o97zuDsAPDLvMmzlEBIvYPY9Jsl3idvu4hD7cn0MpvHYcszInro404+2MHXFNG1O SgTQ9ipQ7qEXlPbOdfVDmROTGQr4dUcTxIm7Pj6yqHT2slxbO9nf/BAnK2al2yjM59fW fdgtA1mWvYRiWH0caIsrW64xZYG8EUguxLwDfx2W8wwPZcfgOUqWTRyl/YrxZnVlgTOl rPwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709732539; x=1710337339; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+g0DLO2dGGQDdWuhd1YGhjhREO6yfsCX8QjKdhYZa2w=; b=DnVvkrWerWWw0c2QuhrG0U7131951+DBkgl78tT0dY5vRffH9YTFmWtdyfLlV5qc6x RwJpfuTxab59EXeRbyFwPZQk7PrA0Ivci3O1ubTjTIPlTVvawzP2A3iSgOjYtkvk2aoD jGNJQecEVNuJYrzhOMEqc5gunxjnU7etUc2xcwokULPqj8inqb9uXQLOateXHN7FDYlF 6HMiQ44ZhUT2uhSZ2I6bdlw0KGLHUiGfA5eh/+WgkE/Zc2ec1go97pv5+kkKvgCx4xz2 y3Se4GeYGxLNuzB3e31OKQ8hRYVX1l5j2dSMDHGU6TYpg8SjFTA4djXQOrb2ILNxMdsJ ft1w== X-Forwarded-Encrypted: i=1; AJvYcCWEYKgPj/sd1UjZVy4lxq3v//kSggPF8OcmZyKB6n2NtPANRulWw2T2MeaTCFLF75TfrWdPeTKQoQRJEl9h6/IcN0b3y1W/tEgWITWjhQ== X-Gm-Message-State: AOJu0YyACsiexOxotfQgqjf7zwfJVlXfqYDXHNS88drqSB6DB5gJokHh d7/XaXyP8tV3u4X+L2thXIQ57uAV0Or74Iqr/DgUpYILJnZ6RLav X-Google-Smtp-Source: AGHT+IF3dQp0WhnPQqtgl7RW/F+ZeWEI3ONyTVRd0e8v9xO5emlAHJeGFMM9EvI4bhW5cFT8Ef/iBA== X-Received: by 2002:a5d:4404:0:b0:33d:82cb:6595 with SMTP id z4-20020a5d4404000000b0033d82cb6595mr11244025wrq.68.1709732538415; Wed, 06 Mar 2024 05:42:18 -0800 (PST) Received: from [10.254.108.81] (munvpn.amd.com. [165.204.72.6]) by smtp.gmail.com with ESMTPSA id bx10-20020a5d5b0a000000b0033df46f70dbsm18320018wrb.9.2024.03.06.05.42.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Mar 2024 05:42:17 -0800 (PST) Content-Type: multipart/alternative; boundary="------------tuR7PnCpS3NHjrqcxt8OuCqp" Message-ID: <1cb14fea-4fe9-45db-b219-ec3999cbdb0d@gmail.com> Date: Wed, 6 Mar 2024 14:42:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Why has to offer "/dev/drv/render128" fd when running ROCm demo? Content-Language: en-US To: =?UTF-8?B?5pu55a2Q6b6Z?= , amd-gfx@lists.freedesktop.org Cc: "Deucher, Alexander" , "Yat Sin, David" , "Kuehling, Felix" References: <26c1a512.11d3c.18e0edda56b.Coremail.gainerying@163.com> <3fadf81a.7dac.18e123934a3.Coremail.gainerying@163.com> From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: <3fadf81a.7dac.18e123934a3.Coremail.gainerying@163.com> X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" This is a multi-part message in MIME format. --------------tuR7PnCpS3NHjrqcxt8OuCqp Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Zicao, that won't work any more the render Node is mandatory for correct ROCm operation by now. Regards, Christian. Am 06.03.24 um 06:25 schrieb 曹子龙: > Hi felix: >    Thanks for your kindly help. > > i still has a question, if on a pure-compute platform, which has no > /dev/dri/render node, but only with a single /dev/kfd node, how the > compue scenario works since that wei have no "render" fd exists? > is such platfom(without render node) exists? > >  thanks for your kindly help.! > > BRs > zlcao. > > > > > > At 2024-03-06 04:43:30, "Kuehling, Felix" wrote: > > [AMD Official Use Only - General] > > > I already answered this question in a reply to another email that > was addressed to me: > > The render nodes are used for CPU mapping of VRAM with mmap calls > and an offset that identifies the BO. The render node also creates > the GPU virtual address space that is used by KFD to create the > GPU memory mappings. Applications that use both graphics and > compute can share the same GPU virtual address space in this way. > > Zlcao, in the future, this type of question may be better > addressed to a mailing list such as amd-gfx@lists.freedesktop.org, > instead of writing separately to different maintainers. > > Regards, >   Felix > > *From:*Deucher, Alexander > *Sent:* Tuesday, March 5, 2024 3:17 PM > *To:* 曹子龙; Kuehling, Felix > ; Yat Sin, David > *Subject:* Re: Why has to offer "/dev/drv/render128" fd when > running ROCm demo? > > [AMD Official Use Only - General] > > + Felix, David to comment. > > ------------------------------------------------------------------------ > > *From:*曹子龙> > *Sent:* Tuesday, March 5, 2024 8:46 AM > *To:* Deucher, Alexander > > *Subject:* Why has to offer "/dev/drv/render128" fd when running > ROCm demo? > > Hi alexander.: > >     sorry for bother. but i really need some help to deal with my > puzzle. > > i am a freshman to AMD GPU Driver, NOW i am trying to write a > simple demo to use "/dev/kfd" and do some  vram alloc/free tests,  > but i found you must do the right "AMDKFD_IOC_ACQUIRE_VM" ioctl > comamnd before you try GPU to do vram allocation and other > things.  from the kfd driver code,the pre-condition to do the > right "AMDKFD_IOC_ACQUIRE_VM" is to offer a "/dev/drv/render128" > fd  to the parameters. > > so, why need to do this? kfd is used for compute, but > "/dev/dri/render128" is specify to gfx usaged, why must open the > "/dev/dri/render128" during the KFD compute scenario? > > thanks for your kindly help! > > BRs > > zlcao. > --------------tuR7PnCpS3NHjrqcxt8OuCqp Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Zicao,

that won't work any more the render Node is mandatory for correct ROCm operation by now.

Regards,
Christian.

Am 06.03.24 um 06:25 schrieb 曹子龙:
Hi felix:
   Thanks for your kindly help.

i still has a question, if on a pure-compute platform, which has no /dev/dri/render node, but only with a single /dev/kfd node, how the compue scenario works since that wei have no "render" fd exists?
is such platfom(without render node) exists? 

 thanks for your kindly help.!

BRs
zlcao.





At 2024-03-06 04:43:30, "Kuehling, Felix" <Felix.Kuehling@amd.com> wrote:

[AMD Official Use Only - General]


I already answered this question in a reply to another email that was addressed to me:

 

The render nodes are used for CPU mapping of VRAM with mmap calls and an offset that identifies the BO. The render node also creates the GPU virtual address space that is used by KFD to create the GPU memory mappings. Applications that use both graphics and compute can share the same GPU virtual address space in this way.

 

Zlcao, in the future, this type of question may be better addressed to a mailing list such as amd-gfx@lists.freedesktop.org, instead of writing separately to different maintainers.

 

Regards,
  Felix

 

 

From: Deucher, Alexander <Alexander.Deucher@amd.com>
Sent: Tuesday, March 5, 2024 3:17 PM
To:
曹子龙 <gainerying@163.com>; Kuehling, Felix <Felix.Kuehling@amd.com>; Yat Sin, David <David.YatSin@amd.com>
Subject: Re: Why has to offer "/dev/drv/render128" fd when running ROCm demo?

 

[AMD Official Use Only - General]

 

+ Felix, David to comment.


From: 曹子龙 <gainerying@163.com>
Sent: Tuesday, March 5, 2024 8:46 AM
To: Deucher, Alexander <
Alexander.Deucher@amd.com>
Subject: Why has to offer "/dev/drv/render128" fd when running ROCm demo?

 

Hi alexander.:

      sorry for bother. but i really need some help to deal with my puzzle. 

i am a freshman to AMD GPU Driver, NOW i am trying to write a simple demo to use "/dev/kfd" and do some  vram alloc/free tests,  but i found you must do the right "AMDKFD_IOC_ACQUIRE_VM" ioctl comamnd before you try GPU to do vram allocation and other things.  from the kfd driver code,the pre-condition to do the right "AMDKFD_IOC_ACQUIRE_VM" is to offer a "/dev/drv/render128" fd  to the parameters.

 

so, why need to do this? kfd is used for compute, but "/dev/dri/render128" is specify to gfx usaged, why must open the "/dev/dri/render128" during the KFD compute scenario?

thanks for your kindly help!

 

BRs

zlcao.

 


--------------tuR7PnCpS3NHjrqcxt8OuCqp--