Re: [Mesa-dev] [PATCH] radeonsi: enable LLVM sisched for Unigine Superposition

2017-06-25 Thread Marek Olšák
On Sun, Jun 25, 2017 at 12:55 PM, Grigori Goronzy  wrote:
> On 2017-06-22 17:10, Marek Olšák wrote:
>>
>> From: Marek Olšák 
>>
>> +2.3% better score on Fiji. It might be better without HBM.
>
>
> Is this really useful? Superposition is a benchmark. It would make more
> sense if this also targeted some actual games.
> Optimizations specific to only benchmarks are considered "cheating"
> sometimes.

The change isn't just meant to be limited to 1 app. However, nobody
has nominated any other app for switching to sisched yet. This is the
first official nomination for sisched in the history of the driver. It
will hopefully inspire other people to make more nominations. If you
want better overall performance, you have to start somewhere.

Marek
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] radeonsi: enable LLVM sisched for Unigine Superposition

2017-06-25 Thread Grigori Goronzy

On 2017-06-22 17:10, Marek Olšák wrote:

From: Marek Olšák 

+2.3% better score on Fiji. It might be better without HBM.


Is this really useful? Superposition is a benchmark. It would make more 
sense if this also targeted some actual games.
Optimizations specific to only benchmarks are considered "cheating" 
sometimes.


Best regards
Grigori


---
 src/gallium/drivers/radeonsi/si_pipe.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c
b/src/gallium/drivers/radeonsi/si_pipe.c
index ff787ad..4088849 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -935,20 +935,27 @@ struct pipe_screen
*radeonsi_screen_create(struct radeon_winsys *ws,

si_init_screen_state_functions(sscreen);

if (!r600_common_screen_init(>b, ws, flags) ||
!si_init_gs_info(sscreen) ||
!si_init_shader_cache(sscreen)) {
FREE(sscreen);
return NULL;
}

+   /* Enable sisched where it helps. */
+   char process[128];
+   if (os_get_process_name(process, sizeof(process)) &&
+   /* Unigine Superposition */
+   !strcmp(process, "superposition"))
+   sscreen->b.debug_flags |= DBG_SI_SCHED;
+
 	/* Only enable as many threads as we have target machines, but at 
most

 * the number of CPUs - 1 if there is more than one.
 */
num_threads = sysconf(_SC_NPROCESSORS_ONLN);
num_threads = MAX2(1, num_threads - 1);
num_compiler_threads = MIN2(num_threads, ARRAY_SIZE(sscreen->tm));
num_compiler_threads_lowprio =
MIN2(num_threads, ARRAY_SIZE(sscreen->tm_low_priority));

if (!util_queue_init(>shader_compiler_queue, "si_shader",

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] radeonsi: enable LLVM sisched for Unigine Superposition

2017-06-25 Thread Marek Olšák
On Jun 25, 2017 9:23 AM, "Nicolai Hähnle"  wrote:

On 24.06.2017 13:35, Marek Olšák wrote:

>
>
> On Jun 24, 2017 12:01 PM, "Nicolai Hähnle" > wrote:
>
> On 22.06.2017 17 :10, Marek Olšák wrote:
>
> From: Marek Olšák  >>
>
>
> +2.3% better score on Fiji. It might be better without HBM.
>
>
> Can this be a drirc option?
>
>
> The answer is the same as for: Can sisched be a flag defined in
> p_defines.h, drirc, and plumbed by st/dri? Nobody has ever put
> driver-specific stuff into p_defines.h.
>

Obviously the answer to these is no. However, some interface that provides
direct generic access to drirc could be plumbed through.


How?

Marek



Nicolai




> Marek
>
>
>
>
>
> ---
>src/gallium/drivers/radeonsi/si_pipe.c | 7 +++
>1 file changed, 7 insertions(+)
>
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c
> b/src/gallium/drivers/radeonsi/si_pipe.c
> index ff787ad..4088849 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.c
> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
> @@ -935,20 +935,27 @@ struct pipe_screen
> *radeonsi_screen_create(struct radeon_winsys *ws,
>  si_init_screen_state_functions(sscreen);
>  if (!r600_common_screen_init(>b, ws, flags) ||
>  !si_init_gs_info(sscreen) ||
>  !si_init_shader_cache(sscreen)) {
>  FREE(sscreen);
>  return NULL;
>  }
>+ /* Enable sisched where it helps. */
> +   char process[128];
> +   if (os_get_process_name(process, sizeof(process)) &&
> +   /* Unigine Superposition */
> +   !strcmp(process, "superposition"))
> +   sscreen->b.debug_flags |= DBG_SI_SCHED;
> +
>  /* Only enable as many threads as we have target
> machines, but at most
>   * the number of CPUs - 1 if there is more than one.
>   */
>  num_threads = sysconf(_SC_NPROCESSORS_ONLN);
>  num_threads = MAX2(1, num_threads - 1);
>  num_compiler_threads = MIN2(num_threads,
> ARRAY_SIZE(sscreen->tm));
>  num_compiler_threads_lowprio =
>  MIN2(num_threads,
> ARRAY_SIZE(sscreen->tm_low_priority));
>  if (!util_queue_init(>shader_compiler_queue,
> "si_shader",
>
>
>
> -- Lerne, wie die Welt wirklich ist,
> Aber vergiss niemals, wie sie sein sollte.
>
>
>

-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] radeonsi: enable LLVM sisched for Unigine Superposition

2017-06-25 Thread Nicolai Hähnle

On 24.06.2017 13:35, Marek Olšák wrote:



On Jun 24, 2017 12:01 PM, "Nicolai Hähnle" > wrote:


On 22.06.2017 17 :10, Marek Olšák wrote:

From: Marek Olšák >

+2.3% better score on Fiji. It might be better without HBM.


Can this be a drirc option?


The answer is the same as for: Can sisched be a flag defined in 
p_defines.h, drirc, and plumbed by st/dri? Nobody has ever put 
driver-specific stuff into p_defines.h.


Obviously the answer to these is no. However, some interface that 
provides direct generic access to drirc could be plumbed through.


Nicolai




Marek





---
   src/gallium/drivers/radeonsi/si_pipe.c | 7 +++
   1 file changed, 7 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c
b/src/gallium/drivers/radeonsi/si_pipe.c
index ff787ad..4088849 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -935,20 +935,27 @@ struct pipe_screen
*radeonsi_screen_create(struct radeon_winsys *ws,
 si_init_screen_state_functions(sscreen);
 if (!r600_common_screen_init(>b, ws, flags) ||
 !si_init_gs_info(sscreen) ||
 !si_init_shader_cache(sscreen)) {
 FREE(sscreen);
 return NULL;
 }
   + /* Enable sisched where it helps. */
+   char process[128];
+   if (os_get_process_name(process, sizeof(process)) &&
+   /* Unigine Superposition */
+   !strcmp(process, "superposition"))
+   sscreen->b.debug_flags |= DBG_SI_SCHED;
+
 /* Only enable as many threads as we have target
machines, but at most
  * the number of CPUs - 1 if there is more than one.
  */
 num_threads = sysconf(_SC_NPROCESSORS_ONLN);
 num_threads = MAX2(1, num_threads - 1);
 num_compiler_threads = MIN2(num_threads,
ARRAY_SIZE(sscreen->tm));
 num_compiler_threads_lowprio =
 MIN2(num_threads,
ARRAY_SIZE(sscreen->tm_low_priority));
 if (!util_queue_init(>shader_compiler_queue,
"si_shader",



-- 
Lerne, wie die Welt wirklich ist,

Aber vergiss niemals, wie sie sein sollte.





--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] radeonsi: enable LLVM sisched for Unigine Superposition

2017-06-24 Thread Marek Olšák
On Jun 24, 2017 12:01 PM, "Nicolai Hähnle"  wrote:

On 22.06.2017 17:10, Marek Olšák wrote:

> From: Marek Olšák 
>
> +2.3% better score on Fiji. It might be better without HBM.
>

Can this be a drirc option?


The answer is the same as for: Can sisched be a flag defined in
p_defines.h, drirc, and plumbed by st/dri? Nobody has ever put
driver-specific stuff into p_defines.h.

Marek





---
>   src/gallium/drivers/radeonsi/si_pipe.c | 7 +++
>   1 file changed, 7 insertions(+)
>
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c
> b/src/gallium/drivers/radeonsi/si_pipe.c
> index ff787ad..4088849 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.c
> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
> @@ -935,20 +935,27 @@ struct pipe_screen *radeonsi_screen_create(struct
> radeon_winsys *ws,
> si_init_screen_state_functions(sscreen);
> if (!r600_common_screen_init(>b, ws, flags) ||
> !si_init_gs_info(sscreen) ||
> !si_init_shader_cache(sscreen)) {
> FREE(sscreen);
> return NULL;
> }
>   + /* Enable sisched where it helps. */
> +   char process[128];
> +   if (os_get_process_name(process, sizeof(process)) &&
> +   /* Unigine Superposition */
> +   !strcmp(process, "superposition"))
> +   sscreen->b.debug_flags |= DBG_SI_SCHED;
> +
> /* Only enable as many threads as we have target machines, but at
> most
>  * the number of CPUs - 1 if there is more than one.
>  */
> num_threads = sysconf(_SC_NPROCESSORS_ONLN);
> num_threads = MAX2(1, num_threads - 1);
> num_compiler_threads = MIN2(num_threads, ARRAY_SIZE(sscreen->tm));
> num_compiler_threads_lowprio =
> MIN2(num_threads, ARRAY_SIZE(sscreen->tm_low_priority));
> if (!util_queue_init(>shader_compiler_queue, "si_shader",
>
>

-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] radeonsi: enable LLVM sisched for Unigine Superposition

2017-06-24 Thread Nicolai Hähnle

On 22.06.2017 17:10, Marek Olšák wrote:

From: Marek Olšák 

+2.3% better score on Fiji. It might be better without HBM.


Can this be a drirc option?



---
  src/gallium/drivers/radeonsi/si_pipe.c | 7 +++
  1 file changed, 7 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c 
b/src/gallium/drivers/radeonsi/si_pipe.c
index ff787ad..4088849 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -935,20 +935,27 @@ struct pipe_screen *radeonsi_screen_create(struct 
radeon_winsys *ws,
  
  	si_init_screen_state_functions(sscreen);
  
  	if (!r600_common_screen_init(>b, ws, flags) ||

!si_init_gs_info(sscreen) ||
!si_init_shader_cache(sscreen)) {
FREE(sscreen);
return NULL;
}
  
+	/* Enable sisched where it helps. */

+   char process[128];
+   if (os_get_process_name(process, sizeof(process)) &&
+   /* Unigine Superposition */
+   !strcmp(process, "superposition"))
+   sscreen->b.debug_flags |= DBG_SI_SCHED;
+
/* Only enable as many threads as we have target machines, but at most
 * the number of CPUs - 1 if there is more than one.
 */
num_threads = sysconf(_SC_NPROCESSORS_ONLN);
num_threads = MAX2(1, num_threads - 1);
num_compiler_threads = MIN2(num_threads, ARRAY_SIZE(sscreen->tm));
num_compiler_threads_lowprio =
MIN2(num_threads, ARRAY_SIZE(sscreen->tm_low_priority));
  
  	if (!util_queue_init(>shader_compiler_queue, "si_shader",





--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] radeonsi: enable LLVM sisched for Unigine Superposition

2017-06-22 Thread Marek Olšák
From: Marek Olšák 

+2.3% better score on Fiji. It might be better without HBM.
---
 src/gallium/drivers/radeonsi/si_pipe.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c 
b/src/gallium/drivers/radeonsi/si_pipe.c
index ff787ad..4088849 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -935,20 +935,27 @@ struct pipe_screen *radeonsi_screen_create(struct 
radeon_winsys *ws,
 
si_init_screen_state_functions(sscreen);
 
if (!r600_common_screen_init(>b, ws, flags) ||
!si_init_gs_info(sscreen) ||
!si_init_shader_cache(sscreen)) {
FREE(sscreen);
return NULL;
}
 
+   /* Enable sisched where it helps. */
+   char process[128];
+   if (os_get_process_name(process, sizeof(process)) &&
+   /* Unigine Superposition */
+   !strcmp(process, "superposition"))
+   sscreen->b.debug_flags |= DBG_SI_SCHED;
+
/* Only enable as many threads as we have target machines, but at most
 * the number of CPUs - 1 if there is more than one.
 */
num_threads = sysconf(_SC_NPROCESSORS_ONLN);
num_threads = MAX2(1, num_threads - 1);
num_compiler_threads = MIN2(num_threads, ARRAY_SIZE(sscreen->tm));
num_compiler_threads_lowprio =
MIN2(num_threads, ARRAY_SIZE(sscreen->tm_low_priority));
 
if (!util_queue_init(>shader_compiler_queue, "si_shader",
-- 
2.7.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev